Color Parser
A simple and lightweight Rust library to parse hex color codes.
Supports:
- 3-digit shorthand (
#FA3
) - 4-digit shorthand with alpha (
#FA3C
) - Full hex (
#FFAABB
) - Full hex with alpha (
#FFAABBCC
)
Usage
use parse_hex_color;
let color = parse_hex_color.unwrap;
println!; // Rgba { red: 255, green: 170, blue: 187, alpha: 255 }
Features
- Support for RGBA values
- Support for shorthand syntax
- CLI support
- Support for HSV, HSL, CMYL parsing