4 releases
Uses new Rust 2024
| 0.1.0-alpha.4 | Jul 29, 2025 |
|---|---|
| 0.1.0-alpha.2 | Jul 28, 2025 |
| 0.0.1 |
|
| 0.0.0 |
|
#1166 in Algorithms
66KB
1.5K
SLoC
gem
Color representations and conversions.
Examples
cargo run --example draw-png --features bytemuck
use gem::prelude::*;
let mut red_box_50x50 = vec![Abgr8888::new_red(0xFF); 50 * 50];
// Make a semi-transparent blue box in the middle of the image
for y in 0..50 {
for x in 0..50 {
if (10..40).contains(&x) && (10..40).contains(&y) {
red_box_50x50[y * 50 + x] = Abgr8888::new(128, 0, 255, 128);
}
}
}

Contributing
This project uses just to run commands the same way as the CI:
cargo just checkto check formatting and lints.cargo just coverageto generate and preview code coverage.cargo just docto generate and preview docs.cargo just testto run tests.
For a full list of commands, see the Justfile.
Dependencies
~120KB