color: Support the CSS hsl() notation
Since we support the rgb() and rgba() notations we might as well also support the hsl() one.
This commit is contained in:
@ -191,6 +191,20 @@ test_color_from_string (TestConformSimpleFixture *fixture,
|
||||
g_assert_cmpint (color.green, ==, 0);
|
||||
g_assert_cmpint (color.blue, ==, 255);
|
||||
g_assert_cmpint (color.alpha, ==, 255);
|
||||
|
||||
g_assert (clutter_color_from_string (&color, "hsl( 0, 100%, 50% )"));
|
||||
if (g_test_verbose ())
|
||||
{
|
||||
g_print ("color = { %x, %x, %x, %x }, expected = { 255, 0, 0, 255 }\n",
|
||||
color.red,
|
||||
color.green,
|
||||
color.blue,
|
||||
color.alpha);
|
||||
}
|
||||
g_assert_cmpint (color.red, ==, 255);
|
||||
g_assert_cmpint (color.green, ==, 0);
|
||||
g_assert_cmpint (color.blue, ==, 0);
|
||||
g_assert_cmpint (color.alpha, ==, 255);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user