colour.notation.RGB_to_HEX#

colour.notation.RGB_to_HEX(RGB: ArrayLike) StrOrNDArray[source]#

Convert from RGB colourspace to hexadecimal representation.

Parameters

RGB (ArrayLike) – RGB colourspace array.

Returns

Hexadecimal representation.

Return type

str or numpy.array

Notes

Domain

Scale - Reference

Scale - 1

RGB

[0, 1]

[0, 1]

Examples

>>> RGB = np.array([0.66666667, 0.86666667, 1.00000000])
>>> RGB_to_HEX(RGB)
'#aaddff'