colour.RGB_to_HCL

colour.RGB_to_HCL(RGB, gamma=3, Y_0=100)[source]

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

Parameters
  • RGB (array_like) – RGB colourspace array.

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

  • Y_0 (numeric, optional) – White reference luminance \(Y_0\).

Returns

HCL array.

Return type

ndarray

Notes

Domain

Scale - Reference

Scale - 1

RGB

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

HCL

[0, 1]

[0, 1]

References

[SM05], [Wikipedia15]

Examples

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