colour.notation.RGB_to_HEX#
- colour.notation.RGB_to_HEX(RGB: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) NDArrayStr[source]#
Convert from RGB colourspace to hexadecimal representation.
- Parameters:
RGB (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – RGB colourspace array with values typically normalised to [0, 1].
- Returns:
Hexadecimal representation as a string in the format ‘#RRGGBB’.
- Return type:
strornumpy.array
Notes
Domain
Scale - Reference
Scale - 1
RGB1
1
Examples
>>> RGB = np.array([0.66666667, 0.86666667, 1.00000000]) >>> RGB_to_HEX(RGB) '#aaddff'