class_docstr: Represents a color in terms of float values for RGBA between 0.0 and 1.0.
class_docstr_tok: ["Represents","a","color","in","terms","of","float","values","for","RGBA","between","0.0","and","1.0","."]
docstr: Create a Color instance from a hex integer like 0xaaff33 and an optional alpha value.
docstr_tok: ["Create","a","Color","instance","from","a","hex","integer","like","0xaaff33","and","an","optional","alpha","value","."]
code: def from_hexint(cls, hexint: int, alpha: float = 1.0):
      """Create a Color instance from a hex integer like 0xaaff33 and an optional alpha value."""
      if not 0 <= hexint <= 0xFFFFFF:
          raise ValueError(
              f"hexint not [0x000000 ... 0xffffff] (was 0x{hexint:06x})"
          )
      if not 0.0 <= alpha <= 1.0:
          raise ValueError(
              f"alpha has to be between 0.0 and 1.0 (was {alpha})"
          )
      b = hexint & 255
      g = (hexint >> 8) & 255
      r = (hexint >> 16) & 255
      return cls(r / 255.0, g / 255.0, b / 255.0, alpha)
  
file_path: kubric/kubric/core/color.py
imports: import colorsys
  from typing import NamedTuple, Tuple, Union
label_desc: Use image node_id 6 for calling the Color obj's underlying member method code with example usage: obj.from_hexint(cls, hexint, alpha) and returns: cls