colour.ICtCp_to_RGB#

colour.ICtCp_to_RGB(ICtCp: ArrayLike, method: Literal['Dolby 2016', 'ITU-R BT.2100-1 HLG', 'ITU-R BT.2100-1 PQ', 'ITU-R BT.2100-2 HLG', 'ITU-R BT.2100-2 PQ'] | str = 'Dolby 2016', L_p: float = 10000) NDArrayFloat[source]#

Convert from \(IC_TC_P\) colour encoding to ITU-R BT.2020 colourspace.

Parameters:
  • ICtCp (ArrayLike) – \(IC_TC_P\) colour encoding array.

  • method (Literal['Dolby 2016', 'ITU-R BT.2100-1 HLG', 'ITU-R BT.2100-1 PQ', 'ITU-R BT.2100-2 HLG', 'ITU-R BT.2100-2 PQ'] | str) –

    Computation method. Recommendation ITU-R BT.2100 defines multiple variants of the \(IC_TC_P\) colour encoding:

    • ITU-R BT.2100-1

      • SMPTE ST 2084:2014 inverse electro-optical transfer function (EOTF) and the \(IC_TC_P\) matrix from [Dolby16]: Dolby 2016, ITU-R BT.2100-1 PQ, ITU-R BT.2100-2 PQ methods.

      • Recommendation ITU-R BT.2100 Reference HLG opto-electrical transfer function (OETF) and the \(IC_TC_P\) matrix from [Dolby16]: ITU-R BT.2100-1 HLG method.

    • ITU-R BT.2100-2

      • SMPTE ST 2084:2014 inverse electro-optical transfer function (EOTF) and the \(IC_TC_P\) matrix from [Dolby16]: Dolby 2016, ITU-R BT.2100-1 PQ, ITU-R BT.2100-2 PQ methods.

      • Recommendation ITU-R BT.2100 Reference HLG opto-electrical transfer function (OETF) and a custom \(IC_TC_P\) matrix from [InternationalTUnion18]: ITU-R BT.2100-2 HLG method.

  • L_p (float) – Display peak luminance \(cd/m^2\) for SMPTE ST 2084:2014 non-linear encoding. This parameter should stay at its default \(10000 cd/m^2\) value for practical applications. It is exposed so that the definition can be used as a fitting function.

Returns:

ITU-R BT.2020 colourspace array.

Return type:

numpy.ndarray

Warning

The underlying SMPTE ST 2084:2014 transfer function is an absolute transfer function.

Notes

  • The ITU-R BT.2100-1 PQ and ITU-R BT.2100-2 PQ methods are aliases for the Dolby 2016 method.

  • The underlying SMPTE ST 2084:2014 transfer function is an absolute transfer function, thus the domain and range values for the Reference and 1 scales are only indicative that the data is not affected by scale transformations.

Domain

Scale - Reference

Scale - 1

ICtCp

I : [0, 1]

CT : [-1, 1]

CP : [-1, 1]

I : [0, 1]

CT : [-1, 1]

CP : [-1, 1]

Range

Scale - Reference

Scale - 1

RGB

UN

UN

References

[Dolby16], [LPY+16]

Examples

>>> ICtCp = np.array([0.07351364, 0.00475253, 0.09351596])
>>> ICtCp_to_RGB(ICtCp)  
array([ 0.4562052...,  0.0308107...,  0.0409195...])
>>> ICtCp = np.array([0.62567899, -0.01984490, 0.35911259])
>>> ICtCp_to_RGB(ICtCp, method="ITU-R BT.2100-2 HLG")  
array([ 0.4562052...,  0.0308107...,  0.0409195...])