colour.notation.HEX_to_RGB#

colour.notation.HEX_to_RGB(HEX: ArrayLike) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 1][source]#

Convert from hexadecimal representation to RGB colourspace.

Parameters:

HEX (ArrayLike) – Hexadecimal representation as a string in the format ‘#RRGGBB’.

Returns:

RGB colourspace array with values typically normalised to [0, 1].

Return type:

numpy.array

Notes

Range

Scale - Reference

Scale - 1

RGB

1

1

Examples

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