Handbook
Glossary
hsla
HSL colors
Next:
<hsla> ( hue saturation lightness alpha -- hsla )
Vocabulary
colors
.
hsl
Class description
The class of HSL (Hue, Saturation, Lightness) colors with an alpha channel. All slots store values in the interval
[0,1]
.
Definition
IN:
colors.hsl
TUPLE:
hsla
{
hue
read-only
}
{
saturation
read-only
}
{
lightness
read-only
}
{
alpha
read-only
}
;
Methods
USING:
colors.hsl
;
M:
hsla
>hsla
;
inline
USING:
accessors
colors
colors.hsl
colors.hsl.private
combinators
kernel
locals.backend
math
;
M:
hsla
>rgba
{
[
hue>>
]
[
saturation>>
]
[
lightness>>
]
[
alpha>>
]
}
cleave
[
3
load-locals
-1
get-local
zero?
0
get-local
[
load-local
0
get-local
0
get-local
0
get-local
1
drop-locals
]
curry
0
get-local
-1
get-local
-2
get-local
[
3
load-locals
-2
get-local
0.5
<
-2
get-local
-1
get-local
[
2
load-locals
-1
get-local
0
get-local
1
+
*
2
drop-locals
]
curry
curry
-2
get-local
-1
get-local
[
2
load-locals
-1
get-local
0
get-local
+
-1
get-local
0
get-local
*
-
2
drop-locals
]
curry
curry
if
load-local
-3
get-local
2
*
0
get-local
-
load-local
0
get-local
-1
get-local
-2
get-local
1/3
+
value
0
get-local
-1
get-local
-2
get-local
value
0
get-local
-1
get-local
-2
get-local
1/3
-
value
5
drop-locals
]
curry
curry
curry
if
3
drop-locals
]
dip
<rgba>
;
inline