colour.RGB_luminance#

colour.RGB_luminance(RGB: ArrayLike, primaries: ArrayLike, whitepoint: ArrayLike) FloatingOrNDArray[source]#

Return the luminance \(Y\) of given RGB components from given primaries and whitepoint.

Parameters
  • RGB (ArrayLike) – RGB chromaticity coordinate matrix.

  • primaries (ArrayLike) – Primaries chromaticity coordinate matrix.

  • whitepoint (ArrayLike) – Illuminant / whitepoint chromaticity coordinates.

Returns

Luminance \(Y\).

Return type

numpy.floating or numpy.ndarray

Examples

>>> RGB = np.array([0.21959402, 0.06986677, 0.04703877])
>>> p = np.array([0.73470, 0.26530, 0.00000, 1.00000, 0.00010, -0.07700])
>>> whitepoint = np.array([0.32168, 0.33767])
>>> RGB_luminance(RGB, p, whitepoint)  
0.1230145...