Re: [csswg-drafts] [css-color-4] Are a and b in lab( 0%, a, b ) really powerless? [css-color-4] (#6758)

Ok, that makes sense if I've understood - the powerless concept is used to normalise all the `lab( 0% a b )` blacks to `lab( 0% 0 0 )` which then converts to pure black and avoids the transform matrices adding in non-zero `a` and `b` components and producing nearly black.

Another good reason to use ICC profiles is if they're hardware accelerated. macOS has methods to access GPU accelerated conversions:
https://developer.apple.com/documentation/coregraphics/cgcolorconversioninfo?language=objc
If image colors are converted in hardware using ICC profiles, an implementor might want to convert CSS colors using the same ICC profiles for rendering consistency.

Finally this might be useful - the Safari color space conversion code:
Mostly they have their own implementations for color space conversions, but for some cases they fall back to macOS Core Graphics:
https://github.com/WebKit/WebKit/blob/main/Source/WebCore/platform/graphics/ColorConversion.cpp
https://github.com/WebKit/WebKit/blob/043c907c97abdb8ebee06c6e3830f3165a7c6de2/Source/WebCore/platform/graphics/cg/ColorCG.cpp#L213



-- 
GitHub Notification of comment by dd8
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6758#issuecomment-950709566 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 25 October 2021 09:19:35 UTC