mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.16k stars 22.46k forks source link

missing important note - feColorMatrix uses linearRGB by default #34444

Open Sainan opened 3 months ago

Sainan commented 3 months ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/feColorMatrix

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

It took me ages to figure out that it uses linearRGB instead of sRGB and I was dumbfounded by how seemingly simple multiplications (0.5) were returning completely insane results (188).

What did you expect to see?

color-interpolation-filters="sRGB"

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

bsmth commented 3 months ago

Thanks for raising this one. Indeed it looks like the note here applies: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/color-interpolation-filters

I feel like all the filter primitives listed here https://drafts.fxtf.org/filter-effects/#filter-primitive (except for feOffset, feImage, feTile and feFlood) could do with an extra sentence or a note that links to color-interpolation-filters and mentions the default color space of those operations.