Re: [csswg-drafts] [css-color] Add OKLab, OKLCH (#6642)

There was a question on the 13 Oct call about implementation complexity. I added [conversion of XYZ to and from OKLab](https://drafts.csswg.org/css-color-4/Overview.html#color-conversion-code) to the end of the sample code section, which as I said on the call is simply a 3x3 matrix multiply, cube root, another 3x3 matrix multiply.

```js
  var LMS = multiplyMatrices(XYZtoLMS, XYZ);
  return multiplyMatrices(LMStoOKLab, LMS.map(c => Math.cbrt(c)));
```

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


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

Received on Thursday, 14 October 2021 15:50:49 UTC