Files
ccvl/src/image/srgb.rs
T
2026-10-26 11:39:45 +00:00

28 lines
481 B
Rust

use ccvl_proc_macros::Pixel;
#[derive(Clone, Copy, Debug, PartialEq, Pixel)]
pub struct SRGBA {
pub r: f32,
pub g: f32,
pub b: f32,
pub a: f32,
}
#[derive(Clone, Copy, Debug, PartialEq, Pixel)]
pub struct SRGB {
pub r: f32,
pub g: f32,
pub b: f32,
}
impl SRGBA {
pub fn new(r: f32, g: f32, b: f32, a: f32) -> Self {
Self { r, g, b, a }
}
}
impl SRGB {
pub fn new(r: f32, g: f32, b: f32) -> Self {
Self { r, g, b }
}
}