diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 10:18:45 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | e8b76d83a30a08b636f3f14666a0cdad009b0eb0 (patch) | |
| tree | 8eea4c1aa85f1029dba1dbaae5f6219d1c155371 | |
| parent | c8bcda00ad54e4f81cc83ffe601d49703f4a7135 (diff) | |
| download | pardes-e8b76d83a30a08b636f3f14666a0cdad009b0eb0.tar.gz pardes-e8b76d83a30a08b636f3f14666a0cdad009b0eb0.zip | |
Visual Studio Code, as close to the original as pardes draws: dark_plus
Every colour is the original's own, cited file:line in each theme file.
Sources:
VS Code 1.130.0 built-in theme; /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_plus.json (includes ./dark_vs.json)
VS Code source for workbench defaults; https://github.com/microsoft/vscode; ~/05-genizah/vscode; 1b6a188127eeaf9194f945eb6eb89a657e93c54c (tag 1.130.0)
Chrome moved to meet pardes's floors (text, syntax, ANSI untouched):
dark_plus: unfocused tag ground #2d2d2d -> #3c3c3c: 1.21:1 off the focused one (the page, kept), pardes needs 1.5:1 on a dark page
dark_plus: unfocused tag text #969696 -> #a7a7a7: 3.73:1 on #3c3c3c, tag text needs 4.5:1 to be read and run
| -rw-r--r-- | docs/themes.md | 1 | ||||
| -rw-r--r-- | src/colors.zig | 2 | ||||
| -rw-r--r-- | src/themes/dark_plus.zig | 85 |
3 files changed, 88 insertions, 0 deletions
diff --git a/docs/themes.md b/docs/themes.md index 9c8e91a5..b5896c51 100644 --- a/docs/themes.md +++ b/docs/themes.md @@ -104,6 +104,7 @@ are never adjusted. | Family | Themes | Source | | --- | --- | --- | +| Visual Studio Code | `dark_plus` | VS Code 1.130.0 `extensions/theme-defaults/themes/dark_plus.json` and `dark_vs.json`; [microsoft/vscode](https://github.com/microsoft/vscode) 1.130.0 | ## Make a theme your own diff --git a/src/colors.zig b/src/colors.zig index 743a74d7..c16d38da 100644 --- a/src/colors.zig +++ b/src/colors.zig @@ -326,6 +326,7 @@ const curated = struct { pub const lapis = @import("themes/lapis.zig"); // Faithful ports of well-known themes, a family at a time (src/themes/ // <name>.zig says where each value came from): `theme_groups`. + pub const dark_plus = @import("themes/dark_plus.zig"); // The legacy pair last. pub const helix = @import("themes/helix.zig"); pub const dark = @import("themes/dark.zig"); @@ -388,6 +389,7 @@ pub const native_count = @typeInfo(curated).@"struct".decls.len; pub const ThemeGroup = struct { title: []const u8, first: []const u8 }; const theme_groups = [_]ThemeGroup{ .{ .title = "Pardes themes", .first = "orchard" }, + .{ .title = "Visual Studio Code", .first = "dark_plus" }, .{ .title = "Legacy themes", .first = "helix" }, }; diff --git a/src/themes/dark_plus.zig b/src/themes/dark_plus.zig new file mode 100644 index 00000000..91092732 --- /dev/null +++ b/src/themes/dark_plus.zig @@ -0,0 +1,85 @@ +//! Dark+: Visual Studio Code, 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: +//! VS Code 1.130.0 built-in theme; path /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_plus.json (includes ./dark_vs.json) +//! VS Code source for workbench defaults; url https://github.com/microsoft/vscode; genizah ~/05-genizah/vscode; commit 1b6a188127eeaf9194f945eb6eb89a657e93c54c (tag 1.130.0) +//! 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): +//! - unfocused tag ground #2d2d2d -> #3c3c3c: 1.21:1 off the focused one (the page, kept), pardes needs 1.5:1 on a dark page +//! - unfocused tag text #969696 -> #a7a7a7: 3.73:1 on #3c3c3c, tag text needs 4.5:1 to be read and run +pub const theme = .{ + .name = "dark_plus", + // /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 colors."editor.background" + .bg = .{ 0x1e, 0x1e, 0x1e }, + // /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 colors."editor.foreground" + .fg = .{ 0xd4, 0xd4, 0xd4 }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:122 editor.selectionBackground dark + .sel_bg = .{ 0x26, 0x4f, 0x78 }, + // the original keeps text colours over its selection; its text colour + .sel_fg = .{ 0xd4, 0xd4, 0xd4 }, + // ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:36 tab.inactiveBackground dark #2d2d2d, adjusted + .tag_bg = .{ 0x3c, 0x3c, 0x3c }, + // ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:56 tab.inactiveForeground dark = transparent(tab.activeForeground #FFFFFF, 0.5) over #2d2d2d #969696, adjusted + .tag_fg = .{ 0xa7, 0xa7, 0xa7 }, + // ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:31 tab.activeBackground = editorBackground + .tag_active_bg = .{ 0x1e, 0x1e, 0x1e }, + // ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:49 tab.activeForeground dark Color.white + .tag_active_fg = .{ 0xff, 0xff, 0xff }, + // the focused grip: ~/05-genizah/vscode/src/vs/platform/theme/common/colors/baseColors.ts:38 focusBorder dark + .box = .{ 0x00, 0x7f, 0xd4 }, + // derived: the grip at rest, the accent #007fd4 faded toward the unfocused tag #3c3c3c as far as 1.6:1 off it (0.54 of the way) + .box_dim = .{ 0x1c, 0x60, 0x8e }, + // an unsaved grip: the original's modified colour, ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:176 tab.activeModifiedBorder dark + .box_dirty = .{ 0x33, 0x99, 0xcc }, + // derived: the column grip, the original's type colour, /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_plus.json:1 tokenColors entity.name.type + .column_box = .{ 0x4e, 0xc9, 0xb0 }, + // /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 tokenColors keyword (keyword.control is #C586C0 in dark_plus.json:1; pardes has one keyword colour) + .kw = .{ 0x56, 0x9c, 0xd6 }, + // /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 tokenColors string + .str = .{ 0xce, 0x91, 0x78 }, + // /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 tokenColors constant.numeric + .num = .{ 0xb5, 0xce, 0xa8 }, + // /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 tokenColors comment + .comment = .{ 0x6a, 0x99, 0x55 }, + // ~/05-genizah/vscode/src/vs/editor/common/core/editorColorRegistry.ts:29 editorLineNumber.foreground dark + .lineno = .{ 0x85, 0x85, 0x85 }, + // ~/05-genizah/vscode/src/vs/editor/common/core/editorColorRegistry.ts:48 editorActiveLineNumber.foreground dark (editorLineNumber.activeForeground defaults to it, :49) + .lineno_active = .{ 0xc6, 0xc6, 0xc6 }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/miscColors.ts:68 scrollbar.background null: the editor shows through + .scroll_track = .{ 0x1e, 0x1e, 0x1e }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/miscColors.ts:57 scrollbarSlider.background dark #797979 at 0.4, over #1e1e1e + .scroll_thumb = .{ 0x42, 0x42, 0x42 }, + // ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:237 editorGroup.border dark + .border = .{ 0x44, 0x44, 0x44 }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:149 editor.findMatchBackground dark + .search_bg = .{ 0x51, 0x5c, 0x6a }, + // derived: the original keeps text colours over a match; the page's text, whichever reads better on it + .search_fg = .{ 0xd4, 0xd4, 0xd4 }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:71 editorError.foreground dark + .diagnostic_error = .{ 0xf1, 0x4c, 0x4c }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:84 editorWarning.foreground dark + .diagnostic_warning = .{ 0xcc, 0xa7, 0x00 }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:97 editorInfo.foreground dark + .diagnostic_info = .{ 0x59, 0xa4, 0xf9 }, + // ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:106 editorHint.foreground dark #eeeeee at 0.7, over #1e1e1e + .diagnostic_hint = .{ 0xb0, 0xb0, 0xb0 }, + .palette = .{ + .{ 0x00, 0x00, 0x00 }, // 0: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:107 terminal.ansiBlack dark + .{ 0xcd, 0x31, 0x31 }, // 1: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:116 terminal.ansiRed dark + .{ 0x0d, 0xbc, 0x79 }, // 2: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:125 terminal.ansiGreen dark + .{ 0xe5, 0xe5, 0x10 }, // 3: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:134 terminal.ansiYellow dark + .{ 0x24, 0x72, 0xc8 }, // 4: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:143 terminal.ansiBlue dark + .{ 0xbc, 0x3f, 0xbc }, // 5: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:152 terminal.ansiMagenta dark + .{ 0x11, 0xa8, 0xcd }, // 6: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:161 terminal.ansiCyan dark + .{ 0xe5, 0xe5, 0xe5 }, // 7: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:170 terminal.ansiWhite dark + .{ 0x66, 0x66, 0x66 }, // 8: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:179 terminal.ansiBrightBlack dark + .{ 0xf1, 0x4c, 0x4c }, // 9: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:188 terminal.ansiBrightRed dark + .{ 0x23, 0xd1, 0x8b }, // 10: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:197 terminal.ansiBrightGreen dark + .{ 0xf5, 0xf5, 0x43 }, // 11: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:206 terminal.ansiBrightYellow dark + .{ 0x3b, 0x8e, 0xea }, // 12: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:215 terminal.ansiBrightBlue dark + .{ 0xd6, 0x70, 0xd6 }, // 13: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:224 terminal.ansiBrightMagenta dark + .{ 0x29, 0xb8, 0xdb }, // 14: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:233 terminal.ansiBrightCyan dark + .{ 0xe5, 0xe5, 0xe5 }, // 15: ~/05-genizah/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.ts:242 terminal.ansiBrightWhite dark + }, +}; |
