colour.RGB_to_Prismatic#

colour.RGB_to_Prismatic(RGB: ArrayLike) NDArrayFloat[source]#

Convert from RGB colourspace to Prismatic \(L\rho\gamma\beta\) colourspace array.

Parameters:

RGB (ArrayLike) – RGB colourspace array.

Returns:

Prismatic \(L\rho\gamma\beta\) colourspace array.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

RGB

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

Lrgb

[0, 1]

[0, 1]

References

[SH15]

Examples

>>> RGB = np.array([0.25, 0.50, 0.75])
>>> RGB_to_Prismatic(RGB)  
array([ 0.75...   ,  0.1666666...,  0.3333333...,  0.5...   ])

Adjusting saturation of given RGB colourspace array: >>> saturation = 0.5 >>> Lrgb = RGB_to_Prismatic(RGB) >>> Lrgb[…, 1:] = 1 / 3 + saturation * (Lrgb[…, 1:] - 1 / 3) >>> Prismatic_to_RGB(Lrgb) # doctest: +ELLIPSIS array([ 0.45…, 0.6…, 0.75…])