![]() |
Consolix
|
This module provides utilities for managing text colors in the console. It includes functions for styling text output in the console using color codes.
consolix::color
: Sets the text color for console output.The ColorManipulator
class enables color support for Windows consoles. It is utilized by the CONSOLIX_STREAM
macro to provide colorized console output.
The text colors are defined in the TextColor
enumeration:
Colors are converted to ANSI escape codes using the function:
This allows seamless integration with Linux and macOS terminals by embedding ANSI escape codes into the output string.
On Windows, colors are converted to console attributes using:
This enables color rendering in Windows terminals by setting the console text attributes.