Replies: 3 comments 14 replies
-
Beta Was this translation helpful? Give feedback.
-
The interpolation and carry forward rules you mention are described in the MDN docs for So the Firefox implementation of |
Beta Was this translation helpful? Give feedback.
-
Yes, I meant first codepen not second, sorry... OK, I didn't realize that Chrome doesn't yet implement gamut mapping and how that would affect this. No worries about how you demonstrated it, I get the idea. Color.js wouldn't be able to demonstrate this anyway, given that Chrome only supports one of the two methods and Firefox can't display |
Beta Was this translation helpful? Give feedback.
-
I asked this question at stackoverflow yesterday and the 1 answer is not definitive, so I thought I'd try to pull in some expertise from you all. I especially want to know which browser is doing it correctly in which cases. Firefox and Chrome are in clear disagreement in the examples I provide, which can be viewed on codepen as:
https://codepen.io/sidewayss/pen/GRLWMmm (same as the example in stackoverflow snippet)
https://codepen.io/sidewayss/pen/NWmpjyz (used in this bug that I might have prematurely filed on Bugzilla for Firefox)
The first example has both Chrome and Firefox handling
none
differently from0
for lightness inlab()
andlch()
, no interpolation. I can only reproduce this browser-polar-opposite effect with the lightness parameter in lch and lab, but my tests have not been exhaustive. If no lightness is black, then all four rectangles should be black, right? If so, then both browsers are wrong, which makes sense because both browsers are treatingnone
and0
differently within a single, not interpolated, color value.The second example is trying to demonstrate specific interpolation differences, but Firefox makes everything monochrome for
none
, i.e.none
and0
don't match within a single color value, no interpolation involved. I assumed that Firefox was in the wrong and submitted that bug report, but I would like some confirmation of who's got it right where, and Bugzilla is slow-moving. I'm trying to create codepen examples of cases wherenone
and0
are interpolated differently so that I can be sure that I understand the rules. I'm usinglinear-gradient()
as my interpolater. This second example above uses colors from the MDN docs on this subject.If, for whatever reason you'd prefer to respond here instead of stackoverflow, please do so and let me know if I may repost it onto stackoverflow.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions