colour.encoding_cctf

colour.encoding_cctf(value, function='sRGB', **kwargs)[source]

Encodes linear \(RGB\) values to non linear \(R'G'B'\) values using given encoding colour component transfer function (Encoding CCTF).

Parameters:
  • value (numeric or array_like) – Linear \(RGB\) values.
  • function (unicode, optional) – {colour.ENCODING_CCTFS}, Computation function.
Other Parameters:
 

**kwargs (dict, optional) – Keywords arguments for the relevant encoding CCTF of the colour.ENCODING_CCTFS attribute collection.

Warning

For ITU-R BT.2100, only the reverse electro-optical transfer functions (EOTFs / EOCFs) are exposed by this definition, please refer to the colour.oetf() definition for the opto-electronic transfer functions (OETF / OECF).

Returns:Non linear \(R'G'B'\) values.
Return type:numeric or ndarray

Examples

>>> encoding_cctf(0.18, function='PLog', log_reference=400)
... # doctest: +ELLIPSIS
0.3910068...
>>> encoding_cctf(0.18, function='ST 2084', L_p=1000)
... # doctest: +ELLIPSIS
0.1820115...
>>> encoding_cctf(  # doctest: +ELLIPSIS
...     0.11699185725296059, function='ITU-R BT.1886')
0.4090077...