code: def parse_rgb(s):
      if not isinstance(s, string_types):
          raise ValueError("Could not parse color '{0}'".format(s))
      s = s.strip().replace(" ", "").lower()
      # simple lookup
      rgb = css_colors.get(s)
      if rgb is not None:
          return rgb
  
      # 6-digit hex
      match = re.match("#([a-f0-9]{6})$", s)
      if match:
          core = match.group(1)
          return tuple(int(core[i : i + 2], 16) for i in range(0, 6, 2))
  
      # 3-digit hex
      match = re.match("#([a-f0-9]{3})$", s)
      if match:
          return tuple(int(c * 2, 16) for c in match.group(1))
  
      # rgb(x,y,z)
      match = re.match(r"rgb\((\d+,\d+,\d+)\)", s)
      if match:
          return tuple(int(v) for v in match.group(1).split(","))
  
      raise ValueError("Could not parse color '{0}'".format(s))
  
label_desc: Use image node_id 1 for calling a global function with example usage: parse_rgb(s) and returns: rgb, tuple, tuple, tuple