Handbook
Glossary
factorcode.org
rgba>hex ( rgba -- hex )
HEX colors
Prev:
hex>rgba ( hex -- rgba )
Next:
HEXCOLOR:
Vocabulary
colors.hex
Inputs
rgba
a
color
Outputs
hex
a
string
Word description
Converts a
color
into a hexadecimal string value.
Definition
USING:
accessors
formatting
kernel
math
;
IN:
colors.hex
:
rgba>hex
( rgba -- hex )
[
red>>
]
[
green>>
]
[
blue>>
]
tri
[
255
*
>integer
]
tri@
"%02X%02X%02X"
sprintf
;