Expand description
Terminal color utilities for visualization Terminal color utilities for visualization output
This module provides utilities for adding colors to terminal output.
Structs§
- Color
Options - Colorization options for terminal output
Enums§
Constants§
- RESET
- ANSI reset code
Functions§
- color_
legend - Build a color legend for confusion matrix or other visualizations
- colored_
metric_ cell - Generate table cell content with appropriate color based on value
- colored_
string - Helper function to conditionally create a string with ANSI coloring for terminal output
- colorize
- Colorize text with a foreground color
- colorize_
and_ style - Colorize and style text
- colorize_
bg - Colorize text with a background color
- gradient_
color - Get the appropriate color based on a value’s position in a range Returns red for values close to 0.0, yellow for values around 0.5, and green for values close to 1.0
- heatmap_
cell - Generate a heatmap cell with color gradient for confusion matrix
- heatmap_
color_ legend - Build a detailed heatmap color legend
- heatmap_
gradient_ color - Generate a more fine-grained gradient color for heatmap visualizations This provides a more detailed color spectrum for visualizing data with subtle differences Returns a spectrum from cool (blues/purples) for low values to warm (reds/yellows) for high values
- stylize
- Style text with a text style
- supports_
color - Detect if the terminal supports colors