colour.YcCbcCrc_to_RGB#
- colour.YcCbcCrc_to_RGB(YcCbcCrc: ArrayLike, in_bits: int = 10, in_legal: bool = True, in_int: bool = False, is_12_bits_system: bool = False, **kwargs: Any) NDArrayFloat [source]#
Convert an array of Yc’Cbc’Crc’ colour encoding values to the corresponding RGB array of linear values.
- Parameters:
YcCbcCrc (ArrayLike) – Input Yc’Cbc’Crc’ colour encoding array of linear float values.
in_bits (int) – Bit-depth for int 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) – Whether to treat the input values as legal range. Default is False.
in_int (bool) – Whether to treat the input values as
in_bits
int code values. Default is False.is_12_bits_system (bool) – Recommendation ITU-R BT.2020 EOTF (EOCF) adopts different parameters for 10 and 12 bit systems. Default is False.
in_range – 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 usingcolour.models.rgb.ycbcr.ranges_YCbCr()
definition.kwargs (Any)
- Returns:
RGB array of linear float values.
- Return type:
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 int 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], [Wikipedia04e]
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...])