game.utils.colors
utils/colors.py
ANSI color utilities for cli/terminal output.
Uses colorama for crossplatform compatibility. Colors disabled if NO_COLOR set or output is not a terminal (tty).
Functions
|
Bold text. |
|
Dimmed text. |
|
Bold red text. |
|
Bold cyan text. |
|
Bold green text. |
|
Bold yellow text. |
- game.utils.colors._c(code: str, s: str) str
Wrap string s with ANSI color code code
- game.utils.colors.bold(s)
Bold text.
- game.utils.colors.dim(s)
Dimmed text.
- game.utils.colors.err(s)
Bold red text.
- game.utils.colors.info(s)
Bold cyan text.
- game.utils.colors.ok(s)
Bold green text.
- game.utils.colors.warn(s)
Bold yellow text.