From c1d5bda1437d819daba78d185eb2d710bd019778 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 21 Mar 2021 16:15:13 +0100 Subject: [PATCH] ColorPicker: always show hue slider at full saturation and lightness Closes https://github.com/emilk/egui/issues/230 --- egui/src/widgets/color_picker.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/egui/src/widgets/color_picker.rs b/egui/src/widgets/color_picker.rs index 4724166a..1c87035d 100644 --- a/egui/src/widgets/color_picker.rs +++ b/egui/src/widgets/color_picker.rs @@ -290,7 +290,15 @@ fn color_picker_hsvag_2d(ui: &mut Ui, hsva: &mut HsvaGamma, alpha: Alpha) { let HsvaGamma { h, s, v, a: _ } = hsva; - color_slider_1d(ui, h, |h| HsvaGamma { h, ..opaque }.into()); + color_slider_1d(ui, h, |h| { + HsvaGamma { + h, + s: 1.0, + v: 1.0, + a: 1.0, + } + .into() + }); ui.label("Hue"); ui.end_row();