New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-color] `color-mod()` needs a "do not implement" notice #813

Closed
myakura opened this Issue Dec 16, 2016 · 9 comments

Comments

Projects
None yet
5 participants
@myakura
Copy link

myakura commented Dec 16, 2016

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?

@svgeesus

This comment has been minimized.

Copy link
Contributor

svgeesus commented Dec 20, 2016

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.

@svgeesus svgeesus changed the title [css-color] `color-mod()` overrides `color()` [css-color] `color-mod()` needs a "do not implement" notice Dec 20, 2016

@Crissov

This comment has been minimized.

Copy link
Contributor

Crissov commented Dec 20, 2016

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))
@svgeesus

This comment has been minimized.

Copy link
Contributor

svgeesus commented Jan 24, 2017

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.

@jonathantneal

This comment has been minimized.

Copy link
Contributor

jonathantneal commented Sep 12, 2017

color-mod needs a new syntax...

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

@jonathantneal

This comment has been minimized.

Copy link
Contributor

jonathantneal commented Oct 13, 2017

@Crissov, your calc syntax fascinates me. I’m 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?

@sindresorhus

This comment has been minimized.

Copy link

sindresorhus commented May 2, 2018

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

Is anyone able to answer this?

@svgeesus

This comment has been minimized.

Copy link
Contributor

svgeesus commented May 2, 2018

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.

@jonathantneal

This comment has been minimized.

Copy link
Contributor

jonathantneal commented May 3, 2018

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’t profile colors without things like color(). I’m 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’m much less sure about this.

How’d I do? I’m okay with success or failure. One means I might help others. The other means I might learn. 😉

@svgeesus

This comment has been minimized.

Copy link
Contributor

svgeesus commented Aug 17, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment