diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ee84b51..f7c37a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -114,7 +114,7 @@ See [docs/architecture.md](docs/architecture.md) for the full layout. Short vers - `src/sections.rs` — categories + filter logic. - `src/ui/` — widgets and panels (sidebar, app grid, detail view, settings). - `src/ui/theme.rs` — a re-export of [colony-ui](https://crates.io/crates/colony-ui) - plus Colony's own button styling. The 25 theme families and 57 palettes live + plus Colony's own button styling. The 26 theme families and 59 palettes live in that crate, generated from the design tokens in [Project-Colony-Resources](https://github.com/Project-Colony/Project-Colony-Resources). diff --git a/Cargo.lock b/Cargo.lock index e47dcb9..68d060d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -568,9 +568,9 @@ dependencies = [ [[package]] name = "colony-ui" -version = "0.1.1" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b025e9e878eaf306c7ec74b8917601e19f7455a5e956872beb80df17ed503ae3" +checksum = "f352f5fdb81b369795902678103d64b80350e89851ae6c07505e1e2e7634d1cb" dependencies = [ "dirs", "iced", diff --git a/Cargo.toml b/Cargo.toml index 2f281f0..307c375 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ rust-version = "1.88" anyhow = "1.0.100" # The shared theme, palettes, accents, labels and widgets, generated from the # design tokens in Project-Colony-Resources. -colony-ui = "0.1.1" +colony-ui = "0.1.4" iced = { version = "0.14.0", features = ["tokio", "markdown", "advanced", "image-without-codecs"] } shell-words = "1.1.1" serde = { version = "1.0.228", features = ["derive"] } diff --git a/README.md b/README.md index e41d374..7c50ceb 100644 --- a/README.md +++ b/README.md @@ -77,20 +77,20 @@ Requires Rust 1.88+ and, on Linux, `libgtk-3-dev`, `libxdo-dev`, `libdbus-1-dev` ## Theming -Colony ships with **25 theme families and 57 palettes**, compiled into the +Colony ships with **26 theme families and 59 palettes**, compiled into the binary with zero runtime cost. They come from [colony-ui](https://crates.io/crates/colony-ui) and are shared with every other Project Colony program, so a theme looks the same wherever you meet it: | | | | | |---|---|---|---| -| Catppuccin (Latte, Frappé, Macchiato, Mocha) | Gruvbox | Everblush | Kanagawa (Wave, Dragon, Lotus) | +| Catppuccin (Latte, Frappé, Macchiato, Mocha) | Gruvbox | Everblush | Kanagawa (Lotus, Wave, Journal, Dragon) | | Nord | Dracula | Solarized | Tokyo Night | | Rosé Pine (Main, Moon, Dawn) | One Dark | Monokai Pro (Pro, Classic, Spectrum) | Ayu (Dark, Mirage, Light) | | Everforest | Material (Oceanic, Palenight, Deep Ocean) | Flexoki | Nightfox | | Sonokai | Oxocarbon | Night Owl | Iceberg | | Horizon | Mélange | Synthwave '84 | Modus (Operandi, Vivendi) | -| Stellar Blade (Eve, Tachy, Lily, Enya, Kaya) | | | | +| Stellar Blade (Eve, Tachy, Lily, Enya, Kaya) | Parchment | | | Each palette includes full semantic tokens: backgrounds, text layers, accents, success/warning/error states, button states, and more. diff --git a/docs/architecture.md b/docs/architecture.md index 7844e89..40c16e9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -51,7 +51,7 @@ src/ ├── i18n/ — fr.rs, en.rs, and the Locale lookup (mod.rs) └── ui/ ├── mod.rs — UI module declarations - ├── theme.rs — 25 theme families, 57 palettes, semantic tokens + ├── theme.rs — 26 theme families, 59 palettes, semantic tokens ├── sidebar.rs — Sidebar (sections, GitHub, rescan, update badge) ├── app_grid.rs — Application card grid with search ├── detail.rs — Detail view (README, changelog, license, actions) diff --git a/docs/faq.md b/docs/faq.md index 68bc52f..37f344f 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -152,7 +152,7 @@ Yes. Edit `~/.config/Colony/Colony/preferences/preferences.json` and add custom ### I changed a theme and don't see it — why? -Themes apply immediately, no restart. If a palette looks off, verify Settings → Theme has the expected family + palette selected. All 57 palettes are compiled into the binary, so if it's missing you're on an old version — update. +Themes apply immediately, no restart. If a palette looks off, verify Settings → Theme has the expected family + palette selected. All 59 palettes are compiled into the binary, so if it's missing you're on an old version — update. --- diff --git a/docs/tutorial.md b/docs/tutorial.md index e9d11c8..2541785 100644 --- a/docs/tutorial.md +++ b/docs/tutorial.md @@ -122,7 +122,7 @@ Switch the sidebar origin to **Linux** (or **Windows**) to see only those. ## 5. Customize the theme Click the **gear icon** at the bottom of the sidebar → **Theme**. Colony ships -25 theme families and 57 palettes (Catppuccin, Gruvbox, Nord, Dracula, Rosé +26 theme families and 59 palettes (Catppuccin, Gruvbox, Nord, Dracula, Rosé Pine, Tokyo Night, etc.). Theme changes apply instantly, no restart needed. ## 6. Connect your GitHub account (optional) diff --git a/src/ui/settings.rs b/src/ui/settings.rs index eac850f..3fda55c 100644 --- a/src/ui/settings.rs +++ b/src/ui/settings.rs @@ -6,7 +6,7 @@ use iced::{Element, Fill, Length}; use crate::i18n; use crate::message::Message; use crate::state::App; -use crate::ui::theme::Palette; +use crate::ui::theme::{self, Palette}; /// Settings category names (keys for i18n). const SETTINGS_CATEGORIES: &[&str] = &[ @@ -67,8 +67,15 @@ impl App { }; button::Style { background: Some(bg.into()), + // Not TEXT_PRIMARY: on an accent fill that pairing + // is below 4.5:1 on fifty-eight of the fifty-nine + // themes and reaches 1.01:1 on Ayu Dark, where the + // selected category was invisible. `contrast_on` + // picks the legible end for whatever accent the + // user has chosen — app_grid.rs already uses it for + // exactly this. text_color: if is_selected { - Palette::TEXT_PRIMARY() + theme::contrast_on(Palette::ACCENT()) } else { Palette::TEXT_MUTED() }, @@ -1226,7 +1233,9 @@ impl App { radius: 6.0.into(), }, text_color: Palette::TEXT_PRIMARY(), - selected_text_color: Palette::TEXT_PRIMARY(), + // The highlighted row of an open dropdown is an accent fill, and + // has the same problem as the category button above. + selected_text_color: theme::contrast_on(Palette::ACCENT()), selected_background: Palette::ACCENT().into(), shadow: iced::Shadow::default(), }); diff --git a/src/ui/theme.rs b/src/ui/theme.rs index 387e5ab..eb5b8ed 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -90,14 +90,14 @@ mod doc_parity_tests { .sum(); assert_eq!( - families, 25, - "the docs say 25 theme families; colony-ui ships {families}. Update README.md \ + families, 26, + "the docs say 26 theme families; colony-ui ships {families}. Update README.md \ (including its table of family names), docs/faq.md, docs/tutorial.md, \ docs/architecture.md and CONTRIBUTING.md." ); assert_eq!( - palettes, 57, - "the docs say 57 palettes; colony-ui ships {palettes}. Update the same five documents." + palettes, 59, + "the docs say 59 palettes; colony-ui ships {palettes}. Update the same five documents." ); } }