Handbook
Glossary
parse-color ( str -- color )
Colors
ยป
Standard color database
Prev:
named-colors ( -- keys )
Next:
COLOR:
Vocabulary
colors
Inputs
str
a
string
Outputs
color
a
color
Word description
Parses a string as a named value or as a hexadecimal value.
Examples
USING: colors prettyprint ; COLOR: sky-blue .
COLOR: sky-blue
USING: colors prettyprint ; COLOR: #336699 .
COLOR: #336699
Definition
USING:
colors.private
kernel
splitting
;
IN:
colors
:
parse-color
( str -- color )
"#"
?head
[
hex>rgba
]
[
named-color
]
if
;