showbits/showbits-common/src/color.rs
2024-03-05 00:09:32 +01:00

11 lines
262 B
Rust

use palette::Srgb;
pub trait Color: Copy {
/// Convert to an sRGB color.
///
/// Useful for debugging or dithering.
fn to_srgb(self) -> Srgb;
/// Combine two colors by putting one "over" the other.
fn over(self, below: Self) -> Self;
}