Handbook
Glossary
hwba
HWB colors
Next:
<hwba> ( hue whiteness blackness alpha -- hwba )
Vocabulary
colors
.
hwb
Class description
The class of HWB (Hue, Whiteness, Blackness) colors with an alpha channel. All slots store values in the interval
[0,1]
.
Definition
IN:
colors.hwb
TUPLE:
hwba
{
hue
read-only
}
{
whiteness
read-only
}
{
blackness
read-only
}
{
alpha
read-only
}
;
Methods
USING:
colors.hwb
;
M:
hwba
>hwba
;
inline
USING:
accessors
colors
colors.gray
colors.hsl
colors.hwb
kernel
locals.backend
math
;
M:
hwba
>rgba
[
hue>>
]
keep
[
whiteness>>
]
keep
[
blackness>>
]
keep
[
alpha>>
]
keep
drop
4
load-locals
-2
get-local
-1
get-local
+
load-local
0
get-local
1
>=
-3
get-local
0
get-local
-1
get-local
[
3
load-locals
-2
get-local
-1
get-local
/
0
get-local
<gray>
3
drop-locals
]
curry
curry
curry
-4
get-local
-1
get-local
0
get-local
-3
get-local
[
4
load-locals
-3
get-local
1.0 0.5 -2
get-local
<hsla>
>rgba-components
-1
get-local
0
get-local
[
2
load-locals
-1
get-local
0
get-local
[
2
load-locals
1 -1
get-local
-
*
0
get-local
+
2
drop-locals
]
curry
curry
tri@
2
drop-locals
]
curry
curry
dip
<rgba>
4
drop-locals
]
curry
curry
curry
curry
if
5
drop-locals
;
inline