Csswg-drafts: [css-color] `color-mod()` needs a "do not implement" notice

Created on 16 Dec 2016  路  9Comments  路  Source: w3c/csswg-drafts

the syntax of color-mod() currently is:

color-mod() = color( [ <color> | <hue> ] <color-adjuster>* )

does that mean color-mod() overrides color() or it was just leftouts from renaming?

Closed Accepted as Editorial css-color-4

Most helpful comment

Just hasty renaming.

color-mod needs a new syntax and, possibly, a new name. Meanshile it needs a do-not-implement notice on that section.

All 9 comments

Just hasty renaming.

color-mod needs a new syntax and, possibly, a new name. Meanshile it needs a do-not-implement notice on that section.

A lot of use cases could probably be solved if <color> could be used within calc().

color-mod(blue w(+ 20%) s(+ 20%))
calc(blue + hwb(0 20% 0) + hsl(0 20% 0))
calc(blue * hwb(100% 120% 100%) * hsl(100% 120% 100%))
calc(blue * hwb(1 1.2 1) * hsl(1 1.2 1))

A lot of use cases could probably be solved if could be used within calc()

Agreed. Authors are already used to calc, so extending it to do color math the same as it does length math now, is an interesting way forward.

color-mod needs a new syntax...

What is the reason for this need? Understanding that will make it easier for others to help.

@Crissov, your calc syntax fascinates me. I鈥檓 trying to imagine how it would handle blending, especially in different colorspaces. Can you imagine how that would look, or do you think at that point calc would fall short?

What is the reason for this need? Understanding that will make it easier for others to help.

Is anyone able to answer this?

The old syntax has a lot of issues. It is cumbersme and people report difficulty understanding it. It is not perceptually uniform, being tied to sRGB and HLS colorspace. It is device dependent. It does not take into account wide gamut displays and there is no defined result while using them.

Thanks, @svgeesus! Let me see if I understand your responses.

It is not perceptually uniform.

This refers to the color adjusters? These adjusters change the channels of RGB, HSL, and HWB. For instance, red() adjusts a channel of sRGB, while saturation() adjusts a channel of HSL. However, as far as our minds perceive color, adjusting channels in these spaces produces unexpected results.

It is device dependent.

This refers how we can鈥檛 profile colors without things like color(). I鈥檓 less sure about this one.

It does not take into account wide gamut displays and there is no defined result while using them.

This is about not having a good color space or syntax for producing or manipulating all the perceivable colors that newer devices can now display. I鈥檓 much less sure about this.

How鈥檇 I do? I鈥檓 okay with success or failure. One means I might help others. The other means I might learn. 馃槈

Closing as all the color-mod stuff is now removed (well, commented out). Just removed the one remaining dangling reference (changes section).

Was this page helpful?
0 / 5 - 0 ratings