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

[CSS3 Colors] HSL colors, hue and allowed values, [CSS3 gcpm] CMYK colors and allowed values.

From: Ludger Buenger <ludger.buenger@realobjects.com>
Date: Wed, 29 Jul 2009 13:30:55 +0200
Message-ID: <96458C389BF1724995FFD7FAD8892637350F23@ex.nc-sb.de>
To: <www-style@w3.org>
Hi everyone,

 

We are currently in the process of implementing colors defined in the current working draft of the colors module (and the one color definition from the gcpm module).

 

 

 

Regarding HSL colors:

 

According to the working draft (http://www.w3.org/TR/2008/WD-css3-color-20080721/#hsl-color), HSL colors accept three parameters.

 


The first HSL color parameter represents the hue and accepts numeric values representing an angle and should be interpreted as degrees modulo 360.

 

Since CSS knows unit types representing angles (deg, rad and grad), I'd like to suggest that if an explicit unit type is set, this one should be used, if no unit type is given it should be interpreted as degrees.

Current working draft only permits numeric values.

 

Question: does it make sense to also accept percentage values with 100% equaling 360 degrees?

 

 

The second and third parameter of an HSL color represent saturation and lightness and are defined to be percentages.

 

Here we also have questions:

Does it make sense to accept numeric values if the percent symbol has been omitted and how should they be interpreted?

 

Since the RGB color definition permits both percentage and numeric values, but numeric values are interpreted as a range from 0 to 255 with 255 representing 100%, to me it makes sense to handle this similar in HSL colors.

But I am not a colors expert, so maybe this is a bad idea.

 

 

 

 

Regarding CMYK colors (from the current working draft of CSS3 gcpm http://www.w3.org/TR/2007/WD-css3-gcpm-20070504/#cmyk-colors):

 

According to the example given in the gcpm working draft, the cmyk color function accepts 4 values being numeric float values in the range 0.0 to 1.0 representing the amount of color to be applied.

 

Is there a rationale behind this allowed values definition differing from the definition of the allowed values in the rgb color function?

 

>From my point of view, I would expect the allowed values of the cmyk color function to be analogous to the rgb function:

a percentage value or a value between 0 and 255 with 255 representing 100% - for the sole reason of being defined the same way as rgb colors are defined.

 

 

 

Any comments?

 

 

Best regards,

 

Ludger

 

 

-- 

Dipl.-Inf. Ludger Bünger

Senior Software Engineer

Product Development

- - - - - - - - - - - - - - - -

RealObjects GmbH

Altenkesseler Str. 17/B6

66115 Saarbrücken, Germany

Tel +49 (0)681 98579 0

Fax +49 (0)681 98579 29

http://www.realobjects.com

ludger.buenger@realobjects.com

- - - - - - - - - - - - - - - -

Commercial Register: Amtsgericht Saarbrücken, HRB 12016

Managing Directors: Michael Jung, Markus Neurohr

VAT-ID: DE210373115

 

 
Received on Wednesday, 29 July 2009 11:31:34 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:19 GMT