Top | ![]() |
![]() |
![]() |
![]() |
gboolean | nk_colour_parse () |
const gchar * | nk_colour_to_hex () |
const gchar * | nk_colour_to_rgba () |
gboolean nk_colour_parse (const gchar *string
,NkColour *colour
);
Tries to parse string
to fill colour
.
Accepted formats are a subset of the CSS4 colour values recommendation. Colour names, #hex, rgb(), hsl() and hwb() notations are supported.
If the function returns TRUE
, colour
is filled with the parsed values.
If the function returns FALSE
, colour
is left untouched.
string |
a string representing a colour |
|
colour |
the corresponding NkColour. |
[out caller-allocates] |
const gchar *
nk_colour_to_hex (const NkColour *colour
);
Generates a string representing the colour in CSS rgb()
notation.
Will generate an rgba() string if colour.alpha
is not 0.