From 64f567fc5184aa421bfdde1ef3f254b9ca8c3efa Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 10:19:01 -0300 Subject: Ayu, as close to the original as pardes draws: ayu_dark, ayu_mirage, ayu_light Every colour is the original's own, cited file:line in each theme file. Sources: palette (themes/*.yaml, generated src/generated/*.ts); https://github.com/ayu-theme/ayu-colors; ~/05-genizah/ayu-colors; b0fd979a1ddf050101b43311fa598a1a9c5f1bbc VS Code port (roles, terminal colours); https://github.com/ayu-theme/vscode-ayu; ~/05-genizah/vscode-ayu; d676974ebb245fa5a7ae4444027f72801017f1b6 Chrome moved to meet pardes's floors (text, syntax, ANSI untouched): ayu_dark: focused tag ground #10141c -> #33363b: 1.03:1 off the unfocused #0d1017, pardes needs 1.5:1 on a dark page ayu_dark: unfocused tag text #5a6378 -> #747c8e: 3.16:1 on #0d1017, tag text needs 4.5:1 to be read and run ayu_dark: rules between panes #1b1f29 -> #393b42: 1.12:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) ayu_dark: scroll thumb #2e3441 -> #313743: 1.48:1 on its track #10141c ayu_mirage: focused tag ground #242936 -> #3f434c: 1.07:1 off the unfocused #1f2430, pardes needs 1.5:1 on a dark page ayu_mirage: unfocused tag text #707a8c -> #848d9c: 3.58:1 on #1f2430, tag text needs 4.5:1 to be read and run ayu_mirage: rules between panes #171b24 -> #46494d: 1.19:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) ayu_light: focused tag ground #fcfcfc -> #dcddde: 1.03:1 off the unfocused #f8f9fa, pardes needs 1.25:1 on a light page ayu_light: unfocused tag text #828e9f -> #68727f: 3.15:1 on #f8f9fa, tag text needs 4.5:1 to be read and run ayu_light: rules between panes #eaedef -> #c5c9cb: 1.15:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) --- docs/themes.md | 1 + src/colors.zig | 4 ++ src/themes/ayu_dark.zig | 105 ++++++++++++++++++++++++++++++++++++++++++++++ src/themes/ayu_light.zig | 104 +++++++++++++++++++++++++++++++++++++++++++++ src/themes/ayu_mirage.zig | 104 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 318 insertions(+) create mode 100644 src/themes/ayu_dark.zig create mode 100644 src/themes/ayu_light.zig create mode 100644 src/themes/ayu_mirage.zig diff --git a/docs/themes.md b/docs/themes.md index 559f8edb..88e3fc10 100644 --- a/docs/themes.md +++ b/docs/themes.md @@ -115,6 +115,7 @@ are never adjusted. | Seoul256 | `seoul256_dark_233`, `seoul256_dark_234`, `seoul256_dark_235`, `seoul256_dark_236`, `seoul256_dark_237`, `seoul256_dark_238`, `seoul256_dark_239`, `seoul256_light_252`, `seoul256_light_253`, `seoul256_light_254`, `seoul256_light_255`, `seoul256_light_256` | [junegunn/seoul256.vim](https://github.com/junegunn/seoul256.vim) | | Zenbones | `zenbones_light`, `zenbones_dark`, `neobones_light`, `neobones_dark`, `vimbones`, `forestbones_light`, `forestbones_dark`, `nordbones`, `rosebones_light`, `rosebones_dark`, `tokyobones_light`, `tokyobones_dark`, `seoulbones_light`, `seoulbones_dark`, `duckbones`, `zenburned`, `zenwritten_light`, `zenwritten_dark`, `kanagawabones` | [zenbones-theme/zenbones.nvim](https://github.com/zenbones-theme/zenbones.nvim) | | Nord | `nord` | [nordtheme/nord](https://github.com/nordtheme/nord); [nordtheme/vim](https://github.com/nordtheme/vim); [nordtheme/visual-studio-code](https://github.com/nordtheme/visual-studio-code) | +| Ayu | `ayu_dark`, `ayu_mirage`, `ayu_light` | [ayu-theme/ayu-colors](https://github.com/ayu-theme/ayu-colors); [ayu-theme/vscode-ayu](https://github.com/ayu-theme/vscode-ayu) | ## Make a theme your own diff --git a/src/colors.zig b/src/colors.zig index 6b4947fd..59d1d4e2 100644 --- a/src/colors.zig +++ b/src/colors.zig @@ -384,6 +384,9 @@ const curated = struct { pub const zenwritten_dark = @import("themes/zenwritten_dark.zig"); pub const kanagawabones = @import("themes/kanagawabones.zig"); pub const nord = @import("themes/nord.zig"); + pub const ayu_dark = @import("themes/ayu_dark.zig"); + pub const ayu_mirage = @import("themes/ayu_mirage.zig"); + pub const ayu_light = @import("themes/ayu_light.zig"); // The legacy pair last. pub const helix = @import("themes/helix.zig"); pub const dark = @import("themes/dark.zig"); @@ -457,6 +460,7 @@ const theme_groups = [_]ThemeGroup{ .{ .title = "Seoul256", .first = "seoul256_dark_233" }, .{ .title = "Zenbones", .first = "zenbones_light" }, .{ .title = "Nord", .first = "nord" }, + .{ .title = "Ayu", .first = "ayu_dark" }, .{ .title = "Legacy themes", .first = "helix" }, }; diff --git a/src/themes/ayu_dark.zig b/src/themes/ayu_dark.zig new file mode 100644 index 00000000..62fb29ed --- /dev/null +++ b/src/themes/ayu_dark.zig @@ -0,0 +1,105 @@ +//! Ayu Dark: Ayu, as close to the original as pardes can draw it. +//! Every value is the original's own, cited on its line (path:line key); the +//! chrome pardes needs and the original lacks is derived from its palette. +//! Sources: +//! palette (themes/*.yaml, generated src/generated/*.ts); url https://github.com/ayu-theme/ayu-colors; genizah ~/05-genizah/ayu-colors; commit b0fd979a1ddf050101b43311fa598a1a9c5f1bbc +//! VS Code port (roles, terminal colours); url https://github.com/ayu-theme/vscode-ayu; genizah ~/05-genizah/vscode-ayu; commit d676974ebb245fa5a7ae4444027f72801017f1b6 +//! Tags: the tab (focused = the active tab, unfocused = the inactive one). +//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched): +//! - focused tag ground #10141c -> #33363b: 1.03:1 off the unfocused #0d1017, pardes needs 1.5:1 on a dark page +//! - unfocused tag text #5a6378 -> #747c8e: 3.16:1 on #0d1017, tag text needs 4.5:1 to be read and run +//! - rules between panes #1b1f29 -> #393b42: 1.12:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) +//! - scroll thumb #2e3441 -> #313743: 1.48:1 on its track #10141c +//! Upstream notes: Roles from vscode-ayu's generated ayu-dark.json (bordered +//! variant, the one package.json ships as the default); syntax roles are its +//! tokenColors and each is checked equal to ayu-colors syntax.* in +//! src/generated/dark.ts (that file is ayu-colors' own generator output: `npx +//! tsx scripts/generate-themes.ts` run in the genizah checkout; it resolves the +//! OKLCH l1..l5 steps and -L/A modifiers of themes/dark.yaml). type = +//! tokenColors "Entity name" (scope entity.name, covers entity.name.type; there +//! is no entity.name.type rule). number and constant share syntax.constant. +//! status_* from VS Code statusBar.* (one status bar: status_nc_* null). +//! tabline_* from tab.*; tabline_fill = editorGroupHeader.tabsBackground. Alpha +//! composited over editor.background (selection, line numbers, cursorline, +//! split, scrollbar thumb). scroll_track null: VS Code has no track key +//! (transparent over the editor). search_fg, selection_fg null: not set. +//! info/hint null: neither vscode-ayu nor ayu-colors defines an info/hint +//! colour (VS Code falls back to its own defaults). accent = focusBorder = +//! common.accent.tint. ansi is vscode-ayu's terminal.ansi* +//! (src/template.ts:458-473: normal = syntax.* darken(0.1) except green = +//! vcs.added, black/white/brightBlack from a fixed table at template.ts:5), +//! which differs from ayu-colors' own terminal.* section (listed in palette as +//! terminal.*). palette = every colour of src/generated/dark.ts; alpha entries +//! composited over editor.bg (editor.*) or ui.bg (others); skipped shadows: +//! ui.panel.shadow, ui.popup.shadow. +pub const theme = .{ + .name = "ayu_dark", + // ~/05-genizah/vscode-ayu/ayu-dark.json:106 editor.background; source ~/05-genizah/ayu-colors/src/generated/dark.ts:146 editor.bg #10141c + .bg = .{ 0x10, 0x14, 0x1c }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:107 editor.foreground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:128 editor.fg #bfbdb6 + .fg = .{ 0xbf, 0xbd, 0xb6 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:112 editor.selectionBackground #3388ff40 composited over editor.background #10141c (~/05-genizah/vscode-ayu/ayu-dark.json:106 editor.background) + .sel_bg = .{ 0x19, 0x31, 0x55 }, + // the original keeps text colours over its selection; its text colour + .sel_fg = .{ 0xbf, 0xbd, 0xb6 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:102 tab.inactiveBackground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:163 ui.bg #0d1017 + .tag_bg = .{ 0x0d, 0x10, 0x17 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:103 tab.inactiveForeground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:149 ui.fg #5a6378 #5a6378, adjusted + .tag_fg = .{ 0x74, 0x7c, 0x8e }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:96 tab.activeBackground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:146 editor.bg #10141c #10141c, adjusted + .tag_active_bg = .{ 0x33, 0x36, 0x3b }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:97 tab.activeForeground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:128 editor.fg #bfbdb6 + .tag_active_fg = .{ 0xbf, 0xbd, 0xb6 }, + // the focused grip: ~/05-genizah/vscode-ayu/ayu-dark.json:4 focusBorder [also tab.activeBorderTop]; source ~/05-genizah/ayu-colors/src/generated/dark.ts:167 common.accent.tint #e6b450 + .box = .{ 0xe6, 0xb4, 0x50 }, + // derived: the grip at rest, the accent #e6b450 faded toward the unfocused tag #0d1017 as far as 1.6:1 off it (0.24 of the way) + .box_dim = .{ 0x41, 0x37, 0x25 }, + // an unsaved grip: the original's modified colour, ~/05-genizah/vscode-ayu/ayu-dark.json:145 editorGutter.modifiedBackground [also gitDecoration.modifiedResourceForeground]; source ~/05-genizah/ayu-colors/src/generated/dark.ts:118 vcs.modified #73b8ff + .box_dirty = .{ 0x73, 0xb8, 0xff }, + // derived: the column grip, the original's type colour, ~/05-genizah/vscode-ayu/ayu-dark.json:622 tokenColors "Entity name" foreground; = syntax.entity (~/05-genizah/ayu-colors/src/generated/dark.ts:88 syntax.entity) + .column_box = .{ 0x59, 0xc2, 0xff }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:460 tokenColors "Keyword" foreground; = syntax.keyword (~/05-genizah/ayu-colors/src/generated/dark.ts:92 syntax.keyword) + .kw = .{ 0xff, 0x8f, 0x40 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:384 tokenColors "String" foreground; = syntax.string (~/05-genizah/ayu-colors/src/generated/dark.ts:89 syntax.string) + .str = .{ 0xaa, 0xd9, 0x4c }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:404 tokenColors "Number" foreground; = syntax.constant (~/05-genizah/ayu-colors/src/generated/dark.ts:95 syntax.constant) + .num = .{ 0xd2, 0xa6, 0xff }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:374 tokenColors "Comment" foreground; = syntax.comment (~/05-genizah/ayu-colors/src/generated/dark.ts:94 syntax.comment) + .comment = .{ 0x5a, 0x66, 0x73 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:108 editorLineNumber.foreground #5a6378a6 composited over editor.background #10141c (~/05-genizah/vscode-ayu/ayu-dark.json:106 editor.background) [gutter has no own bg, so editor bg] + .lineno = .{ 0x40, 0x47, 0x58 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:109 editorLineNumber.activeForeground [gutter has no own bg, so editor bg] + .lineno_active = .{ 0x5a, 0x63, 0x78 }, + // derived: none in the original; the page + .scroll_track = .{ 0x10, 0x14, 0x1c }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:44 scrollbarSlider.background #5a637866 composited over editor.background #10141c (~/05-genizah/vscode-ayu/ayu-dark.json:106 editor.background) #2e3441, adjusted + .scroll_thumb = .{ 0x31, 0x37, 0x43 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:92 editorGroup.border; source ~/05-genizah/ayu-colors/src/generated/dark.ts:150 ui.line #1b1f29 #1b1f29, adjusted + .border = .{ 0x39, 0x3b, 0x42 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:119 editor.findMatchBackground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:135 editor.findMatch.active #4c4126 + .search_bg = .{ 0x4c, 0x41, 0x26 }, + // derived: the original keeps text colours over a match; the page's text, whichever reads better on it + .search_fg = .{ 0xbf, 0xbd, 0xb6 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:143 editorError.foreground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:170 common.error #d95757 + .diagnostic_error = .{ 0xd9, 0x57, 0x57 }, + // ~/05-genizah/vscode-ayu/ayu-dark.json:144 editorWarning.foreground; source ~/05-genizah/ayu-colors/src/generated/dark.ts:167 common.accent.tint #e6b450 + .diagnostic_warning = .{ 0xe6, 0xb4, 0x50 }, + .palette = .{ + .{ 0x1b, 0x1f, 0x29 }, // 0: ~/05-genizah/vscode-ayu/ayu-dark.json:264 terminal.ansiBlack + .{ 0xf0, 0x6b, 0x73 }, // 1: ~/05-genizah/vscode-ayu/ayu-dark.json:265 terminal.ansiRed + .{ 0x70, 0xbf, 0x56 }, // 2: ~/05-genizah/vscode-ayu/ayu-dark.json:266 terminal.ansiGreen + .{ 0xfd, 0xb0, 0x4c }, // 3: ~/05-genizah/vscode-ayu/ayu-dark.json:267 terminal.ansiYellow + .{ 0x4f, 0xbf, 0xff }, // 4: ~/05-genizah/vscode-ayu/ayu-dark.json:268 terminal.ansiBlue + .{ 0xd0, 0xa1, 0xff }, // 5: ~/05-genizah/vscode-ayu/ayu-dark.json:269 terminal.ansiMagenta + .{ 0x93, 0xe2, 0xc8 }, // 6: ~/05-genizah/vscode-ayu/ayu-dark.json:270 terminal.ansiCyan + .{ 0xc7, 0xc7, 0xc7 }, // 7: ~/05-genizah/vscode-ayu/ayu-dark.json:271 terminal.ansiWhite + .{ 0x68, 0x68, 0x68 }, // 8: ~/05-genizah/vscode-ayu/ayu-dark.json:272 terminal.ansiBrightBlack + .{ 0xf0, 0x71, 0x78 }, // 9: ~/05-genizah/vscode-ayu/ayu-dark.json:273 terminal.ansiBrightRed + .{ 0xaa, 0xd9, 0x4c }, // 10: ~/05-genizah/vscode-ayu/ayu-dark.json:274 terminal.ansiBrightGreen + .{ 0xff, 0xb4, 0x54 }, // 11: ~/05-genizah/vscode-ayu/ayu-dark.json:275 terminal.ansiBrightYellow + .{ 0x59, 0xc2, 0xff }, // 12: ~/05-genizah/vscode-ayu/ayu-dark.json:276 terminal.ansiBrightBlue + .{ 0xd2, 0xa6, 0xff }, // 13: ~/05-genizah/vscode-ayu/ayu-dark.json:277 terminal.ansiBrightMagenta + .{ 0x95, 0xe6, 0xcb }, // 14: ~/05-genizah/vscode-ayu/ayu-dark.json:278 terminal.ansiBrightCyan + .{ 0xff, 0xff, 0xff }, // 15: ~/05-genizah/vscode-ayu/ayu-dark.json:279 terminal.ansiBrightWhite + }, +}; diff --git a/src/themes/ayu_light.zig b/src/themes/ayu_light.zig new file mode 100644 index 00000000..22436be7 --- /dev/null +++ b/src/themes/ayu_light.zig @@ -0,0 +1,104 @@ +//! Ayu Light: Ayu, as close to the original as pardes can draw it. +//! Every value is the original's own, cited on its line (path:line key); the +//! chrome pardes needs and the original lacks is derived from its palette. +//! Sources: +//! palette (themes/*.yaml, generated src/generated/*.ts); url https://github.com/ayu-theme/ayu-colors; genizah ~/05-genizah/ayu-colors; commit b0fd979a1ddf050101b43311fa598a1a9c5f1bbc +//! VS Code port (roles, terminal colours); url https://github.com/ayu-theme/vscode-ayu; genizah ~/05-genizah/vscode-ayu; commit d676974ebb245fa5a7ae4444027f72801017f1b6 +//! Tags: the tab (focused = the active tab, unfocused = the inactive one). +//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched): +//! - focused tag ground #fcfcfc -> #dcddde: 1.03:1 off the unfocused #f8f9fa, pardes needs 1.25:1 on a light page +//! - unfocused tag text #828e9f -> #68727f: 3.15:1 on #f8f9fa, tag text needs 4.5:1 to be read and run +//! - rules between panes #eaedef -> #c5c9cb: 1.15:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) +//! Upstream notes: Roles from vscode-ayu's generated ayu-light.json (bordered +//! variant, the one package.json ships as the default); syntax roles are its +//! tokenColors and each is checked equal to ayu-colors syntax.* in +//! src/generated/light.ts (that file is ayu-colors' own generator output: `npx +//! tsx scripts/generate-themes.ts` run in the genizah checkout; it resolves the +//! OKLCH l1..l5 steps and -L/A modifiers of themes/light.yaml). type = +//! tokenColors "Entity name" (scope entity.name, covers entity.name.type; there +//! is no entity.name.type rule). number and constant share syntax.constant. +//! status_* from VS Code statusBar.* (one status bar: status_nc_* null). +//! tabline_* from tab.*; tabline_fill = editorGroupHeader.tabsBackground. Alpha +//! composited over editor.background (selection, line numbers, cursorline, +//! split, scrollbar thumb). scroll_track null: VS Code has no track key +//! (transparent over the editor). search_fg, selection_fg null: not set. +//! info/hint null: neither vscode-ayu nor ayu-colors defines an info/hint +//! colour (VS Code falls back to its own defaults). accent = focusBorder = +//! common.accent.tint. ansi is vscode-ayu's terminal.ansi* +//! (src/template.ts:458-473: normal = syntax.* darken(0.1) except green = +//! vcs.added, black/white/brightBlack from a fixed table at template.ts:5), +//! which differs from ayu-colors' own terminal.* section (listed in palette as +//! terminal.*). palette = every colour of src/generated/light.ts; alpha entries +//! composited over editor.bg (editor.*) or ui.bg (others); skipped shadows: +//! ui.panel.shadow, ui.popup.shadow. +pub const theme = .{ + .name = "ayu_light", + // ~/05-genizah/vscode-ayu/ayu-light.json:106 editor.background; source ~/05-genizah/ayu-colors/src/generated/light.ts:157 editor.bg #fcfcfc + .bg = .{ 0xfc, 0xfc, 0xfc }, + // ~/05-genizah/vscode-ayu/ayu-light.json:107 editor.foreground; source ~/05-genizah/ayu-colors/src/generated/light.ts:140 editor.fg #5c6166 + .fg = .{ 0x5c, 0x61, 0x66 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:112 editor.selectionBackground #035bd626 composited over editor.background #fcfcfc (~/05-genizah/vscode-ayu/ayu-light.json:106 editor.background) + .sel_bg = .{ 0xd7, 0xe4, 0xf6 }, + // the original keeps text colours over its selection; its text colour + .sel_fg = .{ 0x5c, 0x61, 0x66 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:102 tab.inactiveBackground; source ~/05-genizah/ayu-colors/src/generated/light.ts:175 ui.bg #f8f9fa + .tag_bg = .{ 0xf8, 0xf9, 0xfa }, + // ~/05-genizah/vscode-ayu/ayu-light.json:103 tab.inactiveForeground; source ~/05-genizah/ayu-colors/src/generated/light.ts:161 ui.fg #828e9f #828e9f, adjusted + .tag_fg = .{ 0x68, 0x72, 0x7f }, + // ~/05-genizah/vscode-ayu/ayu-light.json:96 tab.activeBackground; source ~/05-genizah/ayu-colors/src/generated/light.ts:157 editor.bg #fcfcfc #fcfcfc, adjusted + .tag_active_bg = .{ 0xdc, 0xdd, 0xde }, + // ~/05-genizah/vscode-ayu/ayu-light.json:97 tab.activeForeground; source ~/05-genizah/ayu-colors/src/generated/light.ts:140 editor.fg #5c6166 + .tag_active_fg = .{ 0x5c, 0x61, 0x66 }, + // the focused grip: ~/05-genizah/vscode-ayu/ayu-light.json:4 focusBorder [also tab.activeBorderTop]; source ~/05-genizah/ayu-colors/src/generated/light.ts:179 common.accent.tint #f29718 + .box = .{ 0xf2, 0x97, 0x18 }, + // derived: the grip at rest, the accent #f29718 faded toward the unfocused tag #f8f9fa as far as 1.6:1 off it (0.62 of the way) + .box_dim = .{ 0xf4, 0xbc, 0x6e }, + // an unsaved grip: the original's modified colour, ~/05-genizah/vscode-ayu/ayu-light.json:145 editorGutter.modifiedBackground [also gitDecoration.modifiedResourceForeground]; source ~/05-genizah/ayu-colors/src/generated/light.ts:130 vcs.modified #478acc + .box_dirty = .{ 0x47, 0x8a, 0xcc }, + // derived: the column grip, the original's type colour, ~/05-genizah/vscode-ayu/ayu-light.json:622 tokenColors "Entity name" foreground; = syntax.entity (~/05-genizah/ayu-colors/src/generated/light.ts:92 syntax.entity) + .column_box = .{ 0x22, 0xa4, 0xe6 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:460 tokenColors "Keyword" foreground; = syntax.keyword (~/05-genizah/ayu-colors/src/generated/light.ts:100 syntax.keyword) + .kw = .{ 0xfa, 0x85, 0x32 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:384 tokenColors "String" foreground; = syntax.string (~/05-genizah/ayu-colors/src/generated/light.ts:94 syntax.string) + .str = .{ 0x86, 0xb3, 0x00 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:404 tokenColors "Number" foreground; = syntax.constant (~/05-genizah/ayu-colors/src/generated/light.ts:106 syntax.constant) + .num = .{ 0xa3, 0x7a, 0xcc }, + // ~/05-genizah/vscode-ayu/ayu-light.json:374 tokenColors "Comment" foreground; = syntax.comment (~/05-genizah/ayu-colors/src/generated/light.ts:104 syntax.comment) + .comment = .{ 0xad, 0xae, 0xb1 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:108 editorLineNumber.foreground #828e9f66 composited over editor.background #fcfcfc (~/05-genizah/vscode-ayu/ayu-light.json:106 editor.background) [gutter has no own bg, so editor bg] + .lineno = .{ 0xcb, 0xd0, 0xd7 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:109 editorLineNumber.activeForeground #828e9fcc composited over editor.background #fcfcfc (~/05-genizah/vscode-ayu/ayu-light.json:106 editor.background) [gutter has no own bg, so editor bg] + .lineno_active = .{ 0x9a, 0xa4, 0xb2 }, + // derived: none in the original; the page + .scroll_track = .{ 0xfc, 0xfc, 0xfc }, + // ~/05-genizah/vscode-ayu/ayu-light.json:44 scrollbarSlider.background #828e9f66 composited over editor.background #fcfcfc (~/05-genizah/vscode-ayu/ayu-light.json:106 editor.background) + .scroll_thumb = .{ 0xcb, 0xd0, 0xd7 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:92 editorGroup.border #6b7d8f1f composited over editor.background #fcfcfc (~/05-genizah/vscode-ayu/ayu-light.json:106 editor.background); source ~/05-genizah/ayu-colors/src/generated/light.ts:162 ui.line #6b7d8f1f #eaedef, adjusted + .border = .{ 0xc5, 0xc9, 0xcb }, + // ~/05-genizah/vscode-ayu/ayu-light.json:119 editor.findMatchBackground; source ~/05-genizah/ayu-colors/src/generated/light.ts:146 editor.findMatch.active #ffe294 + .search_bg = .{ 0xff, 0xe2, 0x94 }, + // derived: the original keeps text colours over a match; the page's text, whichever reads better on it + .search_fg = .{ 0x5c, 0x61, 0x66 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:143 editorError.foreground; source ~/05-genizah/ayu-colors/src/generated/light.ts:182 common.error #e65050 + .diagnostic_error = .{ 0xe6, 0x50, 0x50 }, + // ~/05-genizah/vscode-ayu/ayu-light.json:144 editorWarning.foreground; source ~/05-genizah/ayu-colors/src/generated/light.ts:179 common.accent.tint #f29718 + .diagnostic_warning = .{ 0xf2, 0x97, 0x18 }, + .palette = .{ + .{ 0x00, 0x00, 0x00 }, // 0: ~/05-genizah/vscode-ayu/ayu-light.json:264 terminal.ansiBlack + .{ 0xf0, 0x6b, 0x6c }, // 1: ~/05-genizah/vscode-ayu/ayu-light.json:265 terminal.ansiRed + .{ 0x6c, 0xbf, 0x43 }, // 2: ~/05-genizah/vscode-ayu/ayu-light.json:266 terminal.ansiGreen + .{ 0xe7, 0xa1, 0x00 }, // 3: ~/05-genizah/vscode-ayu/ayu-light.json:267 terminal.ansiYellow + .{ 0x21, 0xa1, 0xe2 }, // 4: ~/05-genizah/vscode-ayu/ayu-light.json:268 terminal.ansiBlue + .{ 0xa1, 0x76, 0xcb }, // 5: ~/05-genizah/vscode-ayu/ayu-light.json:269 terminal.ansiMagenta + .{ 0x4a, 0xbc, 0x96 }, // 6: ~/05-genizah/vscode-ayu/ayu-light.json:270 terminal.ansiCyan + .{ 0xc7, 0xc7, 0xc7 }, // 7: ~/05-genizah/vscode-ayu/ayu-light.json:271 terminal.ansiWhite + .{ 0x68, 0x68, 0x68 }, // 8: ~/05-genizah/vscode-ayu/ayu-light.json:272 terminal.ansiBrightBlack + .{ 0xf0, 0x71, 0x71 }, // 9: ~/05-genizah/vscode-ayu/ayu-light.json:273 terminal.ansiBrightRed + .{ 0x86, 0xb3, 0x00 }, // 10: ~/05-genizah/vscode-ayu/ayu-light.json:274 terminal.ansiBrightGreen + .{ 0xeb, 0xa4, 0x00 }, // 11: ~/05-genizah/vscode-ayu/ayu-light.json:275 terminal.ansiBrightYellow + .{ 0x22, 0xa4, 0xe6 }, // 12: ~/05-genizah/vscode-ayu/ayu-light.json:276 terminal.ansiBrightBlue + .{ 0xa3, 0x7a, 0xcc }, // 13: ~/05-genizah/vscode-ayu/ayu-light.json:277 terminal.ansiBrightMagenta + .{ 0x4c, 0xbf, 0x99 }, // 14: ~/05-genizah/vscode-ayu/ayu-light.json:278 terminal.ansiBrightCyan + .{ 0xd1, 0xd1, 0xd1 }, // 15: ~/05-genizah/vscode-ayu/ayu-light.json:279 terminal.ansiBrightWhite + }, +}; diff --git a/src/themes/ayu_mirage.zig b/src/themes/ayu_mirage.zig new file mode 100644 index 00000000..23aff67f --- /dev/null +++ b/src/themes/ayu_mirage.zig @@ -0,0 +1,104 @@ +//! Ayu Mirage: Ayu, as close to the original as pardes can draw it. +//! Every value is the original's own, cited on its line (path:line key); the +//! chrome pardes needs and the original lacks is derived from its palette. +//! Sources: +//! palette (themes/*.yaml, generated src/generated/*.ts); url https://github.com/ayu-theme/ayu-colors; genizah ~/05-genizah/ayu-colors; commit b0fd979a1ddf050101b43311fa598a1a9c5f1bbc +//! VS Code port (roles, terminal colours); url https://github.com/ayu-theme/vscode-ayu; genizah ~/05-genizah/vscode-ayu; commit d676974ebb245fa5a7ae4444027f72801017f1b6 +//! Tags: the tab (focused = the active tab, unfocused = the inactive one). +//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched): +//! - focused tag ground #242936 -> #3f434c: 1.07:1 off the unfocused #1f2430, pardes needs 1.5:1 on a dark page +//! - unfocused tag text #707a8c -> #848d9c: 3.58:1 on #1f2430, tag text needs 4.5:1 to be read and run +//! - rules between panes #171b24 -> #46494d: 1.19:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does) +//! Upstream notes: Roles from vscode-ayu's generated ayu-mirage.json (bordered +//! variant, the one package.json ships as the default); syntax roles are its +//! tokenColors and each is checked equal to ayu-colors syntax.* in +//! src/generated/mirage.ts (that file is ayu-colors' own generator output: `npx +//! tsx scripts/generate-themes.ts` run in the genizah checkout; it resolves the +//! OKLCH l1..l5 steps and -L/A modifiers of themes/mirage.yaml). type = +//! tokenColors "Entity name" (scope entity.name, covers entity.name.type; there +//! is no entity.name.type rule). number and constant share syntax.constant. +//! status_* from VS Code statusBar.* (one status bar: status_nc_* null). +//! tabline_* from tab.*; tabline_fill = editorGroupHeader.tabsBackground. Alpha +//! composited over editor.background (selection, line numbers, cursorline, +//! split, scrollbar thumb). scroll_track null: VS Code has no track key +//! (transparent over the editor). search_fg, selection_fg null: not set. +//! info/hint null: neither vscode-ayu nor ayu-colors defines an info/hint +//! colour (VS Code falls back to its own defaults). accent = focusBorder = +//! common.accent.tint. ansi is vscode-ayu's terminal.ansi* +//! (src/template.ts:458-473: normal = syntax.* darken(0.1) except green = +//! vcs.added, black/white/brightBlack from a fixed table at template.ts:5), +//! which differs from ayu-colors' own terminal.* section (listed in palette as +//! terminal.*). palette = every colour of src/generated/mirage.ts; alpha +//! entries composited over editor.bg (editor.*) or ui.bg (others); skipped +//! shadows: ui.panel.shadow, ui.popup.shadow. +pub const theme = .{ + .name = "ayu_mirage", + // ~/05-genizah/vscode-ayu/ayu-mirage.json:106 editor.background; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:146 editor.bg #242936 + .bg = .{ 0x24, 0x29, 0x36 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:107 editor.foreground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:128 editor.fg #cccac2 + .fg = .{ 0xcc, 0xca, 0xc2 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:112 editor.selectionBackground #409fff40 composited over editor.background #242936 (~/05-genizah/vscode-ayu/ayu-mirage.json:106 editor.background) + .sel_bg = .{ 0x2b, 0x47, 0x68 }, + // the original keeps text colours over its selection; its text colour + .sel_fg = .{ 0xcc, 0xca, 0xc2 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:102 tab.inactiveBackground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:163 ui.bg #1f2430 + .tag_bg = .{ 0x1f, 0x24, 0x30 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:103 tab.inactiveForeground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:149 ui.fg #707a8c #707a8c, adjusted + .tag_fg = .{ 0x84, 0x8d, 0x9c }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:96 tab.activeBackground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:146 editor.bg #242936 #242936, adjusted + .tag_active_bg = .{ 0x3f, 0x43, 0x4c }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:97 tab.activeForeground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:128 editor.fg #cccac2 + .tag_active_fg = .{ 0xcc, 0xca, 0xc2 }, + // the focused grip: ~/05-genizah/vscode-ayu/ayu-mirage.json:4 focusBorder [also tab.activeBorderTop]; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:167 common.accent.tint #ffcc66 + .box = .{ 0xff, 0xcc, 0x66 }, + // derived: the grip at rest, the accent #ffcc66 faded toward the unfocused tag #1f2430 as far as 1.6:1 off it (0.20 of the way) + .box_dim = .{ 0x4c, 0x46, 0x3b }, + // an unsaved grip: the original's modified colour, ~/05-genizah/vscode-ayu/ayu-mirage.json:145 editorGutter.modifiedBackground [also gitDecoration.modifiedResourceForeground]; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:118 vcs.modified #80bfff + .box_dirty = .{ 0x80, 0xbf, 0xff }, + // derived: the column grip, the original's type colour, ~/05-genizah/vscode-ayu/ayu-mirage.json:622 tokenColors "Entity name" foreground; = syntax.entity (~/05-genizah/ayu-colors/src/generated/mirage.ts:88 syntax.entity) + .column_box = .{ 0x73, 0xd0, 0xff }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:460 tokenColors "Keyword" foreground; = syntax.keyword (~/05-genizah/ayu-colors/src/generated/mirage.ts:92 syntax.keyword) + .kw = .{ 0xff, 0xa6, 0x59 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:384 tokenColors "String" foreground; = syntax.string (~/05-genizah/ayu-colors/src/generated/mirage.ts:89 syntax.string) + .str = .{ 0xd5, 0xff, 0x80 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:404 tokenColors "Number" foreground; = syntax.constant (~/05-genizah/ayu-colors/src/generated/mirage.ts:95 syntax.constant) + .num = .{ 0xdf, 0xbf, 0xff }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:374 tokenColors "Comment" foreground; = syntax.comment (~/05-genizah/ayu-colors/src/generated/mirage.ts:94 syntax.comment) + .comment = .{ 0x6e, 0x7c, 0x8f }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:108 editorLineNumber.foreground #707a8c80 composited over editor.background #242936 (~/05-genizah/vscode-ayu/ayu-mirage.json:106 editor.background) [gutter has no own bg, so editor bg] + .lineno = .{ 0x4a, 0x52, 0x61 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:109 editorLineNumber.activeForeground [gutter has no own bg, so editor bg] + .lineno_active = .{ 0x70, 0x7a, 0x8c }, + // derived: none in the original; the page + .scroll_track = .{ 0x24, 0x29, 0x36 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:44 scrollbarSlider.background #707a8c66 composited over editor.background #242936 (~/05-genizah/vscode-ayu/ayu-mirage.json:106 editor.background) + .scroll_thumb = .{ 0x42, 0x49, 0x58 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:92 editorGroup.border; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:150 ui.line #171b24 #171b24, adjusted + .border = .{ 0x46, 0x49, 0x4d }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:119 editor.findMatchBackground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:135 editor.findMatch.active #736950 + .search_bg = .{ 0x73, 0x69, 0x50 }, + // derived: the original keeps text colours over a match; the page's text, whichever reads better on it + .search_fg = .{ 0xcc, 0xca, 0xc2 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:143 editorError.foreground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:170 common.error #ff6666 + .diagnostic_error = .{ 0xff, 0x66, 0x66 }, + // ~/05-genizah/vscode-ayu/ayu-mirage.json:144 editorWarning.foreground; source ~/05-genizah/ayu-colors/src/generated/mirage.ts:167 common.accent.tint #ffcc66 + .diagnostic_warning = .{ 0xff, 0xcc, 0x66 }, + .palette = .{ + .{ 0x17, 0x1b, 0x24 }, // 0: ~/05-genizah/vscode-ayu/ayu-mirage.json:264 terminal.ansiBlack + .{ 0xf2, 0x82, 0x73 }, // 1: ~/05-genizah/vscode-ayu/ayu-mirage.json:265 terminal.ansiRed + .{ 0x87, 0xd9, 0x6c }, // 2: ~/05-genizah/vscode-ayu/ayu-mirage.json:266 terminal.ansiGreen + .{ 0xfc, 0xca, 0x60 }, // 3: ~/05-genizah/vscode-ayu/ayu-mirage.json:267 terminal.ansiYellow + .{ 0x6a, 0xcd, 0xff }, // 4: ~/05-genizah/vscode-ayu/ayu-mirage.json:268 terminal.ansiBlue + .{ 0xdd, 0xbb, 0xff }, // 5: ~/05-genizah/vscode-ayu/ayu-mirage.json:269 terminal.ansiMagenta + .{ 0x93, 0xe2, 0xc8 }, // 6: ~/05-genizah/vscode-ayu/ayu-mirage.json:270 terminal.ansiCyan + .{ 0xc7, 0xc7, 0xc7 }, // 7: ~/05-genizah/vscode-ayu/ayu-mirage.json:271 terminal.ansiWhite + .{ 0x68, 0x68, 0x68 }, // 8: ~/05-genizah/vscode-ayu/ayu-mirage.json:272 terminal.ansiBrightBlack + .{ 0xf2, 0x87, 0x79 }, // 9: ~/05-genizah/vscode-ayu/ayu-mirage.json:273 terminal.ansiBrightRed + .{ 0xd5, 0xff, 0x80 }, // 10: ~/05-genizah/vscode-ayu/ayu-mirage.json:274 terminal.ansiBrightGreen + .{ 0xff, 0xcd, 0x66 }, // 11: ~/05-genizah/vscode-ayu/ayu-mirage.json:275 terminal.ansiBrightYellow + .{ 0x73, 0xd0, 0xff }, // 12: ~/05-genizah/vscode-ayu/ayu-mirage.json:276 terminal.ansiBrightBlue + .{ 0xdf, 0xbf, 0xff }, // 13: ~/05-genizah/vscode-ayu/ayu-mirage.json:277 terminal.ansiBrightMagenta + .{ 0x95, 0xe6, 0xcb }, // 14: ~/05-genizah/vscode-ayu/ayu-mirage.json:278 terminal.ansiBrightCyan + .{ 0xff, 0xff, 0xff }, // 15: ~/05-genizah/vscode-ayu/ayu-mirage.json:279 terminal.ansiBrightWhite + }, +}; -- cgit v1.3