5 releases
Uses new Rust 2024
new 0.2.3 | Mar 9, 2025 |
---|---|
0.2.2 | Oct 14, 2024 |
0.2.1 | May 14, 2024 |
0.2.0 | Oct 10, 2022 |
0.1.0 | Sep 30, 2021 |
#488 in Images
108 downloads per month
Used in 2 crates
15KB
225 lines
Simple color
A minimal Rust library for basic color handling with optional parsing and serialization.
Features
- 🎨 a
Color
type for RGB(A) representation - 🛠️
const
constructors and builder pattern - 📝 Hex string parsing (
"FF8000"
→Color
) - 📦 Optional features for real-world use cases
For more information have a look at the documentation.
lib.rs
:
A minimal color handling library.
Parsing and serialization are optionally supported.
All color constructors support const
evaluation.
Basic Usage
use simple_color::Color;
// Predefined colors
let white = Color::WHITE;
let red = Color::RED;
// Custom colors
let yellow = Color::rgb(0xFF, 0xFF, 0);
let transparent_blue = Color::rgba(0, 0, 0xFF, 0x80);
Dependencies
~230–740KB
~17K SLoC