color: Support CSS color definitions
authorEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 22 Nov 2010 14:22:56 +0000 (14:22 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Mon, 22 Nov 2010 14:38:44 +0000 (14:38 +0000)
commitab6da347f61c0fb2249bbab9d03545121752d633
tree5340fdb801391f5a86b8075f28db6d17b67ed6f2
parentee0b8c439e0211e1af8ad55d17d2695e17879f0a
color: Support CSS color definitions

The CSS Color Module 3, available at:

  http://www.w3.org/TR/css3-color/

allows defining colors as:

  rgb ( r, g, b )
  rgba ( r, g, b, a)

along with the usual hexadecimal and named notations.

The r, g, and b channels can be:

  • integers between 0 and 255
  • percentages, between 0% and 100%

The alpha channel, if included using the rgba() modifier, can be a
floating point value between 0.0 and 1.0.

The ClutterColor parser should support this notation.
clutter/clutter-color.c
tests/conform/test-color.c