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: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Wed, 8 May 2013 12:52:06 +0200
Message-ID: <CAERejNZ4K9eQxOT2tN7sBvKjM+Av7vO7v7sdRkWLLYwXCkg0-A@mail.gmail.com>
To: Jake Archibald <jaffathecake@gmail.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Lea Verou <lea@w3.org>, Šime Vidas <sime.vidas@gmail.com>, www-style list <www-style@w3.org>
Since different kinds of color values are involved in these examples, using
rgba() doesn't make sense here. alpha() seems more logical to me.

Sebastian

On Wed, May 8, 2013 at 11:01 AM, Jake Archibald <jaffathecake@gmail.com>wrote:

> +1 to rgba(color-value, alpha-value) or a new function that takes those
> arguments
>
> Eg:
>
> rgba(#f00, 0.5);
> rgba(#f00, 50%);
> rgba(red, .5);
> rgba(rgb(255, 0, 0), 50%); /* not particularly useful, but showing that
> any color value is acceptable */
> rgba(#f000, 50%); /* here the 50% alpha would take precedence over the 0
> alpha in the first arg */
>
> As for darken/lighten/etc, I can't say I've used them much, but if others
> do, fair enough.
>
>
> On 7 May 2013 17:21, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>
>> On Tue, May 7, 2013 at 6:45 AM, Lea Verou <lea@w3.org> wrote:
>> > I think we’re starting to need color manipulation functions. They are
>> going
>> > to be immensely useful when combined with variables too, but also
>> different
>> > color formats, named colors etc. For example, LESS has color functions
>> like
>> > alpha(), darken(), lighten() etc.
>>
>> This. Every preprocessor has color-manipulation functions, and from
>> what I understand, they're used quite regularly.  I plan to put them
>> into my unofficial draft - we'll see what ends up showing up in Colors
>> 4.
>>
>> ~TJ
>>
>>
>
Received on Wednesday, 8 May 2013 10:52:53 UTC

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