summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/themes.md1
-rw-r--r--src/colors.zig2
-rw-r--r--src/themes/nord.zig124
3 files changed, 127 insertions, 0 deletions
diff --git a/docs/themes.md b/docs/themes.md
index 340633fe..559f8edb 100644
--- a/docs/themes.md
+++ b/docs/themes.md
@@ -114,6 +114,7 @@ are never adjusted.
| Catppuccin | `catppuccin_latte`, `catppuccin_frappe`, `catppuccin_macchiato`, `catppuccin_mocha` | [catppuccin/palette](https://github.com/catppuccin/palette); [catppuccin/nvim](https://github.com/catppuccin/nvim) |
| 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) |
## Make a theme your own
diff --git a/src/colors.zig b/src/colors.zig
index 14979448..6b4947fd 100644
--- a/src/colors.zig
+++ b/src/colors.zig
@@ -383,6 +383,7 @@ const curated = struct {
pub const zenwritten_light = @import("themes/zenwritten_light.zig");
pub const zenwritten_dark = @import("themes/zenwritten_dark.zig");
pub const kanagawabones = @import("themes/kanagawabones.zig");
+ pub const nord = @import("themes/nord.zig");
// The legacy pair last.
pub const helix = @import("themes/helix.zig");
pub const dark = @import("themes/dark.zig");
@@ -455,6 +456,7 @@ const theme_groups = [_]ThemeGroup{
.{ .title = "Catppuccin", .first = "catppuccin_latte" },
.{ .title = "Seoul256", .first = "seoul256_dark_233" },
.{ .title = "Zenbones", .first = "zenbones_light" },
+ .{ .title = "Nord", .first = "nord" },
.{ .title = "Legacy themes", .first = "helix" },
};
diff --git a/src/themes/nord.zig b/src/themes/nord.zig
new file mode 100644
index 00000000..f74785b3
--- /dev/null
+++ b/src/themes/nord.zig
@@ -0,0 +1,124 @@
+//! Nord: Nord, 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; url https://github.com/nordtheme/nord; genizah ~/05-genizah/nord; commit 1cef71605416a222e57225b544540ce0fcec18d4
+//! vim port (roles, terminal colours); url https://github.com/nordtheme/vim; genizah ~/05-genizah/nord-vim; commit f13f5dfbb784deddbc1d8195f34dfd9ec73e2295
+//! VS Code port (reference only, see notes); url https://github.com/nordtheme/visual-studio-code; genizah ~/05-genizah/nord-visual-studio-code; commit 8ead09822c02d0d49d0f764104505e5a34d3689f
+//! Tags: the window bar (StatusLine / StatusLineNC, or mode-line / mode-line-inactive).
+//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched):
+//! - focused tag ground #4c566a -> #525d72: 1.36:1 off the unfocused #3b4252, pardes needs 1.5:1 on a dark page
+//! - focused tag text #88c0d0 -> #bcdce5: 3.31:1 on #525d72, tag text needs 4.5:1
+//! - rules between panes #434c5e -> #4c5566: 1.45:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
+//! - scroll thumb #4c566a -> #60697c: 1.17:1 on its track #434c5e
+//! Upstream notes: All roles come from nord-vim with default options (none of
+//! g:nord_* set). vim has every schema role, so VS Code was not needed; the
+//! official VS Code port differs, for reference: tabline_bg #2e3440
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:266
+//! tab.inactiveBackground), tabline_fg #727884 = #d8dee966 over
+//! tab.inactiveBackground #2e3440
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:267
+//! tab.inactiveForeground), tabline_sel_bg #3b4252
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:261
+//! tab.activeBackground), tabline_sel_fg #d8dee9
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:262
+//! tab.activeForeground), tabline_fill #2e3440
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:95
+//! editorGroupHeader.tabsBackground); scrollbar thumb #3b4252 = #434c5e99 over
+//! editor.background #2e3440
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:237
+//! scrollbarSlider.background;
+//! ~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:58
+//! editor.background), no track colour; focusBorder #3b4252
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:6
+//! focusBorder); selection #3f4758 = #434c5ecc over #2e3440
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:69
+//! editor.selectionBackground); find match #526c7a = #88c0d066 over #2e3440
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:61
+//! editor.findMatchBackground); statusBar bg #3b4252 fg #d8dee9
+//! (~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:246
+//! statusBar.background;
+//! ~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:251
+//! statusBar.foreground). Comment uses s:nord3_gui_bright #616E88
+//! (nord.vim:19), not a canonical nord colour: nord.vim brightened comments by
+//! 10% (see the deprecation message at :86-93); listed in palette as
+//! nord3_bright. ansi is g:terminal_color_0..15 (nvim); g:terminal_ansi_colors
+//! at :154 (vim 8) is the same list. selection_fg null: Visual sets no guifg.
+//! Constant fg is nord4 (plain text), so constant uses Boolean (nord9).
+//! scroll_track/thumb are the popup-menu scrollbar (PmenuSbar/PmenuThumb); vim
+//! has no window scrollbar.
+pub const theme = .{
+ .name = "nord",
+ // ~/05-genizah/nord-vim/colors/nord.vim:139 Normal guibg (s:nord0_gui = #2E3440 at :15)
+ .bg = .{ 0x2e, 0x34, 0x40 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:139 Normal guifg (s:nord4_gui = #D8DEE9 at :20)
+ .fg = .{ 0xd8, 0xde, 0xe9 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:149 Visual guibg (s:nord2_gui = #434C5E at :17)
+ .sel_bg = .{ 0x43, 0x4c, 0x5e },
+ // the original keeps text colours over its selection; its text colour
+ .sel_fg = .{ 0xd8, 0xde, 0xe9 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:223 StatusLineNC guibg (s:nord1_gui = #3B4252 at :16) [default g:nord_uniform_status_lines=0, :83]
+ .tag_bg = .{ 0x3b, 0x42, 0x52 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:223 StatusLineNC guifg (s:nord4_gui = #D8DEE9 at :20) [default g:nord_uniform_status_lines=0, :83]
+ .tag_fg = .{ 0xd8, 0xde, 0xe9 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:222 StatusLine guibg (s:nord3_gui = #4C566A at :18) [default g:nord_uniform_status_lines=0, :83] #4c566a, adjusted
+ .tag_active_bg = .{ 0x52, 0x5d, 0x72 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:222 StatusLine guifg (s:nord8_gui = #88C0D0 at :24) [default g:nord_uniform_status_lines=0, :83] #88c0d0, adjusted
+ .tag_active_fg = .{ 0xbc, 0xdc, 0xe5 },
+ // the focused grip: ~/05-genizah/nord-vim/autoload/lightline/colorscheme/nord.vim:24 s:p.normal.left section a bg s:nord8 (#88C0D0 at :15); same in ~/05-genizah/nord-vim/autoload/airline/themes/nord.vim:41 s:NMain bg s:nord8_gui
+ .box = .{ 0x88, 0xc0, 0xd0 },
+ // derived: the grip at rest, the accent #88c0d0 faded toward the unfocused tag #3b4252 as far as 1.6:1 off it (0.26 of the way)
+ .box_dim = .{ 0x4f, 0x63, 0x73 },
+ // an unsaved grip: the original's modified colour, ~/05-genizah/nord-vim/colors/nord.vim:589 GitGutterChange guifg (s:nord13_gui = #EBCB8B at :29); also DiffChange fg (inverse) at :371, SignifySignChange at :596, VS Code editorGutter.modifiedBackground #ebcb8b at ~/05-genizah/nord-visual-studio-code/themes/nord-color-theme.json:98
+ .box_dirty = .{ 0xeb, 0xcb, 0x8b },
+ // derived: the column grip, the original's string colour, ~/05-genizah/nord-vim/colors/nord.vim:281 String guifg (s:nord14_gui = #A3BE8C at :30)
+ .column_box = .{ 0xa3, 0xbe, 0x8c },
+ // ~/05-genizah/nord-vim/colors/nord.vim:270 Keyword guifg (s:nord9_gui = #81A1C1 at :25)
+ .kw = .{ 0x81, 0xa1, 0xc1 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:281 String guifg (s:nord14_gui = #A3BE8C at :30)
+ .str = .{ 0xa3, 0xbe, 0x8c },
+ // ~/05-genizah/nord-vim/colors/nord.vim:272 Number guifg (s:nord15_gui = #B48EAD at :31)
+ .num = .{ 0xb4, 0x8e, 0xad },
+ // ~/05-genizah/nord-vim/colors/nord.vim:258 Comment guifg (s:nord3_gui_bright = #616E88 at :19)
+ .comment = .{ 0x61, 0x6e, 0x88 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:136 LineNr guifg (s:nord3_gui = #4C566A at :18)
+ .lineno = .{ 0x4c, 0x56, 0x6a },
+ // ~/05-genizah/nord-vim/colors/nord.vim:204 CursorLineNr guifg (s:nord4_gui = #D8DEE9 at :20) [default g:nord_cursor_line_number_background=0, :94]
+ .lineno_active = .{ 0xd8, 0xde, 0xe9 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:141 PmenuSbar guibg (s:nord2_gui = #434C5E at :17)
+ .scroll_track = .{ 0x43, 0x4c, 0x5e },
+ // ~/05-genizah/nord-vim/colors/nord.vim:143 PmenuThumb guibg (s:nord3_gui = #4C566A at :18) #4c566a, adjusted
+ .scroll_thumb = .{ 0x60, 0x69, 0x7c },
+ // ~/05-genizah/nord-vim/colors/nord.vim:248 VertSplit guifg (s:nord2_gui = #434C5E at :17) [no WinSeparator group; default g:nord_bold_vertical_split_line=0, :85] #434c5e, adjusted
+ .border = .{ 0x4c, 0x55, 0x66 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:237 Search guibg (s:nord8_gui = #88C0D0 at :24)
+ .search_bg = .{ 0x88, 0xc0, 0xd0 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:237 Search guifg (s:nord1_gui = #3B4252 at :16)
+ .search_fg = .{ 0x3b, 0x42, 0x52 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:184 DiagnosticError guifg (s:nord11_gui = #BF616A at :27)
+ .diagnostic_error = .{ 0xbf, 0x61, 0x6a },
+ // ~/05-genizah/nord-vim/colors/nord.vim:183 DiagnosticWarn guifg (s:nord13_gui = #EBCB8B at :29)
+ .diagnostic_warning = .{ 0xeb, 0xcb, 0x8b },
+ // ~/05-genizah/nord-vim/colors/nord.vim:185 DiagnosticInfo guifg (s:nord8_gui = #88C0D0 at :24)
+ .diagnostic_info = .{ 0x88, 0xc0, 0xd0 },
+ // ~/05-genizah/nord-vim/colors/nord.vim:186 DiagnosticHint guifg (s:nord10_gui = #5E81AC at :26)
+ .diagnostic_hint = .{ 0x5e, 0x81, 0xac },
+ .palette = .{
+ .{ 0x3b, 0x42, 0x52 }, // 0: ~/05-genizah/nord-vim/colors/nord.vim:159 g:terminal_color_0 (s:nord1_gui = #3B4252 at :16)
+ .{ 0xbf, 0x61, 0x6a }, // 1: ~/05-genizah/nord-vim/colors/nord.vim:160 g:terminal_color_1 (s:nord11_gui = #BF616A at :27)
+ .{ 0xa3, 0xbe, 0x8c }, // 2: ~/05-genizah/nord-vim/colors/nord.vim:161 g:terminal_color_2 (s:nord14_gui = #A3BE8C at :30)
+ .{ 0xeb, 0xcb, 0x8b }, // 3: ~/05-genizah/nord-vim/colors/nord.vim:162 g:terminal_color_3 (s:nord13_gui = #EBCB8B at :29)
+ .{ 0x81, 0xa1, 0xc1 }, // 4: ~/05-genizah/nord-vim/colors/nord.vim:163 g:terminal_color_4 (s:nord9_gui = #81A1C1 at :25)
+ .{ 0xb4, 0x8e, 0xad }, // 5: ~/05-genizah/nord-vim/colors/nord.vim:164 g:terminal_color_5 (s:nord15_gui = #B48EAD at :31)
+ .{ 0x88, 0xc0, 0xd0 }, // 6: ~/05-genizah/nord-vim/colors/nord.vim:165 g:terminal_color_6 (s:nord8_gui = #88C0D0 at :24)
+ .{ 0xe5, 0xe9, 0xf0 }, // 7: ~/05-genizah/nord-vim/colors/nord.vim:166 g:terminal_color_7 (s:nord5_gui = #E5E9F0 at :21)
+ .{ 0x4c, 0x56, 0x6a }, // 8: ~/05-genizah/nord-vim/colors/nord.vim:167 g:terminal_color_8 (s:nord3_gui = #4C566A at :18)
+ .{ 0xbf, 0x61, 0x6a }, // 9: ~/05-genizah/nord-vim/colors/nord.vim:168 g:terminal_color_9 (s:nord11_gui = #BF616A at :27)
+ .{ 0xa3, 0xbe, 0x8c }, // 10: ~/05-genizah/nord-vim/colors/nord.vim:169 g:terminal_color_10 (s:nord14_gui = #A3BE8C at :30)
+ .{ 0xeb, 0xcb, 0x8b }, // 11: ~/05-genizah/nord-vim/colors/nord.vim:170 g:terminal_color_11 (s:nord13_gui = #EBCB8B at :29)
+ .{ 0x81, 0xa1, 0xc1 }, // 12: ~/05-genizah/nord-vim/colors/nord.vim:171 g:terminal_color_12 (s:nord9_gui = #81A1C1 at :25)
+ .{ 0xb4, 0x8e, 0xad }, // 13: ~/05-genizah/nord-vim/colors/nord.vim:172 g:terminal_color_13 (s:nord15_gui = #B48EAD at :31)
+ .{ 0x8f, 0xbc, 0xbb }, // 14: ~/05-genizah/nord-vim/colors/nord.vim:173 g:terminal_color_14 (s:nord7_gui = #8FBCBB at :23)
+ .{ 0xec, 0xef, 0xf4 }, // 15: ~/05-genizah/nord-vim/colors/nord.vim:174 g:terminal_color_15 (s:nord6_gui = #ECEFF4 at :22)
+ },
+};