colour.cctf_decoding#

colour.cctf_decoding(value: Union[float, numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]], function: Union[Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ALEXA Log C', 'ARIB STD-B67', 'Blackmagic Film Generation 5', 'Canon Log 2', 'Canon Log 3', 'Canon Log', 'Cineon', 'D-Log', 'DCDM', 'DICOM GSDF', 'DaVinci Intermediate', 'ERIMM RGB', 'F-Log', 'Filmic Pro 6', 'Gamma 2.2', 'Gamma 2.4', 'Gamma 2.6', 'ITU-R BT.1886', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'ProPhoto RGB', 'Protune', 'REDLog', 'REDLogFilm', 'RIMM RGB', 'ROMM RGB', 'S-Log', 'S-Log2', 'S-Log3', 'SMPTE 240M', 'ST 2084', 'T-Log', 'V-Log', 'ViperLog', 'sRGB'], str] = 'sRGB', **kwargs: Any) Union[float, numpy.ndarray][source]#

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

Parameters
  • value (Union[float, numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]) – Non-linear \(R'G'B'\) values.

  • function (Union[Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ALEXA Log C', 'ARIB STD-B67', 'Blackmagic Film Generation 5', 'Canon Log 2', 'Canon Log 3', 'Canon Log', 'Cineon', 'D-Log', 'DCDM', 'DICOM GSDF', 'DaVinci Intermediate', 'ERIMM RGB', 'F-Log', 'Filmic Pro 6', 'Gamma 2.2', 'Gamma 2.4', 'Gamma 2.6', 'ITU-R BT.1886', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'ProPhoto RGB', 'Protune', 'REDLog', 'REDLogFilm', 'RIMM RGB', 'ROMM RGB', 'S-Log', 'S-Log2', 'S-Log3', 'SMPTE 240M', 'ST 2084', 'T-Log', 'V-Log', 'ViperLog', 'sRGB'], str]) – {colour.CCTF_DECODINGS}, Decoding colour component transfer function.

  • kwargs (Any) – Keywords arguments for the relevant decoding CCTF of the colour.CCTF_DECODINGS attribute collection.

Return type

Union[float, numpy.ndarray]

Warning

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

Returns

Linear \(RGB\) values.

Return type

numpy.floating or numpy.ndarray

Parameters
  • value (Union[float, numpy.typing._array_like._SupportsArray[numpy.dtype], numpy.typing._nested_sequence._NestedSequence[numpy.typing._array_like._SupportsArray[numpy.dtype]], bool, int, complex, str, bytes, numpy.typing._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]) –

  • function (Union[Literal['ACEScc', 'ACEScct', 'ACESproxy', 'ALEXA Log C', 'ARIB STD-B67', 'Blackmagic Film Generation 5', 'Canon Log 2', 'Canon Log 3', 'Canon Log', 'Cineon', 'D-Log', 'DCDM', 'DICOM GSDF', 'DaVinci Intermediate', 'ERIMM RGB', 'F-Log', 'Filmic Pro 6', 'Gamma 2.2', 'Gamma 2.4', 'Gamma 2.6', 'ITU-R BT.1886', 'ITU-R BT.2020', 'ITU-R BT.2100 HLG', 'ITU-R BT.2100 PQ', 'ITU-R BT.601', 'ITU-R BT.709', 'Log2', 'Log3G10', 'Log3G12', 'N-Log', 'PLog', 'Panalog', 'ProPhoto RGB', 'Protune', 'REDLog', 'REDLogFilm', 'RIMM RGB', 'ROMM RGB', 'S-Log', 'S-Log2', 'S-Log3', 'SMPTE 240M', 'ST 2084', 'T-Log', 'V-Log', 'ViperLog', 'sRGB'], str]) –

  • kwargs (Any) –

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