chickadee » chibi-term » gray-background

gray-background gray-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 background color (obtained by calling the gray-background-escape procedure with the values of the gray-level argument) and a suffix that selects the default background color.

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

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