Sign in
◑
Theme
appsheet-third-party
/
d3
/
6fad0c9d835f72290e25a927029bb603179a1e6a
/
.
/
src
/
color
/
xyz.js
blob: 30e79ab412bf0557483eeb8ffe632036f22ab6f7 [
file
]
function
d3_xyz_lab
(
x
)
{
return
x
>
0.008856
?
Math
.
pow
(
x
,
1
/
3
)
:
7.787037
*
x
+
4
/
29
;
}
function
d3_xyz_rgb
(
r
)
{
return
Math
.
round
(
255
*
(
r
<=
0.00304
?
12.92
*
r
:
1.055
*
Math
.
pow
(
r
,
1
/
2.4
)
-
0.055
));
}