colour.RGB_to_Prismatic#
- colour.RGB_to_Prismatic(RGB: 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 RGB colourspace to Prismatic \(L\rho\gamma\beta\) colourspace array.
- Parameters:
RGB (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – RGB colourspace array.
- Returns:
Prismatic \(L\rho\gamma\beta\) colourspace array.
- Return type:
Notes
Domain
Scale - Reference
Scale - 1
RGB1
1
Range
Scale - Reference
Scale - 1
Lrgb1
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 the specified 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…])