Expand description
Common types and traits for introductory use.
§Examples
For RGB colors without an alpha channel:
use gem::prelude::*;
// 8-bit RGB color
let red = Rgb888::from_rgb(255, 0, 0);
// 32-bit floating point RGB color
let red = Rgbf32::from_rgb(1.0, 0.0, 0.0);Or, with an alpha channel:
use gem::prelude::*;
// 8-bit ARGB color, 50% transparent
let red = Abgr8888::from_abgr(128, 255, 0, 0);
// 32-bit floating point RGB color with alpha, 50% transparent
let red = Rgbaf32::from_rgba(1.0, 0.0, 0.0, 0.5);Re-exports§
pub use crate::alpha::HasAlpha as _;pub use crate::gray::HasGray as _;pub use crate::rgb::Abgr8888;pub use crate::rgb::HasBlue as _;pub use crate::rgb::HasGreen as _;pub use crate::rgb::HasRed as _;pub use crate::rgb::Rgb888;pub use crate::rgb::RgbColor as _;pub use crate::rgb::Rgbaf32;pub use crate::rgb::Rgbf32;