You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For each color, Sass keeps track of its hue, saturation, and lightness. Even when a color is completely grayscale, it still has a hue component so that should it ever be resaturated, it retains its original color. We want scale-color(scale-color($color, $saturation: -100%), $saturation: 100%) to be the same as scale-color($color, $saturation: 100%).
This raises the question of what happens when you try to saturate a color that was originally grayscale. It has no original hue, so we have to choose one arbitrarily. We end up choosing red, since that's hue 0.
We could have some sort of "originally-grayscale" flag that we keep track of for each color which indicates that it can't have its saturation increased, but that raises a bunch of issues of its own. It means that scale-color($color, $saturation: 10%) may or may not return a color with increased saturation, depending on how $color was created. It would also mean that change-color(saturate($color, 10%), $hue: 120deg) is no longer always equivalent to saturate(change-color($color, $hue: 120deg), 10%).
tl;dr
There's a bunch of desired behaviors color function that can't all work simultaneously. In this case, "work exactly like Photoshop" gave way in favor of other behaviors.
Should be
You can check in Photoshop.
The text was updated successfully, but these errors were encountered: