class_docstr: RGB color trait.
class_docstr_tok: ["RGB","color","trait","."]
code: def validate(self, obj, value):
      if isinstance(value, color.Color):
          rgb = value.rgb
      elif isinstance(value, int):
          rgb = color.Color.from_hexint(value).rgb
      elif isinstance(value, str):
          rgb = color.Color.from_hexstr(value).rgb
      elif len(value) == 3:
          rgb = color.Color(*value).rgb
      else:
          return self.error(obj, value)
  
      if not all(0 <= x <= 1 for x in rgb):
          self.error(obj, value)
  
      return rgb
  
imports: import numpy
  import traitlets
  import pyquaternion
  from kubric.core import color
  from kubric.core.assets import UndefinedAsset
  from kubric.core.assets import Asset
label_desc: Use image node_id 1 for calling the RGB obj's underlying member method code with example usage: obj.validate(obj, value) and returns: rgb, self