colour.RGB_luminance

colour.RGB_luminance(RGB, primaries, whitepoint)[source]

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

Parameters:
  • RGB (array_like) – RGB chromaticity coordinate matrix.
  • primaries (array_like, (3, 2)) – Primaries chromaticity coordinate matrix.
  • whitepoint (array_like) – Illuminant / whitepoint chromaticity coordinates.
Returns:

Luminance \(Y\).

Return type:

numeric or ndarray

Examples

>>> RGB = np.array([40.6, 4.2, 67.4])
>>> 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)  
12.1616018...