- From: Chris Lilley via GitHub <sysbot+gh@w3.org>
- Date: Thu, 13 May 2021 16:00:47 +0000
- To: public-houdini-archive@w3.org
> Is this sort of "temporarily switch to another colorspace for modification, then switch back" a common thing in your experience? Obviously it can be done as you do above, where you create a second object, fiddle with it, then put the results back into the first object. It is nicer for the creation and deletion to happen out of sight though. Places where these implicit colorspace conversions happen (not necessarily mutating the original): - composite `c1` over `c2` in XYZ or in sRGB - interpolate `c1` to `c2` in `colspace` to make a gradient - mix `c1` with `c2` in proportions `x:y` in `colspace` (for example, in LCH) - calculate D65 relative luminance of `c1` and `c2`, compare to find the lighter, then compute `(lighter +.05) / (darker +.05)` (WCAG 2.1 contrast) In all cases `c1` and `c2` need not be in the same colorspace, and need not be in the computation colorspace. The calculation should not need to special case if c1 or c2 happen to have been specified be in a legacy sRGB format (HSL, hex, etc) -- GitHub Notification of comment by svgeesus Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1034#issuecomment-840659061 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 13 May 2021 16:00:49 UTC