colour.cctf_encoding#
- colour.cctf_encoding(value: ArrayLike, function: LiteralCCTFEncoding | str = 'sRGB', **kwargs: Any) NDArrayFloat | NDArrayInt [source]#
Encode linear \(RGB\) values to non-linear \(R'G'B'\) values using given encoding colour component transfer function (Encoding CCTF).
- Parameters:
value (ArrayLike) – Linear \(RGB\) values.
function (LiteralCCTFEncoding | str) – {
colour.CCTF_ENCODINGS
}, Encoding colour component transfer function.kwargs (Any) – Keywords arguments for the relevant encoding CCTF of the
colour.CCTF_ENCODINGS
attribute collection.
- Return type:
NDArrayFloat | NDArrayInt
Warning
For ITU-R BT.2100, only the inverse electro-optical transfer functions (EOTFs / EOCFs) are exposed by this definition, See the
colour.oetf()
definition for the opto-electronic transfer functions (OETF).- Returns:
Non-linear \(R'G'B'\) values.
- Return type:
- Parameters:
Examples
>>> cctf_encoding(0.18, function="PLog", log_reference=400) ... 0.3910068... >>> cctf_encoding(0.18, function="ST 2084", L_p=1000) ... 0.1820115... >>> cctf_encoding( ... 0.11699185725296059, function="ITU-R BT.1886" ... ) 0.4090077...