diff --git a/src/types.rs b/src/types.rs index b5c271c..65a5cd1 100644 --- a/src/types.rs +++ b/src/types.rs @@ -24,6 +24,10 @@ impl ColorSpace { pub const fn is_linear(self) -> bool { matches!(self, Self::Linear) } + + pub const fn as_u8(self) -> u8 { + self as u8 + } } impl Default for ColorSpace {