colour.YcCbcCrc_to_RGB

colour.YcCbcCrc_to_RGB(YcCbcCrc, in_bits=10, in_legal=True, in_int=False, is_12_bits_system=False, **kwargs)[source]

Converts an array of Yc’Cbc’Crc’ colour encoding values to the corresponding RGB array of linear values.

Parameters
  • YcCbcCrc (array_like) – Input Yc’Cbc’Crc’ colour encoding array of linear float values.

  • in_bits (int, optional) – Bit depth for integer input, or used in the calculation of the denominator for legal range float values, i.e. 8-bit means the float value for legal white is 235 / 255. Default is 10.

  • in_legal (bool, optional) – Whether to treat the input values as legal range. Default is False.

  • in_int (bool, optional) – Whether to treat the input values as in_bits integer code values. Default is False.

  • is_12_bits_system (bool, optional) – Recommendation ITU-R BT.2020 EOTF (EOCF) adopts different parameters for 10 and 12 bit systems. Default is False.

Other Parameters

in_range (array_like, optional) – Array overriding the computed range such as in_range = (Y_min, Y_max, C_min, C_max). If in_range is undefined, Y_min, Y_max, C_min and C_max will be computed using colour.models.rgb.ycbcr.YCbCr_ranges() definition.

Returns

RGB array of linear float values.

Return type

ndarray

Notes

Domain *

Scale - Reference

Scale - 1

YcCbcCrc

[0, 1]

[0, 1]

Range *

Scale - Reference

Scale - 1

RGB

[0, 1]

[0, 1]

* This definition has input and output integer switches, thus the domain-range scale information is only given for the floating point mode.

Warning

This definition is specifically for usage with Recommendation ITU-R BT.2020 when adopting the constant luminance implementation.

References

[InternationalTUnion15a], [Wik04e]

Examples

>>> YcCbcCrc = np.array([1689, 2048, 2048])
>>> YcCbcCrc_to_RGB(YcCbcCrc, in_legal=True, in_bits=12, in_int=True,
...                 is_12_bits_system=True)
... 
array([ 0.1800903...,  0.1800903...,  0.1800903...])