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: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 9 May 2013 13:35:41 -0700
Message-ID: <CAAWBYDDJYEkF_txT1NhY0Z+N+ON-GpNP4p2Q=5gENjgrffdDFQ@mail.gmail.com>
To: François REMY <francois.remy.dev@outlook.com>
Cc: Lea Verou <lea@w3.org>, www-style list <www-style@w3.org>
On Thu, May 9, 2013 at 1:30 PM, François REMY
<francois.remy.dev@outlook.com> wrote:
> ± How about keywords?
>
> How, yes, I like things like
>
>     color(#aaa, 50% of alpha)
>     for #rgba(aa,aa,aa,50%)
>
> and
>
>    color(#aaaa,  10% more alpha, 100% more hue)
>    for the opposite color of #rgb(aa,aa,aa+10%)
>
> Maybe I'm dreaming too much ^_^

Problem with this is that it's unclear if "10% more alpha" means
"alpha + 10%" or "alpha * 110%".  Both are valid English
interpretations.  I like the pure-math version for this reason,
because it's unambiguous but still simple.

(This is why many places where the value is expressed in percentages
will use "percent" and "points" to distinguish between the two cases -
saying something "went up 20 points" means +20%, saying something
"went up 20%" means *1.2.)

~TJ
Received on Thursday, 9 May 2013 20:36:28 UTC

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