1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

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:00:56 +01:00
parent 63d3e9e70b
commit 73d16eb771
3 changed files with 104 additions and 53 deletions

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))
}