Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions editors/vscode/themes/lume-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@

"terminal.background": "#12101e",
"terminal.foreground": "#d8d0e4",
"terminal.ansiBlack": "#1e1a2c",
"terminal.ansiBlack": "#56526c",
"terminal.ansiRed": "#c49080",
"terminal.ansiGreen": "#a0d4a8",
"terminal.ansiYellow": "#c4b080",
"terminal.ansiBlue": "#8cc0e0",
"terminal.ansiMagenta": "#b8a0e0",
"terminal.ansiCyan": "#88c0b8",
"terminal.ansiWhite": "#b0a8c4",
"terminal.ansiBrightBlack": "#302c42",
"terminal.ansiBrightBlack": "#68647e",
"terminal.ansiBrightRed": "#d0a0b8",
"terminal.ansiBrightGreen": "#a8d4b8",
"terminal.ansiBrightYellow": "#e8b4a0",
Expand Down
4 changes: 2 additions & 2 deletions editors/zed/themes/lume.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@
"terminal.foreground": "#d8d0e4",
"terminal.bright_foreground": "#d8d0e4",
"terminal.dim_foreground": "#b0a8c4",
"terminal.ansi.black": "#1e1a2c",
"terminal.ansi.black": "#56526c",
"terminal.ansi.red": "#c49080",
"terminal.ansi.green": "#a0d4a8",
"terminal.ansi.yellow": "#c4b080",
"terminal.ansi.blue": "#8cc0e0",
"terminal.ansi.magenta": "#b8a0e0",
"terminal.ansi.cyan": "#88c0b8",
"terminal.ansi.white": "#b0a8c4",
"terminal.ansi.bright_black": "#302c42",
"terminal.ansi.bright_black": "#68647e",
"terminal.ansi.bright_red": "#d0a0b8",
"terminal.ansi.bright_green": "#a8d4b8",
"terminal.ansi.bright_yellow": "#e8b4a0",
Expand Down
4 changes: 2 additions & 2 deletions lua/lume/palette.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ M.accents = {
}

M.ansi = {
black = "#1e1a2c",
black = "#56526c",
red = "#c49080",
green = "#a0d4a8",
yellow = "#c4b080",
blue = "#8cc0e0",
magenta = "#b8a0e0",
cyan = "#88c0b8",
white = "#b0a8c4",
brightBlack = "#302c42",
brightBlack = "#68647e",
brightRed = "#d0a0b8",
brightGreen = "#a8d4b8",
brightYellow = "#e8b4a0",
Expand Down
4 changes: 2 additions & 2 deletions palette.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"honey": "#c4b080"
},
"ansi": {
"black": "#1e1a2c",
"black": "#56526c",
"red": "#c49080",
"green": "#a0d4a8",
"yellow": "#c4b080",
"blue": "#8cc0e0",
"magenta": "#b8a0e0",
"cyan": "#88c0b8",
"white": "#b0a8c4",
"brightBlack": "#302c42",
"brightBlack": "#68647e",
"brightRed": "#d0a0b8",
"brightGreen": "#a8d4b8",
"brightYellow": "#e8b4a0",
Expand Down
5 changes: 5 additions & 0 deletions scripts/validate-contrast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,10 @@ export function validatePalette(palette: Palette): ValidationResult {
if (bg.surface0) check(`${name} on surface0`, hex, bg.surface0, 3);
}

// ANSI black/brightBlack: must be readable as foreground on base
const ansi = palette.ansi || {};
if (ansi.black) check("ansi black on base", ansi.black, bg.base, 2);
if (ansi.brightBlack) check("ansi brightBlack on base", ansi.brightBlack, bg.base, 3);

return { pass: failures.length === 0, failures };
}
4 changes: 2 additions & 2 deletions terminals/alacritty/lume.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ foreground = "#d8d0e4"
background = "#0e0c18"

[colors.normal]
black = "#1e1a2c"
black = "#56526c"
red = "#c49080"
green = "#a0d4a8"
yellow = "#c4b080"
Expand All @@ -46,7 +46,7 @@ cyan = "#88c0b8"
white = "#b0a8c4"

[colors.bright]
black = "#302c42"
black = "#68647e"
red = "#d0a0b8"
green = "#a8d4b8"
yellow = "#e8b4a0"
Expand Down
4 changes: 2 additions & 2 deletions terminals/foot/lume.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ selection-foreground = d8d0e4
selection-background = 262236
urls = 8cc0e0

