colors¶
Custom type to define colors in different ways.
-
enum color_type_t¶
[source] Different ways in which a color can be specified.
-
enumerator COLOR_TYPE_HUE¶
[source] Color of a specific hue, whose saturation and value follow RGB matrix’s settings.
-
enumerator COLOR_TYPE_HUE¶
-
struct color_t¶
[source] Represent colors in different ways.
-
color_type_t type¶
[source] How this color is specified: rgb, hsv, just hue, …
-
color_type_t type¶
-
int to_rgb(color_t color, rgb_t *rgb)¶
[source] Convert a
color_t
to RGB format.- Parameters:
color – Color definition.
rgb – Pointer where the value will be written.
- Return: Result of the operation.
0
: Color was retrieved.-ENODATA
:TRNS
was found, there’s nothing to work with.-EINVAL
: Invalid value (color.type
is not a value incolor_type_t
).