pub struct Tokens { pub accent: &'static str, pub accent_ink: &'static str, pub accent_soft: &'static str, pub accent_text: &'static str, pub focus: &'static str, pub public_bg: &'static str, pub public_text: &'static str, pub note: &'static str, pub hunk_bg: &'static str, pub hunk_text: &'static str, } pub struct Palette { pub id: &'static str, pub light: Tokens, pub dark: Tokens, } pub const DEFAULT: &str = "sage"; pub struct TokenVar { pub name: &'static str, pub value: fn(&Tokens) -> &'static str, } pub const TOKEN_VARS: &[TokenVar] = &[ TokenVar { name: "--accent", value: |t| t.accent, }, TokenVar { name: "--accent-ink", value: |t| t.accent_ink, }, TokenVar { name: "--accent-soft", value: |t| t.accent_soft, }, TokenVar { name: "--accent-text", value: |t| t.accent_text, }, TokenVar { name: "--focus", value: |t| t.focus, }, TokenVar { name: "--public-bg", value: |t| t.public_bg, }, TokenVar { name: "--public-text", value: |t| t.public_text, }, TokenVar { name: "--note", value: |t| t.note, }, TokenVar { name: "--hunk-bg", value: |t| t.hunk_bg, }, TokenVar { name: "--hunk-text", value: |t| t.hunk_text, }, ]; pub const PALETTES: &[Palette] = &[ Palette { id: "sage", light: Tokens { accent: "#5E7D63", accent_ink: "#4A6750", accent_soft: "#E4ECE3", accent_text: "#FFFFFF", focus: "#4A6750", public_bg: "#E4ECE3", public_text: "#4A6750", note: "#4A6750", hunk_bg: "#EDF1EB", hunk_text: "#3F5F46", }, dark: Tokens { accent: "#93A663", accent_ink: "#BCCB8F", accent_soft: "#283020", accent_text: "#151A0B", focus: "#BCCB8F", public_bg: "#283020", public_text: "#D3DDB4", note: "#BCCB8F", hunk_bg: "#1D2219", hunk_text: "#B3C385", }, }, Palette { id: "ember", light: Tokens { accent: "#B44D1A", accent_ink: "#8F3A12", accent_soft: "#F8E9DF", accent_text: "#FFFFFF", focus: "#8F3A12", public_bg: "#F9E4D6", public_text: "#8F3A12", note: "#8F3A12", hunk_bg: "#FBF0E8", hunk_text: "#883611", }, dark: Tokens { accent: "#E8894A", accent_ink: "#FFB27A", accent_soft: "#3A2518", accent_text: "#1A0E06", focus: "#FFB27A", public_bg: "#3A2416", public_text: "#FFC69A", note: "#FFB27A", hunk_bg: "#24180F", hunk_text: "#F0A066", }, }, Palette { id: "ocean", light: Tokens { accent: "#467799", accent_ink: "#336180", accent_soft: "#DEECF6", accent_text: "#FFFFFF", focus: "#336180", public_bg: "#DEECF6", public_text: "#336180", note: "#336180", hunk_bg: "#E9F1F7", hunk_text: "#2B5977", }, dark: Tokens { accent: "#86B9DD", accent_ink: "#9FCBEA", accent_soft: "#1C2F3C", accent_text: "#061118", focus: "#86B9DD", public_bg: "#1C2F3C", public_text: "#9FCBEA", note: "#9FCBEA", hunk_bg: "#1A252E", hunk_text: "#86B9DD", }, }, Palette { id: "plum", light: Tokens { accent: "#7B699C", accent_ink: "#645482", accent_soft: "#EBE7F5", accent_text: "#FFFFFF", focus: "#645482", public_bg: "#EBE7F5", public_text: "#645482", note: "#645482", hunk_bg: "#F0EEF7", hunk_text: "#5C4B79", }, dark: Tokens { accent: "#BBA9E0", accent_ink: "#CBBCEB", accent_soft: "#2F283C", accent_text: "#110D18", focus: "#BBA9E0", public_bg: "#2F283C", public_text: "#CBBCEB", note: "#CBBCEB", hunk_bg: "#25212E", hunk_text: "#BBA9E0", }, }, Palette { id: "rose", light: Tokens { accent: "#A25E6F", accent_ink: "#864958", accent_soft: "#F6E4E8", accent_text: "#FFFFFF", focus: "#864958", public_bg: "#F6E4E8", public_text: "#864958", note: "#864958", hunk_bg: "#F7ECEE", hunk_text: "#7D4050", }, dark: Tokens { accent: "#E79DAD", accent_ink: "#F3B2C0", accent_soft: "#3E242A", accent_text: "#190A0E", focus: "#E79DAD", public_bg: "#3E242A", public_text: "#F3B2C0", note: "#F3B2C0", hunk_bg: "#2F1E22", hunk_text: "#E79DAD", }, }, ]; pub struct BaseTokens { pub bg: &'static str, pub surface: &'static str, pub surface_2: &'static str, pub text: &'static str, pub text_2: &'static str, pub muted: &'static str, pub border: &'static str, pub border_strong: &'static str, pub code_bg: &'static str, pub private_bg: &'static str, pub private_text: &'static str, pub ln_text: &'static str, } pub struct Base { pub id: &'static str, pub light: BaseTokens, pub dark: BaseTokens, } pub const BASE_DEFAULT: &str = "ink"; pub struct BaseTokenVar { pub name: &'static str, pub value: fn(&BaseTokens) -> &'static str, } pub const BASE_TOKEN_VARS: &[BaseTokenVar] = &[ BaseTokenVar { name: "--bg", value: |t| t.bg, }, BaseTokenVar { name: "--surface", value: |t| t.surface, }, BaseTokenVar { name: "--surface-2", value: |t| t.surface_2, }, BaseTokenVar { name: "--text", value: |t| t.text, }, BaseTokenVar { name: "--text-2", value: |t| t.text_2, }, BaseTokenVar { name: "--muted", value: |t| t.muted, }, BaseTokenVar { name: "--border", value: |t| t.border, }, BaseTokenVar { name: "--border-strong", value: |t| t.border_strong, }, BaseTokenVar { name: "--code-bg", value: |t| t.code_bg, }, BaseTokenVar { name: "--private-bg", value: |t| t.private_bg, }, BaseTokenVar { name: "--private-text", value: |t| t.private_text, }, BaseTokenVar { name: "--ln-text", value: |t| t.ln_text, }, ]; pub const BASES: &[Base] = &[ Base { id: "ink", light: BaseTokens { bg: "#FCFCFB", surface: "#FFFFFF", surface_2: "#F2F2F0", text: "#111111", text_2: "#333333", muted: "#5F5F5C", border: "#E3E3E0", border_strong: "#C9C9C5", code_bg: "#F2F2F0", private_bg: "#F2F2F0", private_text: "#333333", ln_text: "#5F5F5C", }, dark: BaseTokens { bg: "#000000", surface: "#0B0B0B", surface_2: "#141414", text: "#F2F2F0", text_2: "#CFCFCC", muted: "#9C9C98", border: "#242424", border_strong: "#353535", code_bg: "#141414", private_bg: "#141414", private_text: "#CFCFCC", ln_text: "#9C9C98", }, }, Base { id: "anvil", light: BaseTokens { bg: "#F6F5F3", surface: "#FFFFFF", surface_2: "#EFEEEB", text: "#191816", text_2: "#3F3C37", muted: "#5F5C56", border: "#E3E1DD", border_strong: "#C9C6BF", code_bg: "#EFEEEB", private_bg: "#EFEEEB", private_text: "#3F3C37", ln_text: "#5F5C56", }, dark: BaseTokens { bg: "#141312", surface: "#1D1C1A", surface_2: "#292724", text: "#F2F0EB", text_2: "#D6D2CA", muted: "#AAA69D", border: "#2F2D2A", border_strong: "#55524C", code_bg: "#292724", private_bg: "#292724", private_text: "#D6D2CA", ln_text: "#AAA69D", }, }, Base { id: "dusk", light: BaseTokens { bg: "#E9EEF5", surface: "#F8FAFD", surface_2: "#DCE3EE", text: "#161F2D", text_2: "#303D52", muted: "#56637A", border: "#CBD5E3", border_strong: "#AEBBCE", code_bg: "#DCE3EE", private_bg: "#DCE3EE", private_text: "#303D52", ln_text: "#505D73", }, dark: BaseTokens { bg: "#0B1019", surface: "#121927", surface_2: "#1A2332", text: "#E0E7F1", text_2: "#BFC9D9", muted: "#8F9BB0", border: "#222D3E", border_strong: "#303D51", code_bg: "#1A2332", private_bg: "#1A2332", private_text: "#BFC9D9", ln_text: "#8F9BB0", }, }, Base { id: "heather", light: BaseTokens { bg: "#EEECF4", surface: "#FAF9FD", surface_2: "#E4E0EC", text: "#211B2B", text_2: "#40384F", muted: "#665E77", border: "#D6D1E1", border_strong: "#BDB6CB", code_bg: "#E4E0EC", private_bg: "#E4E0EC", private_text: "#40384F", ln_text: "#605870", }, dark: BaseTokens { bg: "#110E18", surface: "#1B1625", surface_2: "#251F30", text: "#E8E4F0", text_2: "#CAC5D7", muted: "#9D96AD", border: "#2F293B", border_strong: "#3F384E", code_bg: "#251F30", private_bg: "#251F30", private_text: "#CAC5D7", ln_text: "#9D96AD", }, }, Base { id: "blush", light: BaseTokens { bg: "#F5EBEC", surface: "#FDF9F9", surface_2: "#EDDEE0", text: "#2B191C", text_2: "#4F3438", muted: "#77595E", border: "#E2CED1", border_strong: "#CCB2B6", code_bg: "#EDDEE0", private_bg: "#EDDEE0", private_text: "#4F3438", ln_text: "#715358", }, dark: BaseTokens { bg: "#180C0E", surface: "#251316", surface_2: "#301C20", text: "#F0E2E4", text_2: "#D8C2C5", muted: "#AE9296", border: "#3C2529", border_strong: "#4E3438", code_bg: "#301C20", private_bg: "#301C20", private_text: "#D8C2C5", ln_text: "#AE9296", }, }, ];