W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [css-color] Have you considered standardizing a rgba(#RRGGBB, <alpha-value>) notation?

From: Lea Verou <lea@w3.org>
Date: Thu, 9 May 2013 23:16:52 +0300
Cc: Sebastian Zartner <sebastianzartner@gmail.com>, Jake Archibald <jaffathecake@gmail.com>, Šime Vidas <sime.vidas@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <8EE574DB-8A93-4E04-B4FC-2E919E1063E2@w3.org>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
How about keywords?

e.g. alpha(red, 50% smaller)
or alpha(red, reduce by 50%)
or alpha(red, 50% less)

you get the idea

PS: Why use two word function names? alpha() is only a bit less understandable (if at all) than adjust-alpha() or set-alpha() and much more concise.

Lea Verou
W3C developer relations
http://w3.org/people/all#leahttp://lea.verou.me ✿ @leaverou






On May 9, 2013, at 23:08, Tab Atkins Jr. wrote:

> On Thu, May 9, 2013 at 1:06 PM, Lea Verou <lea@w3.org> wrote:
>> I think having two functions for very similar functionality (absolute vs relative adjustment) is a bit clumsy and inelegant. Apart from that, great idea! Not sure adjusting RGB channels is useful, but adjusting HSL channels is super useful.
> 
> It would be convenient if we could distinguish between "+50%" and
> "50%", but you can't.
> 
> On the other hand, we could go the calc route and require a space, so
> that "adjust-alpha(red, 50%)" would set the alpha to 50%, but
> "adjust-alpha(red, + 50%)" would make the alpha 50% larger.  Seems
> kinda clumsy, though.
> 
> ~TJ
> 
Received on Thursday, 9 May 2013 20:17:01 UTC

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