colour.notation.keyword_to_RGB_CSSColor3#

colour.notation.keyword_to_RGB_CSSColor3(keyword: str) NDArrayFloat[source]#

Convert given colour keyword to RGB colourspace according to CSS Color Module Level 3 W3C Recommendation.

Parameters:

keyword (str) – Colour keyword.

Returns:

RGB colourspace array.

Return type:

numpy.array

Notes

  • All the RGB colors are specified in the IEC 61966-2-1:1999 sRGB colourspace.

Examples

>>> keyword_to_RGB_CSSColor3("black")
array([ 0.,  0.,  0.])
>>> keyword_to_RGB_CSSColor3("white")
array([ 1.,  1.,  1.])
>>> keyword_to_RGB_CSSColor3("aliceblue")  
array([ 0.9411764...,  0.9725490...,  1.        ])