Handbook
Glossary
contrast-ratio ( color1 color2 -- n )
Vocabulary
colors
.
contrast
Inputs
color1
an
object
color2
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
;
IN:
colors.contrast
:
contrast-ratio
( color1 color2 -- n )
[
relative-luminance
]
bi@
2dup
<
[
swap
]
when
[
0.05
+
]
bi@
/
;