colour.cctf_encoding#

colour.cctf_encoding(value: ArrayLike, function: LiteralCCTFEncoding | str = 'sRGB', **kwargs: Any) NDArrayFloat | NDArrayInt[source]#

Apply the specified encoding colour component transfer function (Encoding CCTF).

Parameters:
Return type:

NDArrayFloat | NDArrayInt

Warning

For ITU-R BT.2100, only the inverse electro-optical transfer functions (EOTFs) are exposed by this definition, See the colour.oetf() definition for the opto-electronic transfer functions (OETF).

Returns:

Non-linear RGB value.

Return type:

numpy.ndarray

Parameters:

Examples

>>> cctf_encoding(0.18, function="PLog", log_reference=400)
...
np.float64(0.3910068...)
>>> cctf_encoding(0.18, function="ST 2084", L_p=1000)
...
np.float64(0.1820115...)
>>> cctf_encoding(
...     0.11699185725296059, function="ITU-R BT.1886"
... )
np.float64(0.4090077...)