Rebrand Zeron theme family as Coop

This commit is contained in:
2026-10-08 09:58:23 +07:00
parent 4dfc9fd668
commit f54f5f35a8
6 changed files with 29 additions and 369 deletions
+16 -19
View File
@@ -12,7 +12,7 @@ pub fn builtin_registry() -> &'static ThemeRegistry {
static REGISTRY: OnceLock<ThemeRegistry> = OnceLock::new();
REGISTRY.get_or_init(|| ThemeRegistry {
families: vec![
family("zeron", "Zeron", vec![zeron_light(), zeron_dark()]),
family("coop", "Coop", vec![coop_light(), coop_dark()]),
family("dracula", "Dracula", vec![dracula()]),
family("github", "GitHub", vec![github_light(), github_dark()]),
family("ayu", "Ayu", vec![ayu_light(), ayu_dark(), ayu_mirage()]),
@@ -119,7 +119,7 @@ fn variant(seed: Seeds<'_>) -> ThemeVariant {
raised,
card,
dialog: card.mix(raised, if dark { 0.18 } else { 0.04 }),
overlay: card.mix(raised, if dark { 0.34 } else { 0.02 }),
overlay: Color::BLACK.with_alpha(if dark { 0.5 } else { 0.3 }),
hover: border_tone.with_alpha(if dark { 0.11 } else { 0.06 }),
active: accent.primary.with_alpha(if dark { 0.18 } else { 0.10 }),
border: border_tone.with_alpha(if dark { 0.10 } else { 0.12 }),
@@ -159,9 +159,6 @@ fn variant(seed: Seeds<'_>) -> ThemeVariant {
},
source: seed.source,
};
// Hash the checked-in resolved definition itself (with the hash field
// blanked), not merely its source URL. This makes provenance sensitive to
// curation edits as well as upstream revision changes.
variant.source.asset_hash.clear();
let encoded = serde_json::to_vec(&variant).expect("built-in theme serializes");
variant.source.asset_hash = format!("sha256:{:x}", Sha256::digest(encoded));
@@ -236,11 +233,11 @@ const ANSI_LIGHT: [&str; 16] = [
"#71717a", "#b91c1c", "#15803d", "#92400e", "#1d4ed8", "#7e22ce", "#155e75", "#18181b",
];
fn zeron_dark() -> ThemeVariant {
fn coop_dark() -> ThemeVariant {
variant(Seeds {
id: "zeron-dark",
family_id: "zeron",
name: "Zeron Dark",
id: "coop-dark",
family_id: "coop",
name: "Coop Dark",
appearance: Appearance::Dark,
treatment: SurfaceTreatment::Frosted,
background: "#060606",
@@ -250,7 +247,7 @@ fn zeron_dark() -> ThemeVariant {
text: "#e8e8ea",
muted: "#a9a9ae",
faint: "#85858a",
accent: "#8b7cf6",
accent: "#FFE629",
danger: "#f87171",
warning: "#facc15",
success: "#34d399",
@@ -261,20 +258,20 @@ fn zeron_dark() -> ThemeVariant {
"#a1a1aa", "#f472b6", "#22d3ee", "#f87171",
],
source: source(
"zeron-dark",
"coop-dark",
"native",
"https://github.com/zeronsh/comet",
"https://git.reya.info/reya/coop",
"d138049",
"MIT",
),
})
}
fn zeron_light() -> ThemeVariant {
fn coop_light() -> ThemeVariant {
variant(Seeds {
id: "zeron-light",
family_id: "zeron",
name: "Zeron Light",
id: "coop-light",
family_id: "coop",
name: "Coop Light",
appearance: Appearance::Light,
treatment: SurfaceTreatment::Frosted,
background: "#ffffff",
@@ -284,7 +281,7 @@ fn zeron_light() -> ThemeVariant {
text: "#303035",
muted: "#62626a",
faint: "#797981",
accent: "#5b43e8",
accent: "#a19200",
danger: "#dc2626",
warning: "#a16207",
success: "#15803d",
@@ -295,9 +292,9 @@ fn zeron_light() -> ThemeVariant {
"#52525b", "#be185d", "#0e7490", "#b91c1c",
],
source: source(
"zeron-light",
"coop-light",
"native",
"https://github.com/zeronsh/comet",
"https://git.reya.info/reya/coop",
"d138049",
"MIT",
),