Expand description
§make_colors
A simple, powerful and cross-platform Rust library for adding colors to your terminal output.
§Features
- 🎨 Support for standard terminal colors (16 colors)
- 🌈 Hex color support (#00FFFF)
- 🎯 RGB color support (0-255 for each channel)
- 📝 Simple and intuitive API
- 🖋 Attributes support (bold, underline, italic, etc.)
- 🔧 Flexible formatting with multiple notations
§Quick Start
use make_colors::*;
// Simple colored text
println!("{}", make_colors("Hello World!", "red", None));
// With background
println!("{}", make_colors("Important", "white", Some("red")));
// Using hex colors
println!("{}", make_colors_hex("Cyan text", "#00FFFF", None));
// Using RGB
println!("{}", make_colors_rgb("Custom color", (255, 100, 50), None));Modules§
- ansi
- ANSI color codes for standard colors
Macros§
Structs§
- Color
Builder - Builder pattern for creating colored text
Enums§
- Make
Colors Error - Errors that can occur when using make_colors
Functions§
- hex_
to_ rgb - Convert hex color string to RGB tuple
- make_
colors - Main function to colorize text with named colors
- make_
colors_ hex - Colorize text using hex color codes
- make_
colors_ hex_ with_ attrs - Colorize text using hex colors with attributes
- make_
colors_ rgb - Colorize text using RGB values
- make_
colors_ rgb_ with_ attrs - Colorize text using RGB values with attributes
- make_
colors_ with_ attrs - Colorize text with attributes