diff --git a/assets/styles/ui/themes/clay-dark.json b/assets/styles/ui/themes/clay-dark.json new file mode 100644 index 000000000..cc78eeea9 --- /dev/null +++ b/assets/styles/ui/themes/clay-dark.json @@ -0,0 +1,275 @@ +{ + "base": "dark", + "colors": { + "accent": "#e8845e", + "accent_soft": "#44281d", + "agent_busy": "#6daff7", + "agent_ok": "#89cf8e", + "app_bar": "#1b1814", + "app_bar_hover": "#e4e1dd14", + "app_bar_hover_button": "#e4e1dd18", + "app_bar_hover_strong": "#e4e1dd22", + "app_bar_hover_subtle": "#e4e1dd0c", + "app_bar_icon": [ + "#c3bdb5", + "#706354", + "#e8845e" + ], + "app_bar_separator": "#5d5246", + "app_bar_tab_active": "#29241f", + "app_bar_text": "#c3bdb5", + "axis_x": "#f85052", + "axis_y": "#89cf8e", + "axis_z": "#6daff7", + "bend_down": "#ab9acd", + "bend_up": "#89cf8e", + "body": "#8b8378", + "body_edge": "#1b1814", + "body_selected": "#b8603f", + "border": "#403930", + "box_crossing": "#89cf8e", + "box_window": "#6daff7", + "chip": "#e8845e", + "construction_geom": "#ceb687", + "construction_plane": "#ceb68740", + "continuity": [ + "#89cf8e", + "#6daff7", + "#e6af2b", + "#f38bb7" + ], + "control_border": "#5d5246", + "control_fill": "#3c352d", + "cube_border": "#706354", + "cube_face": "#3c352d", + "cube_hover": "#5d5246", + "cube_text": "#e4e1dd", + "dialog_bg": "#312b25", + "dialog_body": "#312b25", + "dialog_border": "#4b4238", + "dialog_footer": "#29241f", + "dialog_label": "#c3bdb5", + "dialog_rule": "#403930", + "dimension": "#c3bdb5", + "dimension_driven": "#9d9285", + "error": "#f85052", + "field": "#3c352d", + "form_accent": "#a6a2fc", + "form_dim": "#9d9285", + "form_error": "#ff6060", + "form_error_fill": "#37292b", + "form_fill": "#a6a2fc", + "form_ink": "#ece6d9", + "form_primary": "#e8845e", + "form_soft": "#2f3043", + "form_success": "#89cf8e", + "form_success_fill": "#2c3631", + "form_tab_ink": "#a6a2fc", + "gizmo": [ + "#ff6060", + "#98dfa2", + "#7abfff" + ], + "glyph_bg": "#312b25", + "glyph_edge": "#5d5246", + "glyph_text": "#ab9acd", + "grid": "#373029", + "grid_major": "#3c352d", + "heading_bg": "#221e1a", + "hover": "#4b4238", + "hover_edge": "#1b1814", + "hover_edge_halo": "#e4e1dd", + "hover_profile": "#e4e1dd22", + "hover_profile_edge": "#c3bdb5", + "icon": "#c3bdb5", + "icon_fill": "#5d5246", + "icons.access": [ + "#89cf8e", + "#f85052" + ], + "icons.agent": "#aba3ff", + "icons.axes": [ + "#f85052", + "#89cf8e", + "#6daff7" + ], + "icons.curvature": [ + "#6daff7", + "#89cf8e", + "#f85052" + ], + "icons.draft": [ + "#89cf8e", + "#e6af2b" + ], + "icons.floor": "#4b4238", + "icons.fold": "#8a7b68", + "icons.folder": "#ceb687", + "icons.glint": "#fdfcfca0", + "icons.highlight": "#e4e1dd", + "icons.interference": "#f85052", + "icons.marker_halo": "#1b181496", + "icons.paint": [ + "#f85052", + "#6daff7", + "#e6af2b" + ], + "icons.plane": "#dcc9a0", + "icons.sheet": "#a2bedb", + "icons.sheet_2": "#8fb0d2", + "icons.sheet_light": "#dcd8d3", + "icons.sheet_line": "#6daff7", + "icons.sky": "#a2bedb", + "icons.stripe": "#1b1814", + "icons.warning": "#e6af2b", + "interference": "#f85052", + "logo": [ + "#f0a07f", + "#e8845e", + "#b1573a" + ], + "manipulator": "#7abfff", + "mesh_accent": "#cfc152", + "mesh_fill": "#cfc152", + "mesh_ink": "#cfc152", + "mesh_soft": "#363624", + "on_accent": "#1d1a17", + "origin_plane": "#9d928538", + "origin_plane_edge": "#9d9285c8", + "origin_plane_hover": "#6daff770", + "origin_point": "#c3bdb5", + "overlay": "#221e1af0", + "panel": "#221e1a", + "panel_header": "#312b25", + "preview_add": "#4c78a7", + "preview_cut": "#f850526e", + "preview_new": "#e6af2b", + "preview_sketch": "#8eca96", + "profile_fill": "#6daff71c", + "render_accent": "#f38bb7", + "render_fill": "#f38bb7", + "render_ink": "#f38bb7", + "render_soft": "#3d2c36", + "rubber_band": "#7abfff", + "section_cap": "#ceb687", + "sel_edge": "#e8845e", + "sel_edge_rim": "#f5b9a0", + "sel_face": "#d4693f", + "sel_profile": "#e8845eb0", + "sel_profile_edge": "#e8845e", + "sel_vertex": "#e8845e", + "selected_bg": "#4d3329", + "selected_ink": "#ece6d9", + "sheet_fill": "#6daff7", + "sheet_ink": "#6daff7", + "sheet_soft": "#253242", + "sketch": "#6daff7", + "sketch_accent": "#8eca96", + "sketch_centerline": "#c3bdb5", + "sketch_construction": "#ceb687", + "sketch_fixed": "#e4e1dd", + "sketch_ink": "#8eca96", + "sketch_locked": "#89cf8e", + "sketch_lost": "#f85052", + "sketch_point": "#e4e1dd", + "sketch_point_free": "#6daff7", + "sketch_projected": "#998cb3", + "sketch_soft": "#2b3730", + "subheading_bg": "#29241f", + "surface_accent": "#ceb687", + "surface_fill": "#ceb687", + "surface_ink": "#ceb687", + "surface_soft": "#36342e", + "tab_on_fill_dark": "#1b1814", + "text": "#ece6d9", + "text_dim": "#9d9484", + "timeline": "#221e1a", + "timeline_item": "#312b25", + "timeline_item_error": "#552f31", + "timeline_marker": "#e8845e", + "toolbar": "#221e1a", + "triad": [ + "#f85052", + "#89cf8e", + "#6daff7" + ], + "viewport_bottom": "#29241f", + "viewport_top": "#312b25", + "warning": "#e6af2b" + }, + "format": "solidcraft-theme/1", + "name": "Clay Dark", + "radii": { + "radius_sm": 6, + "radius_md": 9, + "radius_lg": 13, + "radius_xl": 18, + "control_radius": 9, + "sketch_mode_radius": 10 + }, + "borders": { + "primary": { + "width": 1, + "color": "#4a433b" + }, + "secondary": { + "width": 1, + "color": "#3b362f" + }, + "tertiary": { + "width": 1, + "color": "#332f2a" + }, + "container": { + "width": 1, + "color": "#443d35" + }, + "control": { + "width": 1, + "color": "#4a433b" + } + }, + "icon_palette": { + "ink": "#262320", + "line": "#ece6d9", + "passive-1": "#c5bdae", + "passive-2": "#9a9283", + "passive-3": "#6f6859", + "guide": "#a6a093", + "solid": [ + "#a0d7fb", + "#65bdf3", + "#4aa3d8" + ], + "surface": [ + "#fcc28e", + "#dea572", + "#c38c59" + ], + "mesh": [ + "#e8cd7d", + "#cab060", + "#b19747" + ], + "form": [ + "#d5c4fd", + "#b9a7df", + "#a08fc4" + ], + "sketch": [ + "#b0dbc0", + "#94bea4", + "#7ba58b" + ], + "constraint": [ + "#febbb9", + "#fb8e8d", + "#e57071" + ], + "construction": [ + "#fcc28e", + "#dea572", + "#c38c59" + ] + } +} diff --git a/assets/styles/ui/themes/clay.json b/assets/styles/ui/themes/clay.json new file mode 100644 index 000000000..ea70b9d42 --- /dev/null +++ b/assets/styles/ui/themes/clay.json @@ -0,0 +1,275 @@ +{ + "base": "light", + "colors": { + "accent": "#bf5634", + "accent_soft": "#f0d8ca", + "agent_busy": "#015ba6", + "agent_ok": "#257231", + "app_bar": "#e6dfd3", + "app_bar_hover": "#14110d14", + "app_bar_hover_button": "#14110d18", + "app_bar_hover_strong": "#14110d22", + "app_bar_hover_subtle": "#14110d0c", + "app_bar_icon": [ + "#423e36", + "#b7b1a7", + "#bf5634" + ], + "app_bar_separator": "#b7b1a7", + "app_bar_tab_active": "#faf7f1", + "app_bar_text": "#423e36", + "axis_x": "#c71529", + "axis_y": "#257231", + "axis_z": "#015ba6", + "bend_down": "#705e91", + "bend_up": "#257231", + "body": "#c8c0b3", + "body_edge": "#423e36", + "body_selected": "#e2967a", + "border": "#e0d8c9", + "box_crossing": "#257231", + "box_window": "#015ba6", + "chip": "#bf5634", + "construction_geom": "#7d6535", + "construction_plane": "#7d653540", + "continuity": [ + "#257231", + "#015ba6", + "#c08a1a", + "#b14578" + ], + "control_border": "#dcd3c2", + "control_fill": "#fdfaf3", + "cube_border": "#b7b1a7", + "cube_face": "#fdfaf3", + "cube_hover": "#dcd3c2", + "cube_text": "#14110d", + "dialog_bg": "#faf7f1", + "dialog_body": "#faf7f1", + "dialog_border": "#dcd3c2", + "dialog_footer": "#f4eee3", + "dialog_label": "#423e36", + "dialog_rule": "#e0d8c9", + "dimension": "#423e36", + "dimension_driven": "#726a5d", + "error": "#c71529", + "field": "#fdfaf3", + "form_accent": "#5844bc", + "form_dim": "#726a5d", + "form_error": "#c71529", + "form_error_fill": "#f4e0de", + "form_fill": "#5844bc", + "form_ink": "#2a251f", + "form_primary": "#bf5634", + "form_soft": "#e4e0e5", + "form_success": "#257231", + "form_success_fill": "#e4e9df", + "form_tab_ink": "#5844bc", + "gizmo": [ + "#b00018", + "#096125", + "#004c9b" + ], + "glyph_bg": "#fdfaf3", + "glyph_edge": "#dcd3c2", + "glyph_text": "#604b83", + "grid": "#f3ecdf", + "grid_major": "#e6dfd3", + "heading_bg": "#f2e9db", + "hover": "#e6dfd2", + "hover_edge": "#14110d", + "hover_edge_halo": "#fefdfb", + "hover_profile": "#14110d22", + "hover_profile_edge": "#423e36", + "icon": "#423e36", + "icon_fill": "#dcd3c2", + "icons.access": [ + "#257231", + "#c71529" + ], + "icons.agent": "#5844bc", + "icons.axes": [ + "#c71529", + "#257231", + "#015ba6" + ], + "icons.curvature": [ + "#015ba6", + "#257231", + "#c71529" + ], + "icons.draft": [ + "#257231", + "#e6af2b" + ], + "icons.floor": "#726a5d", + "icons.fold": "#938b7c", + "icons.folder": "#c9a96a", + "icons.glint": "#ffffffa0", + "icons.highlight": "#fefdfb", + "icons.interference": "#c71529", + "icons.marker_halo": "#14110d96", + "icons.paint": [ + "#c71529", + "#015ba6", + "#e6af2b" + ], + "icons.plane": "#e3cf9f", + "icons.sheet": "#b9cde2", + "icons.sheet_2": "#a5bfd9", + "icons.sheet_light": "#f1e9da", + "icons.sheet_line": "#015ba6", + "icons.sky": "#b9cde2", + "icons.stripe": "#14110d", + "icons.warning": "#e6af2b", + "interference": "#c71529", + "logo": [ + "#d0704b", + "#bf5634", + "#92411f" + ], + "manipulator": "#004c9b", + "mesh_accent": "#7e6900", + "mesh_fill": "#7e6900", + "mesh_ink": "#6b5903", + "mesh_soft": "#e7e3d8", + "on_accent": "#fffefb", + "origin_plane": "#726a5d38", + "origin_plane_edge": "#726a5dc8", + "origin_plane_hover": "#015ba670", + "origin_point": "#423e36", + "overlay": "#fefdfbeb", + "panel": "#f4eee3", + "panel_header": "#f2e9db", + "preview_add": "#4f8fd6", + "preview_cut": "#c715296e", + "preview_new": "#e6af2b", + "preview_sketch": "#2d713b", + "profile_fill": "#015ba614", + "render_accent": "#ac1f6a", + "render_fill": "#ac1f6a", + "render_ink": "#ac1f6a", + "render_soft": "#eadedf", + "rubber_band": "#004c9b", + "section_cap": "#7d6535", + "sel_edge": "#bf5634", + "sel_edge_rim": "#e8a98b", + "sel_face": "#d4714c", + "sel_profile": "#bf5634a0", + "sel_profile_edge": "#bf5634", + "sel_vertex": "#bf5634", + "selected_bg": "#f3ddd0", + "selected_ink": "#2a251f", + "sheet_fill": "#015ba6", + "sheet_ink": "#015ba6", + "sheet_soft": "#dee2e3", + "sketch": "#015ba6", + "sketch_accent": "#2d713b", + "sketch_centerline": "#423e36", + "sketch_construction": "#7d6535", + "sketch_fixed": "#14110d", + "sketch_ink": "#2d713b", + "sketch_locked": "#257231", + "sketch_lost": "#c71529", + "sketch_point": "#14110d", + "sketch_point_free": "#015ba6", + "sketch_projected": "#705e91", + "sketch_soft": "#e1e3dc", + "subheading_bg": "#f4eee3", + "surface_accent": "#7d6535", + "surface_fill": "#7d6535", + "surface_ink": "#6a562e", + "surface_soft": "#e7e3db", + "tab_on_fill_dark": "#14110d", + "text": "#2a251f", + "text_dim": "#675e50", + "timeline": "#f4eee3", + "timeline_item": "#fdfaf3", + "timeline_item_error": "#f2c5c8", + "timeline_marker": "#bf5634", + "toolbar": "#f4eee3", + "triad": [ + "#c71529", + "#257231", + "#015ba6" + ], + "viewport_bottom": "#ebe4d4", + "viewport_top": "#f7f2e8", + "warning": "#956000" + }, + "format": "solidcraft-theme/1", + "name": "Clay", + "radii": { + "radius_sm": 6, + "radius_md": 9, + "radius_lg": 13, + "radius_xl": 18, + "control_radius": 9, + "sketch_mode_radius": 10 + }, + "borders": { + "primary": { + "width": 1, + "color": "#cfc4af" + }, + "secondary": { + "width": 1, + "color": "#ddd3c0" + }, + "tertiary": { + "width": 1, + "color": "#e3dbca" + }, + "container": { + "width": 1, + "color": "#d6cbb7" + }, + "control": { + "width": 1, + "color": "#d0c5b0" + } + }, + "icon_palette": { + "ink": "#2a251f", + "line": "#4b4338", + "passive-1": "#e6e0d4", + "passive-2": "#b9b0a0", + "passive-3": "#8a8272", + "guide": "#7a7263", + "solid": [ + "#dbe9fe", + "#81b3fa", + "#1875eb" + ], + "surface": [ + "#fde3c4", + "#daa662", + "#a06f28" + ], + "mesh": [ + "#fee7a2", + "#d1ad37", + "#937717" + ], + "form": [ + "#ede2ff", + "#c39afc", + "#8b62bf" + ], + "sketch": [ + "#b1fdc5", + "#72c78b", + "#388e56" + ], + "constraint": [ + "#fee0dd", + "#f98e87", + "#d73339" + ], + "construction": [ + "#fde3c4", + "#daa662", + "#a06f28" + ] + } +} diff --git a/attribution/pending/clay-themes.md b/attribution/pending/clay-themes.md new file mode 100644 index 000000000..a7eab2dfb --- /dev/null +++ b/attribution/pending/clay-themes.md @@ -0,0 +1,3 @@ +| File | Author | Source | Licence | +| assets/styles/ui/themes/clay.json | SolidCraft contributors | original SolidCraft theme file (Clay, light): warm paper palette chosen for SolidCraft | MIT OR Apache-2.0 | +| assets/styles/ui/themes/clay-dark.json | SolidCraft contributors | original SolidCraft theme file (Clay Dark): warm charcoal palette chosen for SolidCraft | MIT OR Apache-2.0 | diff --git a/crates/ui-egui/src/theme_files.rs b/crates/ui-egui/src/theme_files.rs index 00f546eb7..4d4b7487d 100644 --- a/crates/ui-egui/src/theme_files.rs +++ b/crates/ui-egui/src/theme_files.rs @@ -610,8 +610,8 @@ pub fn export(name: &str, base: Base, t: &Tokens) -> Value { json!({"format": FORMAT, "name": name, "base": base, "colors": colors, "radii": radii, "borders": borders, "icon_palette": icon_palette}) } -/// The theme files that come with SolidCraft (original files; Gruvbox, Tokyo Night, Solarized, Nord, Nosferatu and Catppuccin map open-source palettes, MIT; Okibi and Akari map the Okibi design system). -const BUILTIN: [(&str, &str); 22] = [ +/// The theme files that come with SolidCraft (original files; Gruvbox, Tokyo Night, Solarized, Nord, Nosferatu and Catppuccin map open-source palettes, MIT; Okibi and Akari map the Okibi design system; Clay and Clay Dark are original warm paper and charcoal palettes). +const BUILTIN: [(&str, &str); 24] = [ ("gruvbox-dark", include_str!("../../../assets/styles/ui/themes/gruvbox-dark.json")), ("gruvbox-dark-hard", include_str!("../../../assets/styles/ui/themes/gruvbox-dark-hard.json")), ("gruvbox-dark-soft", include_str!("../../../assets/styles/ui/themes/gruvbox-dark-soft.json")), @@ -634,6 +634,8 @@ const BUILTIN: [(&str, &str); 22] = [ ("catppuccin-mocha", include_str!("../../../assets/styles/ui/themes/catppuccin-mocha.json")), ("okibi", include_str!("../../../assets/styles/ui/themes/okibi.json")), ("akari", include_str!("../../../assets/styles/ui/themes/akari.json")), + ("clay", include_str!("../../../assets/styles/ui/themes/clay.json")), + ("clay-dark", include_str!("../../../assets/styles/ui/themes/clay-dark.json")), ]; /// The built-in themes, read once (one that fails to read is left out; a test reads them all). @@ -1030,6 +1032,9 @@ mod tests { assert_eq!(values("solidcraft-95"), [3, 3, 4, 4, 3, 3]); assert_eq!(values("blueprint"), [4, 6, 8, 10, 6, 7]); assert_eq!(values("cupertino"), [6, 8, 12, 16, 8, 9]); + for id in ["clay", "clay-dark"] { + assert_eq!(values(id), [6, 9, 13, 18, 9, 10], "{id}"); + } let defaults = radius_values(Tokens::dark()); assert_eq!(defaults, radius_values(Tokens::light())); for suffix in ["", "-hard", "-soft"] { diff --git a/docs/book/src/guide/ui-tour.md b/docs/book/src/guide/ui-tour.md index 70bb98006..f42d0bb7b 100644 --- a/docs/book/src/guide/ui-tour.md +++ b/docs/book/src/guide/ui-tour.md @@ -126,7 +126,8 @@ themes and any themes you have imported. A choice applies at once. Under the the (dark and light, each in hard, normal and soft contrast), SolidCraft 95, Platinum 9, Cupertino, Green Phosphor, Amber Phosphor, Blueprint, One Dark, Tokyo Night, Solarized Light, Nord, High Contrast, Graphite, Nosferatu, Catppuccin Mocha, and Okibi and Akari (dark and light, from the -[Okibi design system](https://kaievns.github.io/okibi-akiri-design-system-spec/)). +[Okibi design system](https://kaievns.github.io/okibi-akiri-design-system-spec/)), and Clay and +Clay Dark (warm ivory paper and warm charcoal, with a terracotta accent and rounded corners). A theme is a small JSON file that starts from the Dark or Light palette and changes any of its colours and corner radii by name: @@ -170,7 +171,7 @@ styles form controls, and `sketch_mode_radius` styles sketch creation buttons. T these settings, with matching shapes across light and dark variants. Dock joins remain square, circular controls remain circular, and control sizes and spacing stay the same. Platinum 9 and the phosphor themes use square corners, SolidCraft 95 uses subtle 3-point -corners, Blueprint uses the standard radii, and Cupertino uses softer corners. Other built-in +corners, Blueprint uses the standard radii, Cupertino uses softer corners, and Clay and Clay Dark use rounded corners. Other built-in themes retain the defaults. Tab accents also have separate fill, small-text ink and tint keys. Sketch uses