W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Exact syntax for <color> values

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 13 Apr 2009 18:56:23 +1000
To: www-style@w3.org
Message-ID: <20090413085622.GB15141@arc.mcc.id.au>
I’m trying to work out the exact syntax that RGB <color> values have,
according to CSS 2.1.  http://www.w3.org/TR/CSS21/syndata.html says:

  The format of an RGB value in the functional notation is "rgb("
  followed by a comma-separated list of three numerical values (either
  three integer values or three percentage values) followed by ")". The
  integer value 255 corresponds to 100%, and to F or FF in the
  hexadecimal notation: rgb(255,255,255) = rgb(100%,100%,100%) = #FFF.
  Whitespace characters are allowed around the numerical values.

A couple of specific questions:

  * Are the integers within the parentheses <integer>s or something

  * Are the percentages within the parentheses ‘<integer> "%"’,
    ‘<number> "%"’ or something else?



Cameron McCormack ≝ http://mcc.id.au/
Received on Monday, 13 April 2009 08:57:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:35 UTC