colour.cctf_decoding

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

Decodes non-linear \(R'G'B'\) values to linear \(RGB\) values using given decoding colour component transfer function (Decoding CCTF).

Parameters
  • value (numeric or array_like) – Non-linear \(R'G'B'\) values.

  • function (str, optional) – {colour.CCTF_DECODINGS}, Computation function.

  • **kwargs (dict, optional) – Keywords arguments for the relevant decoding CCTF of the colour.CCTF_DECODINGS attribute collection.

Warning

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

Returns

Linear \(RGB\) values.

Return type

numeric or ndarray

Examples

>>> cctf_decoding(0.391006842619746, function='PLog', log_reference=400)
... 
0.1...
>>> cctf_decoding(0.182011532850008, function='ST 2084', L_p=1000)
... 
0.1...
>>> cctf_decoding(  
...     0.461356129500442, function='ITU-R BT.1886')
0.1...