[reportlab-users] Suggested patch for "missing" SVG colours

Andy Robinson andy at reportlab.com
Thu Jan 29 14:33:15 EST 2009


2009/1/29 Paul Barrass <paul.barrass at safeonlinebilling.com>:

> The official W3 SVG spec defines both spellings -

> http://www.w3.org/TR/SVG/types.html#ColorKeywords . From my reading of the

> specs, HTML and CSS2 define only 17 colours (using the gray spelling), but

> most browsers also support the SVG list. CSS3 includes the full list of SVG

> colours, including both spellings of grey.


The possible confusion may occur with reverse lookups. For example, if
one uses 'lightgrey' in code to create a Color object, it gets
passed around as numbers internally, and one is then writing out HTML,
one has to decide whether to use a 'reverse lookup' and find a name if
one matches, or to just output the RGB values. I can also see a
similar issue if anyone tried to build a GUI inspector with named
colors (sorry, 'colours' - sic) in dropdowns.

Anyway it's a theoretical future worry, not an actual one, so I''m
quite happy to have any common and useful colour names in there.

- Andy


More information about the reportlab-users mailing list