W3C home > Mailing lists > Public > www-style@w3.org > August 2014

[css-color] Remove gray() Notation

From: Patrick Dark <www-style.at.w3.org@patrick.dark.name>
Date: Sat, 16 Aug 2014 22:58:49 -0500
Message-ID: <53F02879.3040407@patrick.dark.name>
To: www-style@w3.org
I would suggest scrapping the gray() notation and replacing it with the following:

• hsl(<lightness>) where hue = 0deg and saturation = 0%
• hsla(<lightness>, <alpha>) where hue = 0deg and saturation = 0%

These notations have the following authoring advantages over the gray() notation:
• Hue and saturation can be added without replacing or removing parts of a preexisting value; only additions are required.
• Hue and saturation can be removed by simply deleting preexisting values.

Better yet, extend the aforementioned advantages by modifying the HSL notation to be less restrictive:
• hsl(<hue>, <saturation>, <lightness>, <alpha>)
• hsl(<lightness>) where hue = 0deg, saturation = 0%, and alpha = 100%
• hsl(<lightness>, <alpha>) where hue = 0deg and saturation = 0%
This proposal is compatible with rgb()- and rgba()-based equivalents (which I wouldn't use because I consider RGB unintuitive for anything other than copying-and-pasting).

— Patrick
Received on Sunday, 17 August 2014 03:59:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:45 UTC