# UniTAP.common.color_info

class ColorInfo:

Class contains information of frame `ColorFormat`, `DynamicRange`, `Colorimetry`.

colorimetry
color_format
dynamic_range
bpc
def is_valid(self) -> bool:

Check that information is valid (not equal NONE state and bpc more than 0).

###### Returns:

> object of bool type.

bpp: int

Returns calculated bits per pixel for this color info (except DSC). 0 if color info is not valid.

###### Returns:

> object of int type.

class ColorInfo.ColorFormat(enum.IntEnum):

Contains values of possible color format.

CF_NONE = <ColorFormat.CF_NONE: 0>
CF_UNKNOWN = <ColorFormat.CF_UNKNOWN: 1>
CF_RGB = <ColorFormat.CF_RGB: 2>
CF_YCbCr_422 = <ColorFormat.CF_YCbCr_422: 3>
CF_YCbCr_444 = <ColorFormat.CF_YCbCr_444: 4>
CF_YCbCr_420 = <ColorFormat.CF_YCbCr_420: 5>
CF_IDO_DEFINED = <ColorFormat.CF_IDO_DEFINED: 6>
CF_Y_ONLY = <ColorFormat.CF_Y_ONLY: 7>
CF_RAW = <ColorFormat.CF_RAW: 8>
CF_DSC = <ColorFormat.CF_DSC: 9>

##### Inherited Members

enum.Enum
  name
  value
builtins.int
  conjugate
  bit_length
  bit_count
  to_bytes
  from_bytes
  as_integer_ratio
  real
  imag
  numerator
  denominator

class ColorInfo.DynamicRange(enum.IntEnum):

Contains values of possible dynamic range.

DR_UNKNOWN = <DynamicRange.DR_UNKNOWN: -1>
DR_VESA = <DynamicRange.DR_VESA: 0>
DR_CTA = <DynamicRange.DR_CTA: 1>

##### Inherited Members

enum.Enum
  name
  value
builtins.int
  conjugate
  bit_length
  bit_count
  to_bytes
  from_bytes
  as_integer_ratio
  real
  imag
  numerator
  denominator

class ColorInfo.Colorimetry(enum.IntEnum):

Contains values of possible colorimetry.

CM_NONE = <Colorimetry.CM_NONE: 0>
CM_RESERVED = <Colorimetry.CM_RESERVED: 1>
CM_sRGB = <Colorimetry.CM_sRGB: 2>
CM_SMPTE_170M = <Colorimetry.CM_SMPTE_170M: 3>
CM_ITUR_BT601 = <Colorimetry.CM_ITUR_BT601: 4>
CM_ITUR_BT709 = <Colorimetry.CM_ITUR_BT709: 5>
CM_xvYCC601 = <Colorimetry.CM_xvYCC601: 6>
CM_xvYCC709 = <Colorimetry.CM_xvYCC709: 7>
CM_sYCC601 = <Colorimetry.CM_sYCC601: 8>
CM_AdobeYCC601 = <Colorimetry.CM_AdobeYCC601: 9>
CM_AdobeRGB = <Colorimetry.CM_AdobeRGB: 10>
CM_ITUR_BT2020_YcCbcCrc = <Colorimetry.CM_ITUR_BT2020_YcCbcCrc: 11>
CM_ITUR_BT2020_YCbCr = <Colorimetry.CM_ITUR_BT2020_YCbCr: 12>
CM_ITUR_BT2020_RGB = <Colorimetry.CM_ITUR_BT2020_RGB: 13>
CM_RGB_WIDE_GAMUT_FIX = <Colorimetry.CM_RGB_WIDE_GAMUT_FIX: 14>
CM_RGB_WIDE_GAMUT_FLT = <Colorimetry.CM_RGB_WIDE_GAMUT_FLT: 15>
CM_DCI_P3 = <Colorimetry.CM_DCI_P3: 16>
CM_DICOM_1_4_GRAY_SCALE = <Colorimetry.CM_DICOM_1_4_GRAY_SCALE: 17>
CM_CUSTOM_COLOR_PROFILE = <Colorimetry.CM_CUSTOM_COLOR_PROFILE: 18>
CM_opYCC601 = <Colorimetry.CM_AdobeYCC601: 9>
CM_opRGB = <Colorimetry.CM_AdobeRGB: 10>

##### Inherited Members

enum.Enum
  name
  value
builtins.int
  conjugate
  bit_length
  bit_count
  to_bytes
  from_bytes
  as_integer_ratio
  real
  imag
  numerator
  denominator