-
Notifications
You must be signed in to change notification settings - Fork 746
Closed
Labels
Closed Accepted as Obvious BugfixClosed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.Used when the issue is more of a question than a problem, and it's been answered.css-color-4Current WorkCurrent Work
Description
According to the spec, "The first argument specifies the CIE Lightness, L. This is a number between 0% or 0 (representing black) and 100% or 100 (representing white), Values less than 0% or 0 must be clamped to 0% at parsed-value time; values greater than 100% or 100 are clamped to 100% at parsed-value time"
With the current color conversion algorithm, both Chrome and Safari are still using a and b (or c and h) when lightness is at 0% or 100%. example: https://jsfiddle.net/orah1qd2/ lab(0, 100, 100) is showing as some shade of red instead of black.
I am trying to understand how the color conversion works for lightness at 0% or 100%.
- Does it follow the current conversion algorithm and convert to White/Black when lightness is at 0% or 100%? The issue is it will not create a nice color spectrum and users might be surprised to see this when the color doesn't change with a and b (or c and h) for l at 0 (or 100).
- Or our current color conversion algorithm is wrong, and we should rewrite and convert to black and white smoothly as lightness hit 0% or 100%? I think the issue here is that color spectrum would look very different.
Thank you for helping.
Metadata
Metadata
Assignees
Labels
Closed Accepted as Obvious BugfixClosed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.Used when the issue is more of a question than a problem, and it's been answered.css-color-4Current WorkCurrent Work