add helper to extract the srgba tuple without converting to linear
This commit is contained in:
1 parent
0fca6fb730
commit
67128704ff
1 file changed
+5
@@ -74,6 +74,11 @@ impl RgbColor {
|
||||
.into_linear()
|
||||
}
|
||||
|
||||
pub fn to_tuple_rgba(&self) -> RgbaTuple {
|
||||
Srgba::<u8>::new(self.red, self.green, self.blue, 0xff)
|
||||
.into_format().into_components()
|
||||
}
|
||||
|
||||
pub fn to_linear_tuple_rgba(&self) -> RgbaTuple {
|
||||
self.to_linear().into_components()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user