RE: HTML 3.2 PR color value syntax

I'm a bit surprised no one has piped up with this yet: the Cascading
Style Sheets draft has a syntax for specifying colors in decimal.  Color
values can be specified in one of three ways:
* colorname - a list of 16 is given (the longer list of ~140 is
supported by Internet Explorer, I don't know about other CSS UAs)
* hexadecimal notation - "#ff007f" or "#f07".  Extending this to > 8bits
per color is not mentioned, but neither is it explicitly disallowed (in
my opinion, anyway)
* RGB functional notation: "rgb( 255, 0 , 0)" (RGB triplet, integer
ranges 0-255) AND "rgb( 100%, 0%, 0%)" (float range 0.0% - 100.0%).

It should be trivial for any browser that supports these notations in
CSS (which is required to conform to CSS 1.0 - which IE3.0 doesn't) to
implement them in HTML attributes as well, and shouldn't conflict with
anything, especially since as someone noted, the COLOR attribute is
CDATA.

I noted a couple of people mentioned other color models - perhaps
HSV/HSL models could be represented in a similar manner, e.g.
"hsv(100%,75%,75%)".  I'm not enough of a color whiz to propose the
exact semantics of that myself, but it could certainly fit in the CSS
color mechanism simply as another functional notation.

	-Chris
Chris Wilson
cwilso@microsoft.com
-[-

>-----Original Message-----
>From:	Abigail [SMTP:abigail@ny.fnx.com]
>Sent:	Tuesday, November 12, 1996 8:32 AM
>To:	www-html@w3.org
>Subject:	Re: HTML 3.2 PR color value syntax
>
>First of all, I wonder why we need to equipe HTML with a syntax
>for colours. Aren't style sheets supposed to deal with that?
>
>Second, why restrict ourselves to one syntax? Why not allow percentages
>as well as hex or decimal values? It wouldn't be hard for a user agent
>to parse all of: "100%,100%,100%", "0xFF,0xFF,0xFF", "0xFFFFFF" and
>"255,255,255", would it? Or to translate between RGB and CYMK or HSB
>models.
>
>Third, any syntax should be extendable, not limit to 3x8 bits.  It
>should also allow for 3x16, 3x24, etc bits. There's no need to have
>incompatible versions in the future.
>
>
>
>Abigail
>

Received on Tuesday, 12 November 1996 13:10:31 UTC