regular0 = 1e1a2c
regular0 = 56526c
regular1 = c49080
regular2 = a0d4a8
regular3 = c4b080
Expand All @@ -19,7 +19,7 @@ regular5 = b8a0e0
regular6 = 88c0b8
regular7 = b0a8c4

bright0 = 302c42
bright0 = 68647e
bright1 = d0a0b8
bright2 = a8d4b8
bright3 = e8b4a0
Expand Down
4 changes: 2 additions & 2 deletions terminals/ghostty/lume
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ selection-background = 262236
selection-foreground = d8d0e4

# ANSI colors
palette = 0=1e1a2c
palette = 0=56526c
palette = 1=c49080
palette = 2=a0d4a8
palette = 3=c4b080
palette = 4=8cc0e0
palette = 5=b8a0e0
palette = 6=88c0b8
palette = 7=b0a8c4
palette = 8=302c42
palette = 8=68647e
palette = 9=d0a0b8
palette = 10=a8d4b8
palette = 11=e8b4a0
Expand Down
12 changes: 6 additions & 6 deletions terminals/iterm2/lume.itermcolors
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.172549</real>
<real>0.423529</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.101961</real>
<real>0.321569</real>
<key>Red Component</key>
<real>0.117647</real>
<real>0.337255</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
Expand Down Expand Up @@ -113,13 +113,13 @@
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.258824</real>
<real>0.494118</real>
<key>Color Space</key>
<string>sRGB</string>
<key>Green Component</key>
<real>0.172549</real>
<real>0.392157</real>
<key>Red Component</key>
<real>0.188235</real>
<real>0.407843</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
Expand Down
4 changes: 2 additions & 2 deletions terminals/kitty/lume.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ cursor_text_color #12101e
url_color #8cc0e0

# Black
color0 #1e1a2c
color8 #302c42
color0 #56526c
color8 #68647e

# Red
color1 #c49080
Expand Down
4 changes: 2 additions & 2 deletions terminals/wezterm/lume.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ scrollbar_thumb = "#302c42"
split = "#262236"
compose_cursor = "#c4b080"
ansi = [
"#1e1a2c",
"#56526c",
"#c49080",
"#a0d4a8",
"#c4b080",
Expand All @@ -23,7 +23,7 @@ ansi = [
"#b0a8c4",
]
brights = [
"#302c42",
"#68647e",
"#d0a0b8",
"#a8d4b8",
"#e8b4a0",
Expand Down
4 changes: 2 additions & 2 deletions terminals/windows-terminal/lume.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"foreground": "#d8d0e4",
"cursorColor": "#d0a0b8",
"selectionBackground": "#262236",
"black": "#1e1a2c",
"black": "#56526c",
"red": "#c49080",
"green": "#a0d4a8",
"yellow": "#c4b080",
"blue": "#8cc0e0",
"purple": "#b8a0e0",
"cyan": "#88c0b8",
"white": "#b0a8c4",
"brightBlack": "#302c42",
"brightBlack": "#68647e",
"brightRed": "#d0a0b8",
"brightGreen": "#a8d4b8",
"brightYellow": "#e8b4a0",
Expand Down
30 changes: 30 additions & 0 deletions tests/contrast.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,34 @@ describe("validatePalette", () => {
it("throws on missing required palette groups", () => {
expect(() => validatePalette({} as any)).toThrow("Palette missing required group");
});

it("fails when ansi black has insufficient contrast against base", () => {
const badPalette = {
name: "bad",
variant: "dark",
backgrounds: { base: "#12101e" },
foregrounds: { text: "#d8d0e4" },
accents: {},
ansi: { black: "#12101e" },
special: {},
};
const results = validatePalette(badPalette as any);
expect(results.pass).toBe(false);
expect(results.failures.some(f => f.name.includes("ansi black"))).toBe(true);
});

it("fails when ansi brightBlack has insufficient contrast against base", () => {
const badPalette = {
name: "bad",
variant: "dark",
backgrounds: { base: "#12101e" },
foregrounds: { text: "#d8d0e4" },
accents: {},
ansi: { brightBlack: "#1e1a2c" },
special: {},
};
const results = validatePalette(badPalette as any);
expect(results.pass).toBe(false);
expect(results.failures.some(f => f.name.includes("ansi brightBlack"))).toBe(true);
});
});
Loading