W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css4-color] #RGBA

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 9 Sep 2010 20:16:17 -0700
Message-ID: <AANLkTinbwLdsLFUtFRXLq_dxw9J2Gj6OsonfH5igFSDR@mail.gmail.com>
To: Patrick Garies <w3c.www-style@patrick.garies.name>
Cc: mollyh@opera.com, Brian Manthos <brianman@microsoft.com>, Christoph Päper <christoph.paeper@crissov.de>, "www-style@w3.org list" <www-style@w3.org>
On Thu, Sep 9, 2010 at 7:36 PM, Patrick Garies
<w3c.www-style@patrick.garies.name> wrote:
> On 2010-09-06 1:38 PM, Molly E. Holzschlag wrote:
>>
>> So even if there were a way to shorthand HSL it doesn't make sense from
>> a design standpoint to do so. It's a shorthand in and of itself.
>
> While I don’t think an |#RGB|‐ or |#RRGGBB|‐like syntax is a good idea for
> HSL (as Brian apparently suggested), I can see a good reason from a “design
> standpoint” to abbreviate the HSL syntax further. As someone who uses
> all‐gray or nearly all‐gray palettes, I find it to be somewhat tedious and
> messy to have to use |hsl(<H>, <S>, <L>)| when the first two arguments are
> completely irrelevant.
>
> Something like |hsl(<L>)| or |l(<L>)| where the hue and saturation are
> assumed to be zero (and which I’ve previously proposed as |rgb(<RGB>)| for
> the same reasons) would make this easier.

If you're using an all-gray palette, I don't think it's very taxing to
say hsl(0,0%,<gray%>).  Not as terse as possible, but pretty good.

If we were to specifically address the use-case of "make creating gray
colors as terse as possible", I'd just create a gray() function that
took a percentage.  That's much clearer than some single-argument
version of rgb() or hsl().

~TJ
Received on Friday, 10 September 2010 03:17:16 GMT

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