code: def color_palette_dict(self, alpha=0.35):
          
  
          color_dict = {}
          for hkl in self.all_slab_entries.keys():
              rgb_indices = [0, 1, 2]
              color = [0, 0, 0, 1]
              random.shuffle(rgb_indices)
              for i, ind in enumerate(rgb_indices):
                  if i == 2:
                      break
                  color[ind] = np.random.uniform(0, 1)
  
              # Get the clean (solid) colors first
              clean_list = np.linspace(0, 1, len(self.all_slab_entries[hkl]))
              for i, clean in enumerate(self.all_slab_entries[hkl].keys()):
                  c = copy.copy(color)
                  c[rgb_indices[2]] = clean_list[i]
                  color_dict[clean] = c
  
                  # Now get the adsorbed (transparent) colors
                  for ads_entry in self.all_slab_entries[hkl][clean]:
                      c_ads = copy.copy(c)
                      c_ads[3] = alpha
                      color_dict[ads_entry] = c_ads
  
          return color_dict
docs: Helper function to assign each facet a unique color using a dictionary.
  
          Args:
              alpha (float): Degree of transparency
  
          return (dict): Dictionary of colors (r,g,b,a) when plotting surface
              energy stability. The keys are individual surface entries where
              clean surfaces have a solid color while the corresponding adsorbed
              surface will be transparent.