chickadee » chibi-term » rgb

rgb red-level green-level blue-levelprocedure

Returns a procedure which takes a single argument, a string, and which when called behaves as follows.

If ANSI escapes are enabled, the procedure returns a string consisting of its argument with a prefix that selects specified text color (obtained by calling the rgb-escape procedure with the values of the red-level, green-level, and blue-level arguments) and a suffix that selects the default text color.

If ANSI escapes are not enabled, the procedure returns its argument.

The caller is resonsible for verifying that the terminal supports 256 colors.