Colored Next (CNXT)
A fork of colored which introduces better functionalities.
Usage
Coloring your terminal made simple. You already know how to do it.
Basic

Advanced
-
For Windows targets, add this to enable colors in Windows CMD:
set_virtual_terminal;Comparison of colors with virtual terminal disabled vs enabled.

-
CNXT automatically detects terminal color support across 3 levels:
Ansi16Ansi256TrueColor
When using colors beyond your terminal's capabilities, CNXT automatically downgrades them to the maximum supported level.
use ; // By default, the support level is detected from environment from_env // You can explicitly set the support level: set_should_colorize; // Enable colorization with true color support set_should_colorize; // Enable colorization with 256 color support // Simple on/off control: set_should_colorize; // Disable colorization set_should_colorize; // Enable colorization // Reset to environment-based detection: set_should_colorize;And for manual color fallback control:
use Color; let color = TrueColor ; let ansi16_color = color.fallback_to_ansi16; # or let ansi256_color = color.fallback_to_ansi256;