Use Grid to add labels to the color picker sliders

Also improve the color preview in the color picker
This commit is contained in:
Emil Ernerfeldt
2021-01-13 23:09:23 +01:00
parent 63d3e9e70b
commit 73d16eb771
3 changed files with 104 additions and 53 deletions
+4
View File
@@ -436,6 +436,10 @@ impl Hsva {
// ------------------------------------------------------------------------
pub fn to_opaque(self) -> Self {
Self { a: 1.0, ..self }
}
pub fn to_rgb(&self) -> [f32; 3] {
rgb_from_hsv((self.h, self.s, self.v))
}