Handbook
Glossary
rgb>gray ( r g b -- color )
Vocabulary
io
.
streams
.
256color
.
private
Inputs
r
an
object
g
an
object
b
an
object
Outputs
color
an
object
Definition
USING:
combinators
math
math.order
;
IN:
io.streams.256color.private
::
rgb>gray
( r g b -- color )
{
{
[
r 0 4
between?
]
[
16
]
}
{
[
r 5 8
between?
]
[
232
]
}
{
[
r 238 246
between?
]
[
255
]
}
{
[
r 247 255
between?
]
[
231
]
}
[
r 8
-
10
/i
232
+
]
}
cond
;