class_docstr: RGBA color trait.
class_docstr_tok: ["RGBA","color","trait","."]
code: def validate(self, obj, value):
      if isinstance(value, color.Color):
          rgba = value
      elif isinstance(value, int):
          rgba = color.Color.from_hexint(value)
      elif isinstance(value, str):
          rgba = color.Color.from_hexstr(value)
      elif len(value) in [3, 4]:
          rgba = color.Color(*value)
      else:
          return self.error(obj, value)
  
      if not all(0 <= x <= 1 for x in rgba):
          self.error(obj, value)
  
      return rgba
  
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 RGBA obj's underlying member method code with example usage: obj.validate(obj, value) and returns: rgba, self