add helper to extract the srgba tuple without converting to linear

This commit is contained in:
Wez Furlong committed 2018-08-04 11:07:27 -07:00
1 parent 0fca6fb730
commit 67128704ff
1 file changed
+5
+5
View File
@@ -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()
}