colour.color.RGB_color_picker¶
- colour.color.RGB_color_picker(obj: object) colour.color.Color¶
Build a color representation from the string representation of an object.
This allows to quickly get a color from some data, with the additional benefit that the color will be the same as long as the (string representation of the) data is the same:
>>> from colour import RGB_color_picker, Color
Same inputs produce the same result:
>>> RGB_color_picker("Something") == RGB_color_picker("Something") True
… but different inputs produce different colors:
>>> RGB_color_picker("Something") != RGB_color_picker("Something else") True
In any case, we still get a
Colorobject:>>> isinstance(RGB_color_picker("Something"), Color) True