Handbook
Glossary
>laba ( color -- laba )
CIE 1976 LAB colors
Prev:
<laba> ( l a b alpha -- laba )
Vocabulary
colors
.
lab
Inputs
color
an
object
Outputs
laba
an
object
Definition
IN:
colors.lab
GENERIC:
>laba
( color -- laba )
Methods
USING:
accessors
colors.lab
colors.lch
kernel
locals.backend
math
math.functions
;
M:
LCHab
>laba
[
[
l>>
]
[
c>>
]
[
h>>
]
tri
3
load-locals
0
get-local
deg>rad
load-local
-3
get-local
-2
get-local
0
get-local
cos
*
-2
get-local
0
get-local
sin
*
4
drop-locals
]
[
alpha>>
]
bi
<laba>
;
USING:
colors
colors.lab
kernel
;
M:
object
>laba
>rgba
>laba
;
USING:
colors
colors.lab
colors.xyz
;
M:
rgba
>laba
>xyza
>laba
;
USING:
accessors
colors.lab
colors.xyz
colors.xyz.private
kernel
locals.backend
math
math.functions
;
M:
xyza
>laba
[
[
x>>
wp_x
/
]
[
y>>
wp_y
/
]
[
z>>
wp_z
/
]
tri
[
dup
xyz_epsilon
>
[
1/3
^
]
[
xyz_kappa
*
16
+
116
/
]
if
]
tri@
3
load-locals
116 -1
get-local
*
16
-
500 -2
get-local
-1
get-local
-
*
200 -1
get-local
0
get-local
-
*
3
drop-locals
]
[
alpha>>
]
bi
<laba>
;