colour.sRGB_to_XYZ#

colour.sRGB_to_XYZ(RGB: Domain1, illuminant: ArrayLike = CCS_ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D65'], chromatic_adaptation_transform: LiteralChromaticAdaptationTransform | str | None = 'CAT02', apply_cctf_decoding: bool = True) Range1[source]#

Convert from sRGB colourspace to CIE XYZ tristimulus values.

Parameters:
  • RGB (Domain1) – sRGB colourspace array.

  • illuminant (ArrayLike) – Source illuminant chromaticity coordinates.

  • chromatic_adaptation_transform (LiteralChromaticAdaptationTransform | str | None) – Chromatic adaptation transform.

  • apply_cctf_decoding (bool) – Whether to apply the sRGB decoding colour component transfer function / electro-optical transfer function.

Returns:

CIE XYZ tristimulus values.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

RGB

1

1

Range

Scale - Reference

Scale - 1

XYZ

1

1

Examples

>>> import numpy as np
>>> RGB = np.array([0.70573936, 0.19248266, 0.22354169])
>>> sRGB_to_XYZ(RGB)
array([ 0.2065429...,  0.1219794...,  0.0513714...])