colour.notation.HEX_to_RGB

colour.notation.HEX_to_RGB(HEX: StrOrArrayLike) numpy.ndarray[source]

Convert from hexadecimal representation to RGB colourspace.

Parameters

HEX (StrOrArrayLike) – Hexadecimal representation.

Returns

RGB colourspace array.

Return type

numpy.array

Notes

Range

Scale - Reference

Scale - 1

RGB

[0, 1]

[0, 1]

Examples

>>> HEX = '#aaddff'
>>> HEX_to_RGB(HEX)  
array([ 0.6666666...,  0.8666666...,  1.        ])