W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2020

Re: [csswg-drafts] [css-color-5] Findings on SCSS function usage to inform direction of Color 5 (#5782)

From: Chris Lilley via GitHub <sysbot+gh@w3.org>
Date: Wed, 16 Dec 2020 20:37:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-746976041-1608151073-sysbot+gh@w3.org>
@argyleink wrote

> Most of the usage we've seen in our teams/careers are super basic color manipulations, and designers aren't complaining about the results." We could pacify the majority of users with basic lighten, darken, mix and alpha functions on srgb colors. To me these results look like clear reasons to simplify,

Most of the usage in SCSS etc uses HSL because **that is all that is available** although I understand @mirisuzanne added some support for LCH recently. So concluding that sRGB-based HSL is all that is needed, because that is what people use, is cyclical.

That said, yes, we clearly need `lighten()` and `darken()` and ideally, they would have a better behavior than the simple addition they have in Sass:

--col1: hsl(120 100% 80%);
--col2: hsl(190 100% 70%);
--col3: hsl(40 100% 60%);
--col1d: lighten(var(--col1),40);
--col2d: lighten(var(--col2),40);
--col3d: lighten(var(--col3),40);
makes them all white. Which might be okay, but I have also been exploring [sigmoid functions](https://en.wikipedia.org/wiki/Sigmoid_function) so there is more of a roll-off at the very light and very dark ends.

GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5782#issuecomment-746976041 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 16 December 2020 20:37:55 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:24 UTC