Module color

Module color 

Source
Expand description

Utilities for setting and resetting color.

By default, the feature color_stack is enabled. This adds a global, static stack to keep track of coloring. These utilities can also be used directly via the following functions:

Without color_stack, the functions in with don’t nest well: when the inner one exits, the color will be reset to normal, rather than continue the color that the outer function set.

Modules§

de
Decolor your text.
with
Color your text through closures.

Functions§

bg
Set the background color.
fg
Set the foreground color.
pop_bg
Pops a color off of the background color stack.
pop_fg
Pops a color off of the foreground color stack.
push_bg
Pushes a color onto the background color stack.
push_fg
Pushes a color onto the foreground color stack.
push_tc_bg
Pushes an RGB color onto the background color stack.
push_tc_fg
Pushes an RGB color onto the foreground color stack.
tc_bg
Set the background color, using true-color.
tc_fg
Set the foreground color, using true-color.