code: def create_color(color):
      
      if color[0] == "#":
          # Convert hex string to RGB
          return [int(color[i:i + 2], 16) / 255 for i in range(1, 7, 2)]
      else:
          # Create a named colors instance
          nc = vtk.vtkNamedColors()
          return nc.GetColor3d(color)
docs: Creates VTK-compatible RGB color from a color string.
  
      :param color: color
      :type color: str
      :return: RGB color values
      :rtype: list