mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 06:10:06 -04:00
color picker: just copy the r,g,b,a values without a "rgba(…)" wrapper
This commit is contained in:
@@ -212,7 +212,7 @@ fn color_text_ui(ui: &mut Ui, color: impl Into<Color32>) {
|
|||||||
));
|
));
|
||||||
|
|
||||||
if ui.button("📋").on_hover_text("Click to copy").clicked() {
|
if ui.button("📋").on_hover_text("Click to copy").clicked() {
|
||||||
ui.output().copied_text = format!("rgba({}, {}, {}, {})", r, g, b, a);
|
ui.output().copied_text = format!("{}, {}, {}, {}", r, g, b, a);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user