colour.notation.RGB_to_HEX

colour.notation.RGB_to_HEX(RGB)[source]

Converts from RGB colourspace to hexadecimal triplet representation.

Parameters:RGB (array_like) – RGB colourspace array.
Returns:Hexadecimal triplet representation.
Return type:unicode

Notes

Domain Scale - Reference Scale - 1
RGB [0, 1] [0, 1]

Examples

>>> RGB = np.array([0.66666667, 0.86666667, 1.00000000])
>>> # Doctests skip for Python 2.x compatibility.
>>> RGB_to_HEX(RGB)  # doctest: +SKIP
'#aaddff'