Function: color-oklab-to-xyz
color-oklab-to-xyz is a byte-compiled function defined in color.el.gz.
Signature
(color-oklab-to-xyz L A B)
Documentation
Convert the OkLab color represented by L A B to CIE XYZ.
Oklab is a perceptual color space created by Björn Ottosson
<https://bottosson.github.io/posts/oklab/>. It has the property that
changes in the hue and saturation of a color can be made while maintaining
the same perceived lightness.
Source Code
;; Defined in /usr/src/emacs/lisp/color.el.gz
(defun color-oklab-to-xyz (l a b)
"Convert the OkLab color represented by L A B to CIE XYZ.
Oklab is a perceptual color space created by Björn Ottosson
<https://bottosson.github.io/posts/oklab/>. It has the property that
changes in the hue and saturation of a color can be made while maintaining
the same perceived lightness."
(let ((ll (expt (+ (* 1.0 l) (* 0.39633779 a) (* 0.21580376 b)) 3))
(mm (expt (+ (* 1.00000001 l) (* -0.10556134 a) (* -0.06385417 b)) 3))
(ss (expt (+ (* 1.00000005 l) (* -0.08948418 a) (* -1.29148554 b)) 3)))
(list (+ (* ll 1.22701385) (* mm -0.55779998) (* ss 0.28125615))
(+ (* ll -0.04058018) (* mm 1.11225687) (* ss -0.07167668))
(+ (* ll -0.07638128) (* mm -0.42148198) (* ss 1.58616322)))))