8.16.0.4
2 Color Support
(require tui/ubuf/color) | package: tui-ubuf |
This module provides rudimentary support for working with indexed and direct color (truecolor) in a way that can be used for setting terminal cell foreground and background.
procedure
(make-ubuf-truecolor r g b) → fixnum?
r : byte? g : byte? b : byte?
Creates a truecolor representation from given r, g
and b values. The value 0 represents no intensity of
given color component and value 255 is the maximum intensity
of such component.
procedure
(split-ubuf-truecolor rgb) →
byte? byte? byte? rgb : fixnum?
Returns the three color components of given truecolor value.
procedure
(ubuf-truecolor? v) → boolean?
v : fixnum?
Returns #t if given value v represents a valid
truecolor.
procedure
(ubuf-truecolor-red rgb) → byte?
rgb : fixnum? (ubuf-truecolor-green rgb) → byte? rgb : fixnum? (ubuf-truecolor-blue rgb) → byte? rgb : fixnum?
Returns the red, green, or blue component of given rgb
truecolor respectively.
procedure
(ubuf-indexed-color? v) → boolean?
v : fixnum?
Returns #t if given v is an indexed color.
procedure
(ubuf-color? v) → boolean?
v : fixnum?