colour.cctf_encoding

colour.cctf_encoding(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.CCTF_ENCODINGS}, Computation function.

Other Parameters

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

Warning

For ITU-R BT.2100, only the inverse 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

>>> 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...