gem

Crates.iogem
lib.rsgem
version0.1.0-alpha.4
created_at2017-06-15 20:04:59.115866+00
updated_at2025-07-29 22:53:43.6482+00
descriptionColor representations and conversions
homepage
repositoryhttps://github.com/crates-lurey-io/gem
max_upload_size
id19109
size93,501
admins (github:crates-lurey-io:admins)

documentation

README

gem

Color representations and conversions.

Test Docs Crates.io Version codecov

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);
        }
    }
}

Example

Contributing

This project uses just to run commands the same way as the CI:

  • cargo just check to check formatting and lints.
  • cargo just coverage to generate and preview code coverage.
  • cargo just doc to generate and preview docs.
  • cargo just test to run tests.

For a full list of commands, see the Justfile.

Commit count: 0

cargo fmt