W3C home > Mailing lists > Public > www-svg@w3.org > March 2012

Re: Color values to represent floating point colors

From: Chris Lilley <chris@w3.org>
Date: Mon, 5 Mar 2012 17:09:22 +0100
Message-ID: <546714094.20120305170922@w3.org>
To: "Dr. Olaf Hoffmann" <Dr.O.Hoffmann@gmx.de>
CC: www-svg@w3.org
On Saturday, March 3, 2012, 2:34:00 PM, Dr. wrote:

DOH> This simply looks like a bug, introduced somehow in the second edition
DOH> of SVG 1.1.

Yes, the first edition did not have this bug. And SVG has always supported float percentages for color specification.

DOH> I think, in the first edition, such a problem does not occur:
DOH> http://www.w3.org/TR/2003/REC-SVG11-20030114/types.html#DataTypeColor

DOH> For example SVG tiny 1.2 explictly notes 
DOH> 'an arbitrary number of decimal places may be supplied'.
DOH> http://www.w3.org/TR/SVGMobile12/painting.html#colorSyntax


This is the correct formal syntax (number rather than integer for the % form):

color    ::= "#" hexdigit hexdigit hexdigit (hexdigit hexdigit hexdigit)?
             | "rgb(" wsp* integer comma integer comma integer wsp* ")"
             | "rgb(" wsp* number "%" comma number "%" comma number "%" wsp* ")"
             | color-keyword
hexdigit ::= [0-9A-Fa-f]
comma    ::= wsp* "," wsp*

where number links to

 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups
Received on Monday, 5 March 2012 16:09:21 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:47:27 UTC