wijjit.terminal.ansi.colorize
- wijjit.terminal.ansi.colorize(text, color=None, bg_color=None, bold=False, underline=False)[source]
Apply ANSI colors and styles to text.
Respects NO_COLOR environment variable (https://no-color.org/). If NO_COLOR is set, returns text without any ANSI codes.
- Parameters:
- Returns:
Text with ANSI styling applied (or plain text if NO_COLOR is set)
- Return type:
Notes
Respects the NO_COLOR configuration and environment variable standard. See https://no-color.org/ for details.