Colour vision modes: Protan, Deutan and Tritan in Preferences › Graphics (#778) (#1007)

Colour vision modes (Protan, Deutan, Tritan) in Preferences > Graphics, with palettes, shader and icon colours adapted per mode, translations and tests.
This commit is contained in:
CamWight authored and GitHub committed 2026-10-14 17:35:56 -04:00
1 parent 289b521a65
commit f6a47a49d7
30 files changed
+2077 -166

No files matched your search

+3 -4
View File
@@ -151,13 +151,12 @@ pub(crate) fn curved_arrow(painter: &egui::Painter, at: Pos2, clockwise: bool, h
pub(crate) const AXIS_RADIUS: f32 = 11.0;
pub(crate) fn axis_tip(painter: &egui::Painter, c: Pos2, name: &str, d: &Vec3, at: Pos2, depth: f64, hovered: bool, t: Tokens) {
let col = if d.x != 0.0 {
solidcraft_engine::view::colors::AXIS_X
t.triad[0]
} else if d.y != 0.0 {
solidcraft_engine::view::colors::AXIS_Y
t.triad[1]
} else {
solidcraft_engine::view::colors::AXIS_Z
t.triad[2]
};
let col = Color32::from_rgb(col.0, col.1, col.2);
let positive = !name.starts_with('-');
let ink = if depth < -0.01 { col.gamma_multiply(0.55) } else { col };
painter.line_segment([c, at], Stroke::new(if positive { 2.0 } else { 1.0 }, ink));