Terminal colours for formatting.
More...
Terminal colours for formatting.
◆ colour_t
a colour code
| Enumerator |
|---|
| eColourRed | |
| eColourGreen | |
| eColourYellow | |
| eColourBlue | |
| eColourMagenta | |
| eColourCyan | |
| eColourWhite | |
| eColourDefault | |
| eColourCount | |
Definition at line 22 of file colour.h.
◆ colour_get()
get a colours string form from a pallete
- Parameters
-
| colours | the pallete to get the colour from |
| idx | the colour to get |
- Returns
- the colour string
Definition at line 39 of file colour.c.
◆ colour_reset()
get a reset string from a pallete
- Parameters
-
| colours | the pallete to get the reset from |
- Returns
- the reset string
Definition at line 48 of file colour.c.
◆ colour_text()
add colour to a string
- Parameters
-
| context | the context to use |
| idx | the colour to add |
| text | the text to colour |
- Returns
- the coloured string
Definition at line 56 of file colour.c.
◆ colour_vformat()
format a string and add colour to it
- Parameters
-
| context | the context to use |
| idx | the colour to add |
| fmt | the format string |
| args | the format arguments |
- Returns
- the coloured string
Definition at line 76 of file colour.c.
◆ STA_PRINTF()
format a string and add colour to it
- Parameters
-
| context | the context to use |
| idx | the colour to add |
| fmt | the format string |
| ... | the format arguments |
- Returns
- the coloured string
◆ fmt
◆ idx
◆ kColourDefault
a colour pallete that applies ANSI VT100 colours
Definition at line 24 of file colour.c.
◆ kColourNone
a colour pallete that applies no colours
Definition at line 10 of file colour.c.