-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[css-color] Finally remove color-mod() so that people will stop refer…
…ring to it; when we add it back it will have different syntax.
- Loading branch information
Showing
1 changed file
with
3 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
034b063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tabatkins @svgeesus Why was this removed? This is a common problem space and with custom properties this even more desired.
034b063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good feature, bad syntax, and needed to be based on lab space, not rgb. Until someone properly worked on it, it was misleading lots of people.
034b063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tabatkins Is HSL an appropriate color space for this feature? If not, is there anywhere someone like myself could read about the pros of LAB vs HSL? Or, is it just that it should default to LAB instead of RGB?
034b063
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very much not, unfortunately - HSL is just a slightly tweaked version of RGB. (Take the RGB cube and set it so that it's resting on its black corner, with the white corner on top - the six pure colors then zig-zag around the center in red-yellow-green-cyan-blue-magenta order. This is 90% of the RGB->HSL transformation, and I'm being completely serious, it's just a little tweak in how you set up the axises in the space and then some minor scaling.)
@svgeesus can probably point you to learning resources, but the core detail is that Lab is based on human perception, not computer-display convenience, and as a result it was able to be designed so that its axises are actually independent. If you change the hue but leave the lightness alone, the colors you get are actually the same lightness, whereas when you change the hue in HSL your brightness values swing all over the map. (
hsl(60deg, 100%, 50%)
(bright yellow) andhsl(240deg, 100%, 50%)
(bright blue) are dramatically different in actual brightness; text that can be easily read on a blue background can easily be totally unreadable on yellow, and vice versa.) Because of this, the notion of a "hue adjuster" or "lightness adjuster" in HSL (or any of the RGB-derived colorspaces) is fundamentally flawed and only of limited usefulness.This nice SE answer goes into slightly more detail without getting too technical.