rgb>gray ( r g b -- color )


Vocabulary
io.streams.256color.private

Inputs
ran object
gan object
ban object


Outputs
coloran object


Definition


:: 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 ;