Re: [css-color] wider/deeper colors

> On Feb 11, 2016, at 09:40, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> On Wed, Feb 3, 2016 at 1:51 AM, Dean Jackson <dino@apple.com> wrote:
>>>> 2. We will add a new function for describing colors that accepts a
>>>> color-profile name and a variable number of arguments. e.g.
>>>> color("bt2020", 0.7, 0.3, 0.1). The name can be linked to a
>>>> @color-profile, but we will also have some predefined keywords for
>>>> the most common profiles.
>>> 
>>> Yes, exactly. I was thinking of icc rather than color, which is
>>> shorter and more descriptive (these are icc profiles).
>> 
>> That sounds fine by me.
> 
> Yeah, I like icc() fine.
> 
> Note to Chris: per fantasai's and my general rule that functions are
> just a way of separating/naming chunks of CSS syntax and act like
> normal CSS syntaxes, let's omit commas unless necessary.  In
> particular, icc() should probably have the grammar:
> 
> icc( <string> <number>+ , <alpha-value>? )


Bikesheding the function name aside, I think it would be good if the syntax could allow things like:

  color("pantone" "P 71-7 C")

which makes me think the syntax should be something like

  color( <string> [ <number>+ | <string> ] [, <alpha-value> ]? )

Maybe custom properties mean that we don't need a special syntax for named colors, but I would still much prefer being able to say 
  background: color("pantone" "P 71-7 C");
than
  background: var(--pantone_P_71-7_C);

 - Florian

Received on Thursday, 11 February 2016 11:45:27 UTC