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

Re: [css3-colors] Comments on Last Call

From: Chris Lilley <chris@w3.org>
Date: Tue, 15 Apr 2003 06:04:10 +0200
Message-ID: <124177111875.20030415060410@w3.org>
To: (wrong string) Çelik <tantek@cs.stanford.edu>
CC: (wrong string) äper <christoph@paeper.de>, www-style@w3.org

On Tuesday, April 15, 2003, 12:52:56 AM, Tantek wrote:

TÇ> On 4/14/03 2:43 PM, "Christoph Päper" <christoph.paeper@tu-clausthal.de>
TÇ> wrote:

>> Tantek Çelik:
>>> On 2/16/03 4:57 AM, "Christoph Päper" <christoph.paeper@tu-clausthal.de>
>>> <alpha> values were introduced as values between 0 and 1 in the SVG 1.0
>>> specification.  CSS3 Color continues with that convention.
>> I've never cared that much about SVG (neither Macromedia Flash),

TÇ> But Christoph, surely you wouldn't deny that the web community as a whole
TÇ> cares very much about vector graphics, if the adoption of Macromedia Flash
TÇ> is any indication.

TÇ> If you care about CSS, you care about presentation, and thus you _should_
TÇ> care about SVG.

I would agree, but lets back off from that.

People who know about color have always expressed the amount of a
given light source on a normalized 0 to 1 scale. (unless they were
giving an absolute measurement of the brightness in physical units).

Alpha, being added later to the Web, uses that model.

Unfortunately, color was added early to the Web and by people neither
understood it nor took the trouble to ask. So, they used a 0 .. 255
integer scale because they were familiar with 8-bit DACs. Which was
dumb, and even back then there was equipment that used more bits, or
less bits. But thats what they did, added it to HTML, and therefore,
that is how it was added to CSS1.

There was also a need for a notation that was finer grained and not
dependent on DAC resolution. We would have liked to use 0 to 1. But
then 1 would have two meanings, either full intensity or 1/255

Best we could do was invent the bogus 0% to 100% notation which -
distinct from every other use of percent in CSS - was not a percent of
some other property but a percent of itself.

So yes, CSS would have liked to use 0..1 for color but could not, for
compatibility with HTML. SVG would have liked to use 0..1 ffor color
but could not, for compatibility with CSS.

So at the end of the day, its not a perfect syntax from an aesthetic
point of view. it is however perfectly capable of expressing al the
values required. There are no colors made unavailable by this syntax.

So, practicality has to come into the picture - making every single
stylesheet that uses color be invalid just to produce a nice even
syntax is clearly foolish.

>> and have never read the spec myself, but it seems to me,

It seems to me that if you have never read the spec you are in no
position to comment on it, far less to accuse it of 'lack of care'.

>> that at least the CSS part of it was done without the amount of
>> care (and/or public feedback) that is put into the real CSS.

Hmm, my archive of the svg developers list - which only goes back to
feb 2001 - has 19,604 messages in it. What was that about lack of
public feedback. But you are just guessing here, as you say you have
neither read the spec nor investigated it in any way.

>> I assume it was mainly done by graphic artists, who
>> are used to certain things (X11, 0..1 alpha value), which are dumb or
>> unlogic for historical reasons, and thus didn't even think of changing that.

TÇ> That's a little unfair I think - it would be like claiming CSS was done by
TÇ> typographers who are used to certain things (leading, point units) for
TÇ> historical reasons and didn't even think of changing them.

Well put.

>> To me and implementors perhaps. I just wanted to remark that some,
>> especially novices, might be offended when confronted with an unknown
>> programming language in a specification. CSS3: List for example relies much
>> on algorithms and requires them to be in English. Just noticed that you're
>> an editor of that one, too.

TÇ> True, but certainly CSS3 Color was written before CSS3 Lists was.  And, the
TÇ> original algorithms for HSL->RGB were written in ABC by Steven Pemberton[2];

Actually no. The original algorithms for HSL to RGB were written in
1978 by Alvey Ray Smith, who wanted to have a polar system that was
similar to the polar CIE LCH system introduced in 1976, but trading
simpler mathematics for lack of perceptual uniformity or colorimetric

Smith, A. R. "Color Gamut Transform Pairs". Computer Graphics 12, 3 (Aug.
1978), 12-19.

You can find a comparison of the effect of different color models on
color selection accuracy in the proceedings of CHI 96 (which study
shows no significant difference between RGB and HSL, incidentally).

Steven did, however, write the ABC program that generated the images
for the CSS3 color spec.

TÇ> I didn't want to attempt to rewrite them (a process that usually
TÇ> introduces bugs).

Quite right.

 Chris                            mailto:chris@w3.org
Received on Tuesday, 15 April 2003 00:04:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:06 UTC