Skip to content

Commit 43d9791

Browse files
committed
Final tweak to ansi docs
1 parent f4844b8 commit 43d9791

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/ansi.rst

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ Constants and Functions
1717

1818
``compose`` is built on top of a large number of underlying functions and constants.
1919

20+
ANSI supports eight named colors, each with a bright variant.
2021
For each of the supported colors (black, red, green, yellow, blue, magenta, cyan, and white) there will be four functions and four constants:
2122

22-
* *color* - function to set text color
23-
* *color*-bg - function to set background color
24-
* bright-*color* - function to set enable bright text and the text color
25-
* bright-*color*-bg - function to enable bright text and the background color
26-
* *color*-font - constant that enables the text color
27-
* *color*-bg-font - constant that enables the color as background
28-
* bright-*color*-font - constant that enables the text color in bright
29-
* bright-*color*-bg-font - constant that enables the bright color as background
23+
* [bright-] *color* - function to set foreground text color
24+
* [bright-] *color*-bg - function to set background color
25+
* [bright-] *color*-font - constant that enables the text color
26+
* [bright-] *color*-bg-font - constant that enables the color as background
3027

31-
The functions are passed a string and wrap the string with ANSI codes to enable an ANSI graphic representation for the text, with a reset after the text.
28+
For example, for the color green there will be ``green``, ``green-bg``, ``bright-green``, and ``bright-green-bg`` functions,
29+
and constants ``green-font``, ``green-bg-font``, ``bright-green-font``, and ``bright-green-bg-font``.
30+
31+
The functions are passed a string and wrap the string with ANSI codes to enable the font characteristics, with
32+
a reset after the string.
3233

3334
Note that the exact color interpretation of the ANSI codes varies significantly between platforms and applications, and
3435
is frequently configurable, often using themes.

0 commit comments

Comments
 (0)