# colour.models.rgb.prismatic Module¶

## Prismatic Colourspace¶

Defines the Prismatic colourspace transformations:

References

 [1] Shirley, P., & Hart, D. (2015). The prismatic color space for rgb computations, 2–7.
colour.models.rgb.prismatic.RGB_to_Prismatic(RGB)[source]

Converts from RGB colourspace to Prismatic $$L\rho\gamma\beta$$ colourspace array.

Parameters: RGB (array_like) – RGB colourspace array. Prismatic $$L\rho\gamma\beta$$ colourspace array. ndarray

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...])

colour.models.rgb.prismatic.Prismatic_to_RGB(Lrgb)[source]

Converts from Prismatic $$L\rho\gamma\beta$$ colourspace array to RGB colourspace.

Parameters: Lrgb (array_like) – Prismatic $$L\rho\gamma\beta$$ colourspace array. RGB colourspace array. ndarray

Examples

>>> Lrgb = np.array([0.75000000, 0.16666667, 0.33333333, 0.50000000])
>>> Prismatic_to_RGB(Lrgb)
array([ 0.25...   ,  0.4999999...,  0.75...  ])