| Crates.io | color_parser_lib |
| lib.rs | color_parser_lib |
| version | 0.1.1 |
| created_at | 2025-04-27 06:37:37.299275+00 |
| updated_at | 2025-04-27 15:48:42.378874+00 |
| description | A simple hex color parser that supports shorthand and alpha channels |
| homepage | |
| repository | https://github.com/Mr-Unforgettable/color_parser |
| max_upload_size | |
| id | 1650847 |
| size | 26,919 |
A simple and lightweight Rust library to parse hex color codes.
Supports:
#FA3)#FA3C)#FFAABB)#FFAABBCC)use color_parser::parse_hex_color;
let color = parse_hex_color("#FFAABB").unwrap();
println!("{:?}", color); // Rgba { red: 255, green: 170, blue: 187, alpha: 255 }