colour.RGB_to_HCL#

colour.RGB_to_HCL(RGB: Domain1, gamma: float = 3, Y_0: float = 100) Range1[source]#

Convert from RGB colourspace to HCL colourspace according to Sarifuddin and Missaoui (2005) method.

Parameters:
  • RGB (Domain1) – RGB colourspace array.

  • gamma (float) – Non-linear lightness exponent matching Lightness \(L^*\).

  • Y_0 (float) – White reference luminance \(Y_0\).

Returns:

HCL array.

Return type:

numpy.ndarray

Notes

Domain

Scale - Reference

Scale - 1

RGB

1

1

Range

Scale - Reference

Scale - 1

HCL

1

1

  • This implementation uses the equations specified in [SM05b] with the corrections from [Sar21].

References

[SM05a], [SM05b], [Wikipedia15]

Examples

>>> RGB = np.array([0.45620519, 0.03081071, 0.04091952])
>>> RGB_to_HCL(RGB)
array([-0.0316785...,  0.2841715...,  0.2285964...])