colour.models.LMS_to_Yrg#

colour.models.LMS_to_Yrg(LMS: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 1][source]#

Convert from LMS cone fundamentals colourspace to Kirk (2019) Yrg colourspace.

Parameters:

LMS (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – LMS cone fundamentals colourspace values.

Returns:

Kirk (2019) Yrg colourspace array with \(Y\) luminance, \(r\) redness, and \(g\) greenness components.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

LMS

1

1

Range

Scale - Reference

Scale - 1

Yrg

1

1

References

[Kir19]

Examples

>>> import numpy as np
>>> LMS = np.array([0.15639195, 0.06741689, 0.03281398])
>>> LMS_to_Yrg(LMS)
array([ 0.1313780...,  0.4903764...,  0.3777739...])