summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/Band.zig9
-rw-r--r--core/Core.zig112
-rw-r--r--core/Effect.zig6
-rw-r--r--core/File.zig67
-rw-r--r--core/Jump.zig97
-rw-r--r--core/Kind.zig55
-rw-r--r--core/Messages.zig12
-rw-r--r--core/Names.zig47
-rw-r--r--core/Output.zig34
-rw-r--r--core/Pick.zig1078
-rw-r--r--core/Places.zig59
-rw-r--r--core/Prompt.zig168
-rw-r--r--core/Query.zig125
-rw-r--r--core/Store.zig2
-rw-r--r--core/Stream.zig27
-rw-r--r--core/Tables.zig8
-rw-r--r--core/Term.zig2
-rw-r--r--core/Trail.zig299
-rw-r--r--core/ansi.zig43
-rw-r--r--core/body_layer.zig271
-rw-r--r--core/builtins.zig16
-rw-r--r--core/colors.zig808
-rw-r--r--core/config.zig3
-rw-r--r--core/draw.zig51
-rw-r--r--core/dump.zig29
-rw-r--r--core/exec.zig7
-rw-r--r--core/fs.zig10
-rw-r--r--core/jj.zig196
-rw-r--r--core/keys.zig2
-rw-r--r--core/layout.zig2
-rw-r--r--core/lib_syntax.zig15
-rw-r--r--core/look.zig57
-rw-r--r--core/lsp/lsp.zig6
-rw-r--r--core/mouse.zig3
-rw-r--r--core/ninep/ctl.zig20
-rw-r--r--core/ninep/pty.zig1
-rw-r--r--core/replica.zig2
-rw-r--r--core/root.zig6
-rw-r--r--core/surface.zig9
-rw-r--r--core/syntax.zig731
-rw-r--r--core/term/terminal.zig19
-rw-r--r--core/themes/acme.zig67
-rw-r--r--core/themes/alucard.zig46
-rw-r--r--core/themes/atelier.zig54
-rw-r--r--core/themes/ayu_dark.zig52
-rw-r--r--core/themes/ayu_light.zig57
-rw-r--r--core/themes/ayu_mirage.zig53
-rw-r--r--core/themes/catppuccin_frappe.zig57
-rw-r--r--core/themes/catppuccin_latte.zig63
-rw-r--r--core/themes/catppuccin_macchiato.zig57
-rw-r--r--core/themes/catppuccin_mocha.zig57
-rw-r--r--core/themes/clay.zig54
-rw-r--r--core/themes/dark.zig62
-rw-r--r--core/themes/dark_plus.zig62
-rw-r--r--core/themes/daybreak.zig54
-rw-r--r--core/themes/doom_one.zig54
-rw-r--r--core/themes/doom_one_light.zig58
-rw-r--r--core/themes/dracula.zig51
-rw-r--r--core/themes/dracula_soft.zig51
-rw-r--r--core/themes/duckbones.zig58
-rw-r--r--core/themes/dusk.zig54
-rw-r--r--core/themes/forestbones_dark.zig57
-rw-r--r--core/themes/forestbones_light.zig63
-rw-r--r--core/themes/forge.zig54
-rw-r--r--core/themes/forge_black.zig54
-rw-r--r--core/themes/forge_soft.zig54
-rw-r--r--core/themes/harvest.zig54
-rw-r--r--core/themes/helix.zig33
-rw-r--r--core/themes/ink.zig54
-rw-r--r--core/themes/kanagawabones.zig56
-rw-r--r--core/themes/lagoon.zig54
-rw-r--r--core/themes/lapis.zig60
-rw-r--r--core/themes/light.zig30
-rw-r--r--core/themes/mono.zig31
-rw-r--r--core/themes/monokai.zig59
-rw-r--r--core/themes/monokai_pro.zig58
-rw-r--r--core/themes/monokai_pro_classic.zig58
-rw-r--r--core/themes/monokai_pro_light.zig64
-rw-r--r--core/themes/monokai_pro_light_sun.zig64
-rw-r--r--core/themes/monokai_pro_machine.zig58
-rw-r--r--core/themes/monokai_pro_octagon.zig58
-rw-r--r--core/themes/monokai_pro_ristretto.zig58
-rw-r--r--core/themes/monokai_pro_spectrum.zig58
-rw-r--r--core/themes/neobones_dark.zig56
-rw-r--r--core/themes/neobones_light.zig57
-rw-r--r--core/themes/nord.zig58
-rw-r--r--core/themes/nordbones.zig60
-rw-r--r--core/themes/okabe.zig32
-rw-r--r--core/themes/orchard.zig54
-rw-r--r--core/themes/orchard_black.zig54
-rw-r--r--core/themes/paper.zig54
-rw-r--r--core/themes/rose_pine.zig56
-rw-r--r--core/themes/rose_pine_dawn.zig65
-rw-r--r--core/themes/rose_pine_moon.zig56
-rw-r--r--core/themes/rosebones_dark.zig56
-rw-r--r--core/themes/rosebones_light.zig62
-rw-r--r--core/themes/seoul256.zig315
-rw-r--r--core/themes/seoulbones_dark.zig62
-rw-r--r--core/themes/seoulbones_light.zig63
-rw-r--r--core/themes/sepia.zig30
-rw-r--r--core/themes/solarium.zig54
-rw-r--r--core/themes/solarized_dark.zig57
-rw-r--r--core/themes/solarized_light.zig56
-rw-r--r--core/themes/spectrum.zig54
-rw-r--r--core/themes/tokyobones_dark.zig56
-rw-r--r--core/themes/tokyobones_light.zig57
-rw-r--r--core/themes/tokyonight_day.zig63
-rw-r--r--core/themes/tokyonight_moon.zig58
-rw-r--r--core/themes/tokyonight_night.zig58
-rw-r--r--core/themes/tokyonight_storm.zig60
-rw-r--r--core/themes/vimbones.zig57
-rw-r--r--core/themes/zenbones_dark.zig57
-rw-r--r--core/themes/zenbones_light.zig57
-rw-r--r--core/themes/zenburned.zig63
-rw-r--r--core/themes/zenwritten_dark.zig57
-rw-r--r--core/themes/zenwritten_light.zig57
116 files changed, 5716 insertions, 3219 deletions
diff --git a/core/Band.zig b/core/Band.zig
index 4b56b0b8..d60e9831 100644
--- a/core/Band.zig
+++ b/core/Band.zig
@@ -40,6 +40,9 @@ pub const Row = struct {
on: bool = false,
/// Its first `key` bytes are a key: the key ink, bold.
key: u8 = 0,
+ /// Its first `kind` bytes are a symbol's kind mark (`t`, `f`, `m`):
+ /// the keyword's ink (UX DESIGN N4).
+ kind: u8 = 0,
/// Its first `chord` bytes are a chord (Help's `SPC h t`): the key ink
/// at the text's weight.
chord: u8 = 0,
@@ -53,8 +56,9 @@ pub const Row = struct {
index: u16 = 0,
/// Marked in a picker's list: `•` before it.
mark: bool = false,
- /// Its first `pre` bytes are a place (`file:line`, `@p3`): the name's
- /// tint; the `faint` bytes after them dimmed (a path's directory).
+ /// Its first `pre` bytes are a place (`file:line`, `@p3`) or a kind
+ /// mark: the name's tint; the `faint` bytes after them dimmed (a path's
+ /// directory, a symbol's qualifier).
pre: u16 = 0,
faint: u16 = 0,
/// Said at the row's right end in the dim ink, two cells off its text
@@ -644,6 +648,7 @@ fn cutRow(arena: std.mem.Allocator, tab: u16, row: Row, room: u16) !Row {
fit.text = try std.mem.concat(arena, u8, &.{ row.text[0..cut], if (room > 0) "…" else "" });
for (row.marks) |m| if (m < cut) try marks.append(arena, m);
fit.key = @intCast(@min(row.key, cut));
+ fit.kind = @intCast(@min(row.kind, cut));
fit.pre = @intCast(@min(row.pre, cut));
fit.faint = @intCast(@min(row.faint, cut -| fit.pre));
}
diff --git a/core/Core.zig b/core/Core.zig
index ccdc8d6f..3a2e1f51 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -351,8 +351,6 @@ custom_theme: ?LegacyTheme = null,
/// session's own theme untouched under it.
theme_preview: ?u16 = null,
preview_chrome: ChromeTheme = undefined,
-/// bodyChrome's: the theme it was worked out for, and it.
-body_chrome: ?struct { theme: LegacyTheme, chrome: ChromeTheme } = null,
theme_file_path: config.Settings.Text(limits.host_path_cap) = .{},
/// The ThemeFile last loaded whole: what /ctl and DumpConfig name, and
/// what a failed ThemeFile goes back to (colors.revertThemeFile).
@@ -411,8 +409,13 @@ pipe: Pipe = .{},
/// A query pane's Grep, and its Find's listing, on a worker (Stream.zig).
stream: Stream = .{},
/// The pickers: the one live in a view's tag, and the last ones rolled
-/// up, which their list words and Resume reopen (Pick.zig).
-picks: [pardes.Pick.max_lists]?*pardes.Pick = @splat(null),
+/// up, which their list words, Resume and Lists reopen (Pick.zig); Lists
+/// itself in the one more, never kept.
+picks: [pardes.Pick.max_lists + 1]?*pardes.Pick = @splat(null),
+/// The kept picker Resume shows, the newest 1 (Pick.nth), 0 for none:
+/// `SPC '` again after an Esc from it, nothing typed between, opens the
+/// one before it, and Ctrl-o and Ctrl-i in it step through them (UX L'2).
+resume_at: u8 = 0,
/// The panes' `Changes` (jj.zig): what was asked of jj, and what it
/// answered for each pane, by its serial: the session's, not a field of
/// every pane (a digest and a rollback copy walk every pane's fields at
@@ -542,7 +545,7 @@ pub const replica = .{
"opts", "dump_out", "dump_export",
"tape",
},
- .derived = .{ "shell_rows", "diff_output", "locations_cache", "retired_panes", "tty_filter_palette", "body_chrome", "theme_preview", "preview_chrome" },
+ .derived = .{ "shell_rows", "diff_output", "locations_cache", "retired_panes", "tty_filter_palette", "theme_preview", "preview_chrome" },
// The host's handles, the state file every session of the user
// shares (and Recent read from it), this session's closed panes, and
// the files of a host with no file system of its own. (The 9P
@@ -1330,6 +1333,8 @@ pub fn toView(p: *Pardes, k: View.Id) void {
if (k.index() == p.live) return;
const taped = pardes.tape.enter(p, .{ .to_view = k });
defer pardes.tape.leave(p, taped);
+ // A terminal the going view sizes takes the size its inputs left it.
+ p.sizeTerminals();
Views.to(p, k.index());
}
@@ -1648,6 +1653,7 @@ pub fn settle(p: *Pardes) void {
// ...and the last line of an open closed with no newline after it.
ctlfs.runClosedLines(p);
while (p.nextQueued()) |ev| p.update(ev);
+ p.sizeTerminals();
while (p.nextEffect()) |e| p.perform(e);
turn.bump(&turn.epoch);
}
@@ -1828,7 +1834,9 @@ fn updateInner(p: *Pardes, ev: Event) void {
pardes.panes.Query.produceAll(p, ev == .tick, ev == .key);
pardes.Pick.produceAll(p, ev == .tick);
_ = p.scratch.reset(.{ .retain_with_limit = memory.limits.scratch_kept });
- p.sync();
+ // Laid out; its terminals are sized when the burst it came in is
+ // (`settle`, `sizeTerminals`).
+ p.layOut();
p.fsReport();
ctlfs.events.announce(p);
}
@@ -1950,8 +1958,41 @@ pub fn saveRecent(p: *Pardes) void {
}
/// Recompute geometry, push grid-size changes to each emulator and pty,
-/// fire deferred greetings.
+/// fire deferred greetings: a step of its own (a 9P request's, a view's).
pub fn sync(p: *Pardes) void {
+ p.layOut();
+ p.sizeTerminals();
+}
+
+/// Each terminal's emulator and pty at the size its pane is laid out to,
+/// once a step and its burst of inputs (`settle`), never once a key: a
+/// size the keys of one burst give and take back (a level borrowing a
+/// shell's rows, the next key giving them back) reaches neither. Every
+/// reflow clears the prompt line under the cursor for the shell to draw
+/// again (ghostty's Screen.resize, `shell_redraws_prompt`), and the shell,
+/// told twice, reads its size once, finds the one it had and draws
+/// nothing: the prompt was gone until it next printed one. The emulator's
+/// own size says what it was given; the view that sizes a terminal
+/// (`sizes`) has its size.
+pub fn sizeTerminals(p: *Pardes) void {
+ for (p.panes, 0..) |slot, id| {
+ const pane = slot orelse continue;
+ const state = pane.terminal orelse continue;
+ if (!p.sizes(pane)) continue;
+ const grid = pardes.Term.grid(state);
+ if (grid.cols == pane.cols and grid.len == pane.rows) continue;
+ pane.resizeGrid(p, pane.cols, pane.rows);
+ p.shell_rows.markStale(pane); // reflow moved every row
+ p.emit(.{ .resize_pty = .{ .pane = .at(id), .cols = pane.cols, .rows = pane.rows } });
+ pane.fs.winsize = null;
+ }
+}
+
+/// The step's geometry: each pane's rect, tag rows and size (a terminal's
+/// emulator and pty follow once a burst: `sizeTerminals`), its bands, and
+/// the deferred greetings. What a step lays out in its middle, to read the
+/// geometry after (a picker's first preview), is laid out with this.
+pub fn layOut(p: *Pardes) void {
const v = p.view();
while (p.unplaced.findFirstSet()) |id| {
p.unplaced.unset(id);
@@ -2068,14 +2109,6 @@ pub fn sync(p: *Pardes) void {
if ((cols != pane.cols or rows != pane.rows) and (r.h > pane.tag_rows or (pane.isTerminal() and !pane.collapsed and r.h > 0)) and
(!pane.isTerminal() or p.sizes(pane)))
{
- // doc panes have no pty/emulator grid to reflow; just record
- // the size so bodyText renders the right number of rows
- if (pane.isTerminal()) {
- pane.resizeGrid(p, cols, rows);
- p.shell_rows.markStale(pane); // reflow moved every row
- p.emit(.{ .resize_pty = .{ .pane = .at(id), .cols = cols, .rows = rows } });
- pane.fs.winsize = null;
- }
pane.cols = cols;
pane.rows = rows;
if (pane.file) |*file| file.syntax_dirty = true;
@@ -2140,10 +2173,11 @@ fn sizes(p: *const Pardes, pane: *const Pane) bool {
return pane.sized_by == p.live;
}
+/// The theme in the old names, for what still reads a theme's own
+/// fields (colors.ChromeTheme.view).
pub fn theme(p: *const Pardes) *const LegacyTheme {
- if (p.theme_preview) |i| return &colors.legacy_themes[i];
- if (p.custom_theme) |*custom| return custom;
- return &colors.legacy_themes[p.settings.theme];
+ if (p.theme_preview == null) if (p.custom_theme) |*custom| return custom;
+ return &p.chromeTheme().view;
}
/// The colours of the chrome: the theme's, set as it changes.
@@ -2158,16 +2192,6 @@ pub fn chrome(p: *const Pardes) *const colors.Chrome {
return &p.chromeTheme().resolved;
}
-/// The theme's own chrome, not a fade's (`theme()`'s, worked out once
-/// per theme: its contrast searches take pow calls, too many for a
-/// grapheme or a row).
-pub fn bodyChrome(p: *Pardes) *const ChromeTheme {
- const th = p.theme();
- if (p.body_chrome) |*cached| if (std.meta.eql(cached.theme, th.*)) return &cached.chrome;
- p.body_chrome = .{ .theme = th.*, .chrome = ChromeTheme.fromTheme(th) };
- return &p.body_chrome.?.chrome;
-}
-
/// When the core next needs a frame, on the `stepped_ns` timeline: a
/// frame from now while work goes on (places to find, a picture
/// decoding, a PDF page on a lane), the end of the wait while something
@@ -4210,6 +4234,7 @@ test "leaving tty hides the prompt and keeps the command typed at it" {
defer p.deinit();
p.update(.{ .resize = .{ .cols = 80, .rows = 24 } });
p.update(.{ .key = .{ .cp = 'n', .alt = true } }); // a shell under the doc
+ p.sync(); // its emulator sized as its step's end sizes it, before its shell speaks
const shell = p.view().active;
const sp = p.panes[shell].?;
try std.testing.expect(sp.isTerminal());
@@ -4276,6 +4301,7 @@ test "entering tty walks the shell cursor to the column clicked past the prompt"
defer p.deinit();
p.update(.{ .resize = .{ .cols = 80, .rows = 24 } });
p.update(.{ .key = .{ .cp = 'n', .alt = true } });
+ p.sync(); // its emulator sized as its step's end sizes it, before its shell speaks
const shell = p.view().active;
const sp = p.panes[shell].?;
p.update(.{ .output = .{
@@ -4321,3 +4347,33 @@ test "entering tty walks the shell cursor to the column clicked past the prompt"
test "every allocation failure during boot is a clean OutOfMemory" {
try std.testing.checkAllAllocationFailures(std.testing.allocator, bootAndTearDown, .{});
}
+
+test "a level that borrows a shell's rows and gives them back in one burst of keys resizes neither its emulator nor its pty: its prompt line stays (M1's ttyhelp row 3)" {
+ if (pardes.Term.ops == null) return error.SkipZigTest; // a shell's emulator
+ const p = try Pardes.init(std.testing.allocator, .{ .cols = 100, .rows = 31, .boot = .tty });
+ defer p.deinit();
+ const shell = p.panes[0].?;
+ // bash's prompt as pardes's marks draw it (dev/Shell.zig bash_rc),
+ // the cursor at its input.
+ p.update(.{ .output = .{ .pane = .at(0), .bytes = "\x1b]133;A;cl=line;aid=pardes\x07$ \x1b]133;B;aid=pardes\x07" } });
+ const below = p.view().cols[0].panes[1];
+ p.view().active = below;
+ p.settle();
+ const rows = shell.rows;
+ var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer arena.deinit();
+ const body_layer = @import("body_layer.zig");
+ try std.testing.expect(std.mem.startsWith(u8, try body_layer.bodyText(p.settings.tab, arena.allocator(), shell), "$ "));
+ // `?`'s level takes rows of the shell's (layout.floorRows), `tutor`
+ // narrows it to one leaf and gives them back: keys of one burst, one
+ // settle after them, as a frontend takes a read of them.
+ p.update(.{ .key = .{ .cp = ' ', .text = " " } });
+ p.update(.{ .key = .{ .cp = '?', .text = "?" } });
+ try std.testing.expect(shell.rows < rows);
+ for ("tutor") |c| p.update(.{ .key = .{ .cp = c, .text = &.{c} } });
+ try std.testing.expectEqual(rows, shell.rows);
+ // Its pty told nothing: no SIGWINCH for a size it had.
+ while (p.nextEffect()) |e| try std.testing.expect(e != .resize_pty);
+ p.settle();
+ try std.testing.expect(std.mem.startsWith(u8, try body_layer.bodyText(p.settings.tab, arena.allocator(), shell), "$ "));
+}
diff --git a/core/Effect.zig b/core/Effect.zig
index e9f7a8f3..6146df69 100644
--- a/core/Effect.zig
+++ b/core/Effect.zig
@@ -64,6 +64,10 @@ pub const Effect = union(enum) {
/// `arg` up to 128 bytes, or for `explain` the query it explains,
/// `<kind> <arg>`.
lsp: struct { id: u32, kind: lsp.Kind, pane: Pane.Id, offset: u32, arg: Buf(160) },
+ /// A file opened in pane `pane` (File.open, a session's revived pane):
+ /// the server its language speaks to started and told of it, off the
+ /// loop (dev/Lsp.zig open), so its first query finds it ready.
+ lsp_open: struct { pane: Pane.Id },
/// Snapshot the matching request with pipeRequest(id), then run it away
/// from the UI/event loop and answer with pipe_resp.
pipe: struct { id: u32 },
@@ -216,6 +220,8 @@ fn performInner(p: *Pardes, e: Effect) void {
},
.lsp => |q| p.tape.host(p, .lsp, .{.{ .id = q.id, .kind = q.kind, .pane = q.pane, .offset = q.offset, .arg = q.arg.slice() }}) orelse
p.update(.{ .lsp_resp = .{ .id = q.id, .rows = "" } }),
+ // No workers here (a test, a board): no server starts before a query.
+ .lsp_open => |o| _ = p.tape.host(p, .lsp_open, .{o.pane}),
.pipe => |q| p.tape.host(p, .pipe, .{q.id}) orelse
p.update(.{ .pipe_resp = .{ .id = q.id, .success = false, .outputs = &.{} } }),
// No workers here (a test, a board): it runs on the loop.
diff --git a/core/File.zig b/core/File.zig
index 217531fd..d54d5011 100644
--- a/core/File.zig
+++ b/core/File.zig
@@ -60,35 +60,39 @@ pub const History = struct {
}
};
-/// Owned syntax results: a text's declarations at a revision.
+/// Owned syntax results: a text's declarations and symbols at a revision.
pub const ContextCache = struct {
/// Its revision is dumped and digested: a worker's parse is an input,
/// which a client joined since never saw, and a step reads what it
- /// left (Query.ownerDecls). The declarations are made again from the
- /// text at a load (`reload`), with the allocator that made them.
- pub const replica = .{ .local = .{"allocator"}, .derived = .{"declarations"} };
+ /// left (Query.ownerDecls, the Symbols source). The declarations and
+ /// symbols are made again from the text at a load (`reload`), with the
+ /// allocator that made them.
+ pub const replica = .{ .local = .{"allocator"}, .derived = .{ "declarations", "symbols" } };
allocator: ?std.mem.Allocator = null,
declarations: []syntax.ContextDeclaration = &.{},
+ symbols: []syntax.Symbol = &.{},
revision: ?u32 = null,
pub fn deinit(self: *ContextCache) void {
- if (self.allocator) |gpa| gpa.free(self.declarations);
+ if (self.allocator) |gpa| {
+ gpa.free(self.declarations);
+ gpa.free(self.symbols);
+ }
self.* = .{};
}
- /// A loaded text's (its revision the dump's): its declarations parsed
- /// again where they are of the text it has.
+ /// A loaded text's (its revision the dump's): its context parsed
+ /// again where it is of the text it has.
pub fn reload(self: *ContextCache, gpa: std.mem.Allocator, path: []const u8, content: []const u8, revision: u32) void {
const at = self.revision orelse return;
if (at != revision) return;
- const declarations = syntax.contextDeclarations(gpa, path, content) catch return;
- self.replace(gpa, declarations, at);
+ self.replace(gpa, syntax.context(gpa, path, content) catch return, at);
}
- /// Takes ownership of declarations allocated by gpa.
- pub fn replace(self: *ContextCache, gpa: std.mem.Allocator, declarations: []syntax.ContextDeclaration, revision: u32) void {
+ /// Takes ownership of a context allocated by gpa.
+ pub fn replace(self: *ContextCache, gpa: std.mem.Allocator, made: syntax.Context, revision: u32) void {
self.deinit();
- self.* = .{ .allocator = gpa, .declarations = declarations, .revision = revision };
+ self.* = .{ .allocator = gpa, .declarations = made.declarations, .symbols = made.symbols, .revision = revision };
}
};
@@ -922,7 +926,13 @@ pub fn open(p: *Pardes, id: usize, path: []const u8, line: usize) !*Pane {
pane.body.cur_pinned = true;
pane.body.cur_row = @intCast(scroll);
p.installPane(id, pane);
- if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = .at(id), .on = true } });
+ if (filesystem.localPath(path) != null) {
+ p.emit(.{ .watch = .{ .pane = .at(id), .on = true } });
+ // Its language's server started now, off the loop: the first
+ // question asked of it finds it ready. Not a picker's preview's,
+ // which opens no pane (Pick.preview).
+ p.emit(.{ .lsp_open = .{ .pane = .at(id) } });
+ }
return pane;
}
@@ -2495,8 +2505,7 @@ pub fn changed(p: *Pardes, id: u8, bytes: []const u8) void {
pub fn refreshContext(p: *Pardes, pane: *Pane, f: *State) void {
if (!f.tree_context or !supportsContext(pane) or f.context.revision == f.revision) return;
// The file's declarations, in its lines (the layer's are none of it).
- const declarations = syntax.contextDeclarations(p.tree_sitter_gpa, f.path, fileText(f, p.scratch.allocator()) catch return) catch return;
- f.context.replace(p.tree_sitter_gpa, declarations, f.revision);
+ f.context.replace(p.tree_sitter_gpa, syntax.context(p.tree_sitter_gpa, f.path, fileText(f, p.scratch.allocator()) catch return) catch return, f.revision);
}
pub fn refreshHighlights(p: *Pardes) void {
@@ -2922,7 +2931,8 @@ pub const Layers = struct {
pub const SynStyle = struct { fg: [3]u8, bold: bool };
pub fn synStyle(p: *Pardes, sy: syntax.Syn) ?SynStyle {
- return .{ .fg = Colors.synInk(p.theme(), sy) orelse return null, .bold = false };
+ if (sy == .none) return null;
+ return .{ .fg = p.chrome().syntax[@intFromEnum(sy)], .bold = false };
}
/// syntax colors: recolor each content cell from its tree-sitter style byte;
@@ -2945,9 +2955,9 @@ pub fn recolorSyntax(p: *Pardes, s: *Surface, pane: *Pane, f: *State, r: pardes.
const tz_recolor = tracy.zone(@src(), "synRecolor");
defer tz_recolor.end();
// A row whose first byte names a hue (syntax.ground_add, _del): its
- // grounds, the theme's, worked out once a frame and only for one.
- var grounds: ?Colors.Grounds = null;
- const ink = ansi.inkOf(p.theme());
+ // grounds, the chrome's (R10).
+ const chrome = p.chrome();
+ const ink = ansi.inkOf(p);
var filtered_storage: pardes.Term.Filter = undefined;
const filtered: ?*pardes.Term.Filter = if (pane.tty_filter and spans.len > 0) blk: {
filtered_storage = pardes.Term.filter(&ink, &p.tty_filter_palette);
@@ -2985,14 +2995,11 @@ pub fn recolorSyntax(p: *Pardes, s: *Surface, pane: *Pane, f: *State, r: pardes.
const row_index: usize = @intCast(@max(0, pane.wrapAt(p.settings.tab, vr).line));
const metadata: ?locations.Row = if (row_index < f.location_rows.len) f.location_rows[row_index] else null;
const decoration = Output.decorateRow(f.output, line, metadata);
- const chrome: ?*const pardes.ChromeTheme = if (decoration.plain()) null else p.bodyChrome();
+ const decorated = !decoration.plain();
// The row's first byte: its hue and its ground, on every wrapped
// row of it (syntax.ground_add).
const lead: u8 = if (base >= highlight_start and base - highlight_start < highlights.len) highlights[base - highlight_start] else 0;
- const tint: ?Colors.Grounds.Ground = if (lead & (syntax.ground_add | syntax.ground_del) == 0) null else (grounds orelse ground: {
- grounds = .of(p.theme());
- break :ground grounds.?;
- }).forStyle(lead);
+ const tint: ?*const Colors.Chrome.Diff = if (lead & syntax.ground_add != 0) &chrome.add else if (lead & syntax.ground_del != 0) &chrome.del else null;
// 2, the patch: the row's ground.
if (tint) |t| if (prefix_width < tw) {
const ground: ?[3]u8 = if (lead & syntax.ground_emph != 0) t.row else if (lead & syntax.ground_line != 0) t.line else null;
@@ -3009,7 +3016,7 @@ pub fn recolorSyntax(p: *Pardes, s: *Surface, pane: *Pane, f: *State, r: pardes.
var c: usize = 0;
const pad: usize = if (vr < pane.wrap_n) pane.wrap_pad[vr] else 0;
for (0..@min(pad, tw -| prefix_width)) |col| {
- s.at(tx + @as(u16, @intCast(prefix_width + col)), body_y + vr).style.fg = .{ .rgb = p.bodyChrome().diagnostic_info };
+ s.at(tx + @as(u16, @intCast(prefix_width + col)), body_y + vr).style.fg = .{ .rgb = chrome.page.dim };
}
var screen_c: usize = pad;
var table_buf: [Tables.max_pads]Tables.Pad = undefined;
@@ -3057,7 +3064,7 @@ pub fn recolorSyntax(p: *Pardes, s: *Surface, pane: *Pane, f: *State, r: pardes.
}
// Results keep their exact live text. Only the location,
// matched source range and diagnostic label gain emphasis.
- if (if (chrome) |ch| decoration.styleAt(ch, hs + c) else null) |style| {
+ if (if (decorated) decoration.styleAt(chrome, hs + c) else null) |style| {
var fill: usize = 0;
while (fill < cells and prefix_width + screen_c + fill < tw) : (fill += 1) {
const cell = s.at(tx + @as(u16, @intCast(prefix_width + screen_c + fill)), body_y + vr);
@@ -3109,6 +3116,7 @@ pub fn paintWordSelection(
word_lo: i32,
word_hi: i32,
bg: [3]u8,
+ fg: ?[3]u8,
) void {
const tx = r.x + config.GUTTER;
const tw = r.w - config.GUTTER;
@@ -3127,7 +3135,7 @@ pub fn paintWordSelection(
const c1 = @as(i32, prefix_width) + here.pad + displayEndOffset(p.settings.tab, pane, row, here.at, hi - 1);
const col = @max(@as(i32, prefix_width), c0);
const end = @min(c1 + 1, @as(i32, tw));
- if (col < end) s.tint(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(vr)), @intCast(end - col), bg, null);
+ if (col < end) s.tint(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(vr)), @intCast(end - col), bg, fg);
}
}
@@ -3620,12 +3628,13 @@ test "context cache frees each allocation with its original allocator" {
defer std.testing.expect(second.deinit() == .ok) catch @panic("second allocator leaked");
var cache: ContextCache = .{};
defer cache.deinit();
- cache.replace(first.allocator(), try first.allocator().alloc(syntax.ContextDeclaration, 1), 1);
- cache.replace(second.allocator(), try second.allocator().alloc(syntax.ContextDeclaration, 2), 2);
+ cache.replace(first.allocator(), .{ .declarations = try first.allocator().alloc(syntax.ContextDeclaration, 1), .symbols = try first.allocator().alloc(syntax.Symbol, 1) }, 1);
+ cache.replace(second.allocator(), .{ .declarations = try second.allocator().alloc(syntax.ContextDeclaration, 2), .symbols = try second.allocator().alloc(syntax.Symbol, 2) }, 2);
try std.testing.expectEqual(@as(?u32, 2), cache.revision);
cache.deinit();
try std.testing.expect(cache.allocator == null);
try std.testing.expectEqual(@as(usize, 0), cache.declarations.len);
+ try std.testing.expectEqual(@as(usize, 0), cache.symbols.len);
}
/// The inks of row `row`'s first `n` text cells of pane `id` as `s` draws them.
diff --git a/core/Jump.zig b/core/Jump.zig
index 3d69d6c9..143aa9b5 100644
--- a/core/Jump.zig
+++ b/core/Jump.zig
@@ -274,11 +274,17 @@ pub fn trackJump(p: *Pardes) void {
/// always have, at the newest entry.
pub fn jumpBy(p: *Pardes, delta: i32) void {
const v = p.view();
- // A reading pane's walk first (pick-ui SPEC §6.4). Past its newest
+ // A pane's walk first (pick-ui SPEC §6.4, UX L'1). Past its newest
// step, Ctrl-i steps the Walk queue a picker left (Pick.stepQueue);
// then the jump list's.
if (pardes.Trail.walkBy(p, v.active, delta)) return;
if (delta > 0 and pardes.Pick.stepQueue(p, v.active)) return;
+ listBy(p, delta);
+}
+
+/// The jump list's step alone (`jumpBy`): past a walk's last word.
+pub fn listBy(p: *Pardes, delta: i32) void {
+ const v = p.view();
const older = delta < 0;
// At an end of the list: said, not a step that silently does nothing.
if (v.jumps.n == 0 or (older and v.jumps.cur == 0) or (!older and v.jumps.cur + 1 >= v.jumps.n))
@@ -338,7 +344,7 @@ pub fn jumpBy(p: *Pardes, delta: i32) void {
v.jumps.cur = @min(cur, w -| 1);
// The same step again, over the list without them: each
// round takes one file's entries away, so it ends.
- return jumpBy(p, delta);
+ return listBy(p, delta);
}
const e = found.?;
const from = v.active;
@@ -461,11 +467,13 @@ test "jump history terminal rectangle follows output and clears on reflow" {
try std.testing.expectEqual(.none, pane.sel[0].state);
}
-test "Ctrl-o at a walk's first place never rewrites its trail (UX L): after SPC f f words, Enter, /in_word, Enter, Ctrl-o goes to the first place, a second Ctrl-o leaves the list's and the search's words where they are, and Ctrl-i goes forward again" {
+test "Ctrl-o pops the walk one word at a time (UX L'1): after SPC f f words, Enter, /in_word, Enter, Ctrl-o puts the caret where the search started with its places lit, then reopens Find words as it was left, previewing here, then goes to the place before it; Ctrl-i comes back the same way; Esc leaves a reopened list as before the Ctrl-o; its Enter lands as its word's, the steps after it dropped" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 84, .rows = 20 });
defer p.deinit();
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
+ // A work tree of its own: Find searches it, not the one the test runs in.
+ try tmp.dir.createDir(std.testing.io, ".git", .default_dir);
var text: [60 * 16]u8 = undefined;
var w: std.Io.Writer = .fixed(&text);
for (1..61) |n| try w.print("{s} {d}\n", .{ if (n % 12 == 4) "in_word" else "line", n });
@@ -485,6 +493,12 @@ test "Ctrl-o at a walk's first place never rewrites its trail (UX L): after SPC
for (keys) |c| pp.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
}
}.f;
+ const echo = struct {
+ fn f(pp: *Pardes) []const u8 {
+ const said = pp.messages.headline() orelse return "";
+ return said.words();
+ }
+ }.f;
typeKeys(p, " ffwords");
var n: usize = 0;
while (n < 50 and (pardes.Pick.busy(p) or p.stream.busyFor(pardes.Pick.live(p).?.id))) : (n += 1) {
@@ -493,25 +507,80 @@ test "Ctrl-o at a walk's first place never rewrites its trail (UX L): after SPC
}
p.update(.{ .key = .{ .cp = pardes.Key.enter } });
p.sync();
+ try std.testing.expectEqualStrings("C-o back to Find words 1/1", echo(p));
typeKeys(p, "/in_word");
p.update(.{ .key = .{ .cp = pardes.Key.enter } });
p.sync();
+ try std.testing.expect(std.mem.startsWith(u8, echo(p), "C-o back to /in_word/ "));
+ {
+ // The search word holds where the search started: the landing.
+ const t = &p.panes[p.view().active].?.trail;
+ try std.testing.expect(t.n == 4 and t.cur == 3 and t.steps[2] == .search);
+ const from = t.steps[2].search.from;
+ try std.testing.expectEqualStrings("words.zig", std.Io.Dir.path.basename(from.path.slice()));
+ try std.testing.expect(from.line == 1 and from.col == 1);
+ }
const back: pardes.Key = .{ .cp = 'o', .ctrl = true };
const ahead: pardes.Key = .{ .cp = 'i', .ctrl = true };
- const Want = struct { file: []const u8, cur: u8 };
+ // After each key: the file the pane shows, where it is in its trail,
+ // the caret's line, Find words unrolled or not, the search lit or not.
+ const Want = struct { file: []const u8, cur: u8, line: i32, picker: bool, lit: bool };
+ const Check = struct {
+ fn f(pp: *Pardes, want: Want) !void {
+ const live = pardes.Pick.live(pp);
+ try std.testing.expectEqual(want.picker, live != null);
+ const id = if (live) |pk| pp.paneBySerial(pk.landing).? else pp.view().active;
+ const pane = pp.panes[id].?;
+ const t = &pane.trail;
+ if (live != null) try std.testing.expectEqualStrings("words", pp.view().tag_state.field.text()) else try std.testing.expectEqualStrings(want.file, std.Io.Dir.path.basename(pane.file.?.path));
+ if (live) |pk| try std.testing.expectEqual(pardes.Pick.Source.find, pk.source);
+ try std.testing.expectEqual(@as(u8, 4), t.n);
+ try std.testing.expectEqual(want.cur, t.cur);
+ try std.testing.expect(t.steps[0] == .place and t.steps[1] == .list and t.steps[2] == .search and t.steps[3] == .place);
+ try std.testing.expectEqual(@as(u32, 4), t.steps[3].place.line);
+ if (live == null) try std.testing.expectEqual(want.line, pane.body.cur_row + 1);
+ const set = &pane.places;
+ try std.testing.expectEqual(want.lit, live == null and set.shows(pane) and set.provenance == .search and std.mem.eql(u8, set.pattern, "in_word"));
+ }
+ };
for ([_]struct { key: pardes.Key, want: Want }{
- .{ .key = back, .want = .{ .file = "main.zig", .cur = 0 } },
- .{ .key = back, .want = .{ .file = "main.zig", .cur = 0 } },
- .{ .key = ahead, .want = .{ .file = "words.zig", .cur = 3 } },
- .{ .key = ahead, .want = .{ .file = "words.zig", .cur = 3 } },
+ .{ .key = back, .want = .{ .file = "words.zig", .cur = 2, .line = 1, .picker = false, .lit = true } },
+ .{ .key = back, .want = .{ .file = "words.zig", .cur = 2, .line = 1, .picker = true, .lit = false } },
+ .{ .key = back, .want = .{ .file = "main.zig", .cur = 0, .line = 1, .picker = false, .lit = false } },
+ .{ .key = ahead, .want = .{ .file = "main.zig", .cur = 0, .line = 1, .picker = true, .lit = false } },
+ .{ .key = ahead, .want = .{ .file = "words.zig", .cur = 2, .line = 1, .picker = false, .lit = true } },
+ .{ .key = ahead, .want = .{ .file = "words.zig", .cur = 3, .line = 4, .picker = false, .lit = true } },
}) |step| {
p.update(.{ .key = step.key });
p.sync();
- const pane = p.panes[p.view().active].?;
- const t = &pane.trail;
- try std.testing.expectEqualStrings(step.want.file, std.Io.Dir.path.basename(pane.file.?.path));
- try std.testing.expectEqual(@as(u8, 4), t.n);
- try std.testing.expectEqual(step.want.cur, t.cur);
- try std.testing.expect(t.steps[1] == .list and t.steps[2] == .search);
+ try Check.f(p, step.want);
}
+ // Esc from a list a walk reopened: rest exactly as before the Ctrl-o.
+ p.update(.{ .key = back });
+ p.update(.{ .key = back });
+ try Check.f(p, .{ .file = "words.zig", .cur = 2, .line = 1, .picker = true, .lit = false });
+ p.update(.{ .key = .{ .cp = pardes.Key.escape } });
+ p.sync();
+ try Check.f(p, .{ .file = "words.zig", .cur = 2, .line = 1, .picker = false, .lit = true });
+ // Its Enter lands as its word's: a step from it, the search's word and
+ // the place after it dropped.
+ p.update(.{ .key = back });
+ try std.testing.expect(pardes.Pick.live(p) != null);
+ p.update(.{ .key = .{ .cp = pardes.Key.enter } });
+ p.sync();
+ var t = &p.panes[p.view().active].?.trail;
+ try std.testing.expectEqual(@as(u8, 3), t.n);
+ try std.testing.expectEqual(@as(u8, 2), t.cur);
+ try std.testing.expect(t.steps[0] == .place and t.steps[1] == .list and t.steps[2] == .place);
+ try std.testing.expectEqualStrings("Find words 1/1", t.steps[1].list.text.slice());
+ try std.testing.expectEqualStrings("words.zig", std.Io.Dir.path.basename(p.panes[p.view().active].?.file.?.path));
+ // Backspace on its empty field walks on, as Ctrl-o.
+ p.update(.{ .key = back });
+ try std.testing.expect(pardes.Pick.live(p) != null);
+ for (0.."words".len + 1) |_| p.update(.{ .key = .{ .cp = pardes.Key.backspace } });
+ p.sync();
+ try std.testing.expect(pardes.Pick.live(p) == null);
+ t = &p.panes[p.view().active].?.trail;
+ try std.testing.expectEqualStrings("main.zig", std.Io.Dir.path.basename(p.panes[p.view().active].?.file.?.path));
+ try std.testing.expect(t.n == 3 and t.cur == 0);
}
diff --git a/core/Kind.zig b/core/Kind.zig
index 430f8ba8..4841a55c 100644
--- a/core/Kind.zig
+++ b/core/Kind.zig
@@ -137,7 +137,7 @@ pub const Slot = struct {
// jobs' inputs, its file's hash, a placeholder's record), and what
// a frame makes (the thumb, the pointer, whether one was drawn: a
// view's, never a step's).
- .local = .{ "ops", "st", "gpa", "arena", "plain", "file", "opened", "reloads", "jobs", "record", "thumb_at", "thumb_span", "pointer", "painted", "over", "used" },
+ .local = .{ "ops", "st", "gpa", "arena", "plain", "file", "opened", "reloads", "jobs", "record", "thumb_at", "thumb_span", "pointer", "painted", "over", "used", "drawn_from", "size" },
};
/// Its kind's code here; null in a placeholder (`live` false: its kind
/// not in the registry, its record kept for the day it comes) or a
@@ -215,6 +215,13 @@ pub const Slot = struct {
/// A client's join: its plain kind's file, until the pane is opened
/// from it (dump.plainHere).
file: ?[]u8 = null,
+ /// This process's draws made before it (`drawn` then): an answer to
+ /// one of them is another slot's, of a pane that showed something
+ /// else (a picker's preview of the row before), and is dropped.
+ drawn_from: u32 = 0,
+ /// Its file's bytes, as a picker's line naming it says them until its
+ /// kind's picture is drawn (Pick.preview).
+ size: u64 = 0,
/// Debug: the kind's allocations, which paint must leave as they are.
/// The slot's allocator's, as the slot is: a client's rollback puts
/// the list back with the slot that holds it (on the page allocator,
@@ -259,16 +266,12 @@ fn caps(p: *const Pardes, s: *const Slot) Caps {
/// word opened) from `bytes`: made whatever the kind says, with what it
/// refused in `slot.refused` for the caller to say.
pub fn open(p: *Pardes, id: usize, k: u8, path: ?[]const u8, bytes: ?[]const u8) !*Pane {
- const e = &p.kinds.kinds[k];
- // A plain kind's slot and block are the core's (a client's epoch).
- const gpa = if (e.caps.plain) p.gpa else p.image_gpa;
- const s = try gpa.create(Slot);
- s.* = .{ .ops = p.kinds.ops[k], .live = true, .gpa = gpa, .arena = .init(gpa), .version = e.version, .gen = e.gen, .name = e.name };
+ const s = try newSlot(p, k, path orelse "");
errdefer {
+ const gpa = s.gpa;
s.free();
gpa.destroy(s);
}
- s.path = try gpa.dupe(u8, path orelse "");
const pane = try p.newDocPane(id);
pane.addon = s;
_ = reopen(p, id, s, bytes);
@@ -278,6 +281,23 @@ pub fn open(p: *Pardes, id: usize, k: u8, path: ?[]const u8, bytes: ?[]const u8)
return pane;
}
+/// A slot of kind `k` for `path`, its kind's state not made yet (`reopen`
+/// makes it): a pane's, or a picker's preview's in the pane it lands in
+/// (Pick.preview), that pane's own text set aside meanwhile.
+pub fn newSlot(p: *Pardes, k: u8, path: []const u8) !*Slot {
+ const e = &p.kinds.kinds[k];
+ // A plain kind's slot and block are the core's (a client's epoch).
+ const gpa = if (e.caps.plain) p.gpa else p.image_gpa;
+ const s = try gpa.create(Slot);
+ s.* = .{ .ops = p.kinds.ops[k], .live = true, .gpa = gpa, .arena = .init(gpa), .version = e.version, .gen = e.gen, .name = e.name, .drawn_from = drawn };
+ errdefer {
+ s.free();
+ gpa.destroy(s);
+ }
+ s.path = try gpa.dupe(u8, path);
+ return s;
+}
+
/// `open` of the file at `path`, read here (a file that cannot be read
/// is no bytes: its kind may refuse it). The slot stays ours across the
/// read: another request may make a pane meanwhile.
@@ -418,9 +438,10 @@ pub fn close(p: *Pardes, pane: *Pane) void {
/// The pane's body painted over the `cols` x `rows` cells at (x, y):
/// its cells into `s`, its placements after the frame's others. A pane
/// whose kind has no code here, or a placeholder, says why in a line.
-pub fn draw(p: *Pardes, s: *surface.Surface, arena: std.mem.Allocator, pane: *Pane, id: usize, x: u16, y: u16, cols: u16, rows: u16) void {
- const slot = pane.addon orelse return;
- if (cols == 0 or rows == 0) return;
+/// False when its kind painted nothing (its picture not drawn yet).
+pub fn draw(p: *Pardes, s: *surface.Surface, arena: std.mem.Allocator, pane: *Pane, id: usize, x: u16, y: u16, cols: u16, rows: u16) bool {
+ const slot = pane.addon orelse return true;
+ if (cols == 0 or rows == 0) return true;
const th = p.theme();
const fg: surface.Color = if (th.fg) |f| .{ .rgb = f } else .default;
const bg: surface.Color = if (th.bg) |b| .{ .rgb = b } else .default;
@@ -431,17 +452,17 @@ pub fn draw(p: *Pardes, s: *surface.Surface, arena: std.mem.Allocator, pane: *Pa
const why = if (caps(p, slot).plain) "it is not in its addons nor the session's library at its path here, or it broke its promise here" else "its state is not plain (PA_PLAIN), so it runs in the session alone";
var line: [200]u8 = undefined;
_ = s.print(x, y, cols, std.fmt.bufPrint(&line, "addon {s} {d} does not run in this client: {s}", .{ slot.nameOf(), slot.version, why }) catch &line, .{ .fg = fg, .bg = bg });
- return;
+ return true;
} else if (slot.ops == null) {
var line: [160]u8 = undefined;
const why = if (slot.refused.len > 0) slot.refused.slice() else "Addon load <path>";
// Its kind here, it waits for its file (`<path> is not here`).
const text = if (p.kinds.byName(slot.nameOf()) != null) why else std.fmt.bufPrint(&line, "addon {s} {d} is not loaded: {s}", .{ slot.nameOf(), slot.version, why }) catch &line;
_ = s.print(x, y, cols, text, .{ .fg = fg, .bg = bg });
- return;
+ return true;
} else for (0..8) |_| {
if (ready.items.len > 0) deliver(p, slot, pane, id);
- frame.cells = (paint(p, slot, id, arena, cols, rows, &frame) orelse return);
+ frame.cells = (paint(p, slot, id, arena, cols, rows, &frame) orelse return true);
// No workers here (a test's, a bench's core): a draw that paint
// asked was done at once, and is this frame's, painted again.
if (drawer != null) break;
@@ -450,9 +471,11 @@ pub fn draw(p: *Pardes, s: *surface.Surface, arena: std.mem.Allocator, pane: *Pa
} else break;
}
if (frame.gpu.len != 0) s.gpu_frames[id] = .{ .bytes = frame.gpu, .serial = pane.serial, .dst = .{ .x = x, .y = y, .w = cols, .h = rows } };
+ var painted = frame.gpu.len != 0 or frame.n > 0;
for (0..@min(rows, frame.rows)) |r| for (0..@min(cols, frame.cols)) |col| {
const cell = &frame.cells[r * frame.cols + col];
if (cell.flags & c.PA_PAINTED == 0) continue;
+ painted = true;
const len = @min(cell.len, 7);
s.set(x + @as(u16, @intCast(col)), y + @as(u16, @intCast(r)), if (len == 0) " " else cell.text[0..len], styleOf(cell, fg, bg));
};
@@ -471,6 +494,7 @@ pub fn draw(p: *Pardes, s: *surface.Surface, arena: std.mem.Allocator, pane: *Pa
.art = slot.art,
});
}
+ return painted;
}
/// A frame of a kind's pane: its cells, `cols` a row, and its placements.
@@ -1012,6 +1036,9 @@ const Call = struct {
return o;
};
const p = cl.p orelse return o;
+ // A picker's preview shows its file and does nothing more: what its
+ // kind says, looks at or runs meanwhile is dropped (Pick.showKind).
+ if (pardes.Pick.previewing(p, cl.id)) return o;
if (o.said.len > 0) if (o.err) p.reportFailure(cl.id, o.said) else p.setMessage(.at(cl.id), o.said);
if (o.pane_name.len > 0) textPane(p, cl.id, cl.slot, o.pane_name, o.pane_text);
if (o.look.len > 0) @import("look.zig").lookAt(p, cl.id, o.look);
@@ -1289,7 +1316,7 @@ fn deliver(p: *const Pardes, slot: *Slot, pane: *const Pane, id: usize) void {
}
_ = ready.orderedRemove(i);
defer j.drop();
- if (pane.serial != j.serial or slot.gen != j.gen or slot.ops != j.ops) continue;
+ if (pane.serial != j.serial or slot.gen != j.gen or slot.ops != j.ops or j.token & ~c.PA_DRAWN <= slot.drawn_from) continue;
var cl: Call = .{ .p = null, .id = id, .slot = slot, .quiet = true, .core = p };
const prev = cl.begin("job_done");
const before = if (checked) usedHash(slot);
diff --git a/core/Messages.zig b/core/Messages.zig
index 9361a2d7..fb2c3cde 100644
--- a/core/Messages.zig
+++ b/core/Messages.zig
@@ -435,6 +435,18 @@ pub fn ink(chrome: *const pardes.colors.ChromeTheme, kind: Kind) [3]u8 {
};
}
+/// A message's ink on a ground of the chrome (R9): an error's, a warning's
+/// and a question's their severity's held there (a question info's), an
+/// echo, a notice and progress the ground's dim ink.
+pub fn inkOn(inks: *const pardes.colors.Chrome.Inks, kind: Kind) [3]u8 {
+ return switch (kind) {
+ .@"error" => inks.severity[0],
+ .warn => inks.severity[1],
+ .question => inks.severity[2],
+ .echo, .notice, .progress => inks.dim,
+ };
+}
+
/// The places a compiler's report names put on `s`: each
/// `path:line:col: error|warning|note: words` row (a relative path is
/// `dir`'s), its words there, each place once, and the rows after the
diff --git a/core/Names.zig b/core/Names.zig
index d063bd17..9105e3c4 100644
--- a/core/Names.zig
+++ b/core/Names.zig
@@ -50,6 +50,9 @@ pub const Cand = struct {
/// What the row is of: a line of the owner (Symbols, 1-based), a
/// pane's serial (Panes); 0 for a path.
ref: u32 = 0,
+ /// Its group: the hits stay in their groups' order, scored within
+ /// each (a Symbols row's kind, UX DESIGN N3); 0 for every other source.
+ group: u8 = 0,
};
pub const Hit = struct { cand: u32, score: i32 };
@@ -128,7 +131,9 @@ pub fn typed(n: *Names, gpa: std.mem.Allocator, text: []const u8) void {
// only those are scored again (and then the ones not yet scored).
const grew = n.query_len > 0 and std.mem.startsWith(u8, q, n.queryText()) and std.mem.indexOfScalar(u8, q[n.query_len..], ' ') == null;
n.query_len = @intCast(q.len);
- @memcpy(n.query_buf[0..q.len], q);
+ // Its own query typed again, to score names that came after it
+ // (Pick.declsArrived), is the buffer itself.
+ std.mem.copyForwards(u8, n.query_buf[0..q.len], q);
n.reach = max_rows;
if (grew) {
const pending = n.pending.items[n.pending_at..];
@@ -187,9 +192,17 @@ pub fn reachTo(n: *Names, rows: usize) void {
n.gen +%= 1;
}
-/// Hit `a` goes before `b`: the higher score, then the shorter key, then
-/// the candidate added first.
+/// Hit `a` goes before `b`: the lower group, then `better`.
fn before(cands: []const Cand, a: Hit, b: Hit) bool {
+ const ga = cands[a.cand].group;
+ const gb = cands[b.cand].group;
+ if (ga != gb) return ga < gb;
+ return better(cands, a, b);
+}
+
+/// Hit `a` matched better than `b`: the higher score, then the shorter
+/// key, then the candidate added first.
+fn better(cands: []const Cand, a: Hit, b: Hit) bool {
if (a.score != b.score) return a.score > b.score;
const la = cands[a.cand].key_len;
const lb = cands[b.cand].key_len;
@@ -230,6 +243,22 @@ fn sink(heap: []Hit, cands: []const Cand, from: usize) void {
}
}
+/// The row of the hit the query matched best, wherever its group puts it:
+/// where a list's cursor starts (UX DESIGN N3); 0 for an empty query,
+/// whose rows are the source's order. Its rows up to it are sorted once
+/// `reachTo` has gone past it.
+pub fn bestRow(n: *const Names) usize {
+ const hits = n.hits.items;
+ if (hits.len == 0 or std.mem.trim(u8, n.queryText(), " ").len == 0) return 0;
+ var top = hits[0];
+ for (hits[1..]) |h| if (better(n.cands.items, h, top)) {
+ top = h;
+ };
+ var at: usize = 0;
+ for (hits) |h| at += @intFromBool(before(n.cands.items, h, top));
+ return at;
+}
+
/// The row of hit `i` and, in `marks`, the bytes of it the query matched.
pub fn row(n: *const Names, i: usize, marks: []u16, nmarks: *usize) []const u8 {
const c = n.cands.items[n.hits.items[i].cand];
@@ -435,3 +464,15 @@ test "Names keeps its best `reach` hits first in a full sort's order, the rest a
n.reachTo(max_rows + 500);
try std.testing.expectEqualSlices(Hit, all[0 .. max_rows + 500], n.hits.items[0 .. max_rows + 500]);
}
+
+test "Names takes its own query typed again: names added after it (a Symbols picker's declarations from a worker, Pick.declsArrived) are scored against it" {
+ const gpa = std.testing.allocator;
+ var n: Names = .{};
+ defer n.deinit(gpa);
+ n.typed(gpa, "zzlast");
+ for ([_][]const u8{ "fn f0001() void {", "fn zzlastfn() void {" }) |cand| try n.add(gpa, cand, 0, cand.len, 0, 0);
+ n.typed(gpa, n.queryText());
+ while (n.busy()) n.rescore(gpa);
+ try std.testing.expectEqualStrings("zzlast", n.queryText());
+ try std.testing.expectEqual(@as(usize, 1), n.hits.items.len);
+}
diff --git a/core/Output.zig b/core/Output.zig
index fe1543fe..f0b32c4e 100644
--- a/core/Output.zig
+++ b/core/Output.zig
@@ -70,27 +70,20 @@ const RowDecoration = struct {
return row.guide_end == 0 and !row.declaration and row.location_end == 0 and row.prefix_end == 0 and row.mark_end <= row.mark_start;
}
- /// `chrome` is the theme's own (Pardes.bodyChrome): body paper changes
- /// immediately, so its ink must change with it even while the
- /// surrounding tags are still fading. Once a frame, never a grapheme:
- /// working it out takes the contrast searches' pow calls.
- pub fn styleAt(row: RowDecoration, chrome: *const pardes.ChromeTheme, byte: usize) ?pardes.CellStyle {
+ /// On the page (`chrome`, Pardes.chrome): a tree's guides in the dim
+ /// ink, a location in the line numbers', the match a hit, a
+ /// diagnostic's label in its severity's ink (R8, R9).
+ pub fn styleAt(row: RowDecoration, chrome: *const pardes.colors.Chrome, byte: usize) ?pardes.CellStyle {
if (row.plain()) return null;
- if (byte < row.guide_end) return .{ .fg = .{ .rgb = chrome.diagnostic_info } };
+ if (byte < row.guide_end) return .{ .fg = .{ .rgb = chrome.page.dim } };
if (row.declaration or byte < @max(row.location_end, row.prefix_end))
- return .{ .fg = .{ .rgb = chrome.lineno } };
+ return .{ .fg = .{ .rgb = chrome.line_number } };
if (byte < row.mark_start or byte >= row.mark_end) return null;
if (row.severity == .none) return .{
- .fg = .{ .rgb = chrome.search_fg },
- .bg = .{ .rgb = chrome.search_bg },
+ .fg = .{ .rgb = chrome.page.text },
+ .bg = .{ .rgb = chrome.hit },
};
- return .{ .fg = .{ .rgb = switch (row.severity) {
- .err => chrome.diagnostic_error,
- .warning => chrome.diagnostic_warning,
- .info => chrome.diagnostic_info,
- .hint => chrome.diagnostic_hint,
- .none => unreachable,
- } }, .bold = true };
+ return .{ .fg = .{ .rgb = chrome.page.severity[@intFromEnum(row.severity) - 1] }, .bold = true };
}
};
@@ -198,11 +191,15 @@ pub fn traits(o: Origin) Traits {
};
}
+/// A list laid out as Locations (each place's lines from its file, in
+/// their order): not a file's symbols, a row each in their own order (UX
+/// DESIGN N: types, functions, fields, the rest).
pub fn usesLocationsConfig(from: Origin) bool {
const tr = traits(from);
return tr.steps and !tr.commands and from != .kind and
!std.meta.eql(from, Origin{ .query = .completion }) and
- !std.meta.eql(from, Origin{ .query = .callstack });
+ !std.meta.eql(from, Origin{ .query = .callstack }) and
+ !std.meta.eql(from, Origin{ .query = .document_symbols });
}
pub fn fileTraits(out: ?State) Traits {
@@ -244,6 +241,8 @@ pub fn isResultRow(file: *const File.State, row: usize) bool {
return !locations.isContextLine(modal.lineSlice(file.content, row));
}
+/// A language server's places in the order of their places; a file's
+/// symbols stay in theirs (lsp_client: types, functions, fields, the rest).
fn sortResults(arena: std.mem.Allocator, from: Origin, content: []u8, anchor: ?usize) !?usize {
switch (from) {
.search => {},
@@ -258,7 +257,6 @@ fn sortResults(arena: std.mem.Allocator, from: Origin, content: []u8, anchor: ?u
.outgoing_calls,
.supertypes,
.subtypes,
- .document_symbols,
.workspace_symbols,
.diagnostics,
.workspace_diagnostics,
diff --git a/core/Pick.zig b/core/Pick.zig
index 8669314f..c05ed084 100644
--- a/core/Pick.zig
+++ b/core/Pick.zig
@@ -54,8 +54,9 @@ const Key = pardes.Key;
/// answer, SPC e's places), titled by their word, the messages' history
/// (SPC h m), the themes (SPC t t, the window wearing the one under
/// the cursor), and a language server's code actions for the caret's place
-/// (SPC l a, the body showing the one under the cursor as its edit).
-pub const Source = enum { find, grep, recent, panes, symbols, all, jumplist, list, messages, themes, actions };
+/// (SPC l a, the body showing the one under the cursor as its edit), and
+/// the kept pickers (Lists, UX L'3).
+pub const Source = enum { find, grep, recent, panes, symbols, all, jumplist, list, messages, themes, actions, lists };
/// Each source's word in the tag and its key cells (`␣ f Find`); a
/// source whose Backspace leaves it (`back`) goes back to the SPC level of
@@ -72,9 +73,11 @@ const words = std.EnumArray(Source, struct { word: []const u8, keys: []const u8
.messages = .{ .word = "Messages", .keys = "h" },
.themes = .{ .word = "Themes", .keys = "t" },
.actions = .{ .word = "Actions", .keys = "la" },
+ .lists = .{ .word = "Lists", .keys = "f" },
});
-/// The pickers kept after they roll up, for their list words and Resume.
+/// The pickers kept after they roll up, for their list words, Resume and
+/// Lists (Lists itself never one of them: Pardes.picks has one more).
pub const max_lists = 8;
/// Refinements a picker stacks (C-SPC).
pub const max_refine = 3;
@@ -137,9 +140,12 @@ marks: std.ArrayList(u32) = .empty,
refined: [max_refine]Refined = undefined,
nrefined: u8 = 0,
/// The band's second step: the sources to switch to (M-h), the acts on
-/// the picked rows (M-l, M-Enter); `edit`: the field is the act Edit's
-/// command, the query kept in `query`.
-spine: enum(u8) { rows, sources, acts, edit } = .rows,
+/// the picked rows (M-l, M-Enter), its source's earlier queries (C-r);
+/// `edit`: the field is the act Edit's command, the query kept in `query`.
+spine: enum(u8) { rows, sources, acts, edit, history } = .rows,
+/// The line of its source's history the cursor of it unrolled is on
+/// (Prompt.historyAt: 0 the newest holding the field).
+recall: u8 = 0,
/// The act step's cursor, among the acts offered.
act_at: u8 = 0,
/// The places Walk queued (C-i steps them in the landing pane): each a
@@ -147,6 +153,15 @@ act_at: u8 = 0,
queue: std.ArrayList(Queued) = .empty,
queue_bytes: std.ArrayList(u8) = .empty,
queue_at: u32 = 0,
+/// Where it last landed, `@p2 › words.zig:16` (Lists' meta, UX L'3).
+landed: Kind.Buf(80) = .{},
+/// Where it stands among the kept pickers, the newest the highest
+/// (`touch`): Resume's order (`nth`), and the oldest goes for a new one.
+used: u32 = 0,
+/// The step of its landing pane's trail a walk reopened it at (Ctrl-o,
+/// UX L'1): its Ctrl-o and Ctrl-i walk on from that word, and its Enter
+/// lands as that word's, the steps after it dropped.
+walking: ?u8 = null,
pub const Queued = struct { path: u32, len: u16, line: u32, col: u32 };
@@ -167,11 +182,11 @@ pub fn deinit(pk: *Pick, gpa: std.mem.Allocator) void {
/// Whether a search a builtin asks for from pane `id` is a picker in the
/// tag (SPEC §14.3 phase 4): in a session whose jumps walk, from the
-/// keyboard or a click (kbdin's and mousein's too), never a script's word
-/// (a 9P exec's: the query pane, whose rows it reads back, and whose `not
-/// found` it hears).
+/// keyboard or a click (kbdin's and mousein's too, which run as theirs:
+/// ninep/ctl.zig writeKbdin), never a script's word (a 9P exec's: the query
+/// pane, whose rows it reads back, and whose `not found` it hears).
pub fn asked(p: *const Pardes) bool {
- return p.settings.jumps == .walk and (!p.fs.serving or p.fs.typed);
+ return p.settings.jumps == .walk and !p.fs.serving;
}
/// Picker `id`, kept or live.
@@ -207,10 +222,12 @@ pub fn previewing(p: *const Pardes, id: usize) bool {
pub fn open(p: *Pardes, from: usize, source: Source, word: []const u8, query: []const u8, rows: []const u8) void {
const asker = p.panes[from] orelse return;
TagState.toRest(p);
+ p.resume_at = 0;
const pk = make(p, source) catch |err| return p.reportError(.at(from), "pick", err);
pk.word.set(if (word.len > 0) word else words.get(source).word);
pk.keys.set(words.get(source).keys);
- pk.dir.set(Pardes.paneDir(asker));
+ // Find and Grep from the work tree's root (W8), as other finders search.
+ pk.dir.set(if (source == .find or source == .grep) workTree(p, Pardes.paneDir(asker)) else Pardes.paneDir(asker));
pk.rows = p.gpa.dupe(u8, rows) catch |err| return p.reportError(.at(from), "pick", err);
hostIn(p, pk, from) catch |err| return p.reportError(.at(from), "pick", err);
if (p.paneBySerial(pk.landing)) |host| pk.cap = p.view().rects[host].h * 2 / 5;
@@ -221,17 +238,55 @@ pub fn open(p: *Pardes, from: usize, source: Source, word: []const u8, query: []
if (source == .themes and query.len == 0 and p.custom_theme == null) p.view().tag_state.rows.at = @intCast(p.settings.theme);
}
+/// The work tree `dir` is in: the nearest directory at or above it that
+/// holds a `.jj` or a `.git` (a git worktree's is a file); `dir` itself
+/// when none does. Find and Grep search from it, their rows' paths
+/// relative to it, wherever in the tree the asking pane is.
+fn workTree(p: *Pardes, dir: []const u8) []const u8 {
+ var d = dir;
+ while (true) {
+ var buf: [4096]u8 = undefined;
+ for ([_][]const u8{ ".jj", ".git" }) |name| {
+ const marker = std.fmt.bufPrint(&buf, "{s}/{s}", .{ std.mem.trimEnd(u8, d, "/"), name }) catch return dir;
+ if (exec.kindOf(p.tape, marker) != null) return d;
+ }
+ d = std.Io.Dir.path.dirname(d) orelse return dir;
+ }
+}
+
+/// Where a Grep's query `q` searches and for what (SPEC §5.1): a leading
+/// directory, the root's or absolute, then a blank, narrows it to that
+/// directory (`src/torque Macro`), the rest the pattern; else all of it
+/// from the root. The directory joined in `buf`.
+fn grepScope(p: *Pardes, pk: *const Pick, q: []const u8, buf: *[4096]u8) struct { dir: []const u8, pat: []const u8 } {
+ const root = pk.dir.slice();
+ const sp = std.mem.indexOfScalar(u8, q, ' ') orelse return .{ .dir = root, .pat = q };
+ const lead = q[0..sp];
+ const dir = if (lead[0] == '/') lead else std.fmt.bufPrint(buf, "{s}/{s}", .{ std.mem.trimEnd(u8, root, "/"), lead }) catch return .{ .dir = root, .pat = q };
+ if (exec.kindOf(p.tape, dir) != .directory) return .{ .dir = root, .pat = q };
+ return .{ .dir = dir, .pat = std.mem.trimStart(u8, q[sp + 1 ..], " ") };
+}
+
/// A new picker in the ring, the oldest kept one dropped for it.
fn make(p: *Pardes, source: Source) !*Pick {
var slot: ?usize = null;
- for (p.picks, 0..) |s, i| if (s == null) {
+ // Lists is never kept (UX L'3): the one it had goes, and it drops none
+ // of the kept for its room.
+ for (p.picks, 0..) |s, i| if (s) |pk| if (source == .lists and pk.source == .lists) {
+ pk.deinit(p.gpa);
+ p.gpa.destroy(pk);
+ p.picks[i] = null;
+ slot = i;
+ break;
+ };
+ if (slot == null and (source == .lists or nkept(p) < max_lists)) for (p.picks, 0..) |s, i| if (s == null) {
slot = i;
break;
};
if (slot == null) {
// The oldest not live.
var oldest: ?usize = null;
- for (p.picks, 0..) |s, i| if (s) |pk| if (!pk.unrolled and (oldest == null or pk.id < p.picks[oldest.?].?.id)) {
+ for (p.picks, 0..) |s, i| if (s) |pk| if (!pk.unrolled and pk.source != .lists and (oldest == null or rank(pk) < rank(p.picks[oldest.?].?))) {
oldest = i;
};
const i = oldest orelse return error.NoPickerSlots;
@@ -244,9 +299,48 @@ fn make(p: *Pardes, source: Source) !*Pick {
p.next_serial += 1;
pk.* = .{ .id = p.next_serial, .source = source };
p.picks[slot.?] = pk;
+ touch(p, pk);
return pk;
}
+/// Picker `pk` the newest kept (UX L': made, landed, reopened by a walk).
+fn touch(p: *Pardes, pk: *Pick) void {
+ var top: u32 = 0;
+ for (p.picks) |slot| if (slot) |o| {
+ top = @max(top, o.used);
+ };
+ pk.used = top +| 1;
+}
+
+/// Where picker `pk` stands among the kept ones, newer higher: its `used`,
+/// then its serial (pickers a dump made before `used` was kept).
+fn rank(pk: *const Pick) u64 {
+ return @as(u64, pk.used) << 32 | pk.id;
+}
+
+/// The `k`th newest kept picker, the newest 1.
+fn nth(p: *const Pardes, k: usize) ?*Pick {
+ var below: u64 = std.math.maxInt(u64);
+ var found: ?*Pick = null;
+ for (0..k) |_| {
+ found = null;
+ for (p.picks) |slot| if (slot) |pk| if (pk.source != .lists and rank(pk) < below and (found == null or rank(pk) > rank(found.?))) {
+ found = pk;
+ };
+ below = rank(found orelse return null);
+ }
+ return found;
+}
+
+/// The pickers kept: not Lists.
+fn nkept(p: *const Pardes) usize {
+ var n: usize = 0;
+ for (p.picks) |slot| if (slot) |pk| {
+ n += @intFromBool(pk.source != .lists);
+ };
+ return n;
+}
+
/// Picker `pk` asked from pane `from`: the pane it lands in is `from` when
/// it reads; its reader when it is held and has one; else an untouched
/// pane, `from` itself first (UX J1), which previews as a reading pane does
@@ -331,6 +425,13 @@ fn start(p: *Pardes, pk: *Pick) void {
addRows(p, pk, out.written());
},
.list => addRows(p, pk, pk.rows),
+ // The kept pickers, newest first, each by its list word.
+ .lists => for (1..max_lists + 1) |k| {
+ const kp = nth(p, k) orelse break;
+ var word: Kind.Buf(Trail.max_text) = .{};
+ const text = wordOf(p, kp, &word);
+ pk.names.add(p.gpa, text, 0, text.len, 0, kp.id) catch return;
+ },
.messages => {
var out: std.Io.Writer.Allocating = .init(p.gpa);
defer out.deinit();
@@ -381,12 +482,17 @@ pub fn filter(p: *Pardes, pk: *Pick) void {
const q = std.mem.trim(u8, p.view().tag_state.field.text(), " ");
p.view().tag_state.rows.at = 0;
pk.shown = no_row;
- if (fuzzy(pk)) return pk.names.typed(p.gpa, q);
+ if (fuzzy(pk)) {
+ pk.names.typed(p.gpa, q);
+ return toBest(p, pk);
+ }
if (pk.source == .grep) {
pk.found.clearRetainingCapacity();
pk.found_bytes.clearRetainingCapacity();
- if (q.len > 0) {
- Stream.query(p, pk.id, .grep, q, pk.dir.slice(), if (p.fs.serving) .now else .typed) catch |err| return p.reportError(.at(p.view().active), "pick", err);
+ var buf: [4096]u8 = undefined;
+ const at = grepScope(p, pk, q, &buf);
+ if (at.pat.len > 0) {
+ Stream.query(p, pk.id, .grep, at.pat, at.dir, if (p.fs.serving) .now else .typed) catch |err| return p.reportError(.at(p.view().active), "pick", err);
if (p.fs.serving) Stream.step(p);
} else if (p.stream.target == pk.id) _ = p.stream.stop();
return;
@@ -430,7 +536,12 @@ fn allPanes(p: *const Pardes, pk: *const Pick, out: *[pardes.MAX_PANES]usize) []
/// The disk engine's rows for picker `target` (Stream.receive).
pub fn take(p: *Pardes, target: u32, kind: Stream.Kind, rows: []const u8) bool {
const pk = byId(p, target) orelse return false;
- Query.take(p, pk, kind, rows);
+ // A Grep narrowed to a directory (grepScope): its rows' paths from the
+ // root, as an unnarrowed one's are.
+ var buf: [4096]u8 = undefined;
+ const searched = p.stream.dir.items;
+ const under = if (kind == .grep and !std.mem.eql(u8, searched, pk.dir.slice())) std.fmt.bufPrint(&buf, "{s}/", .{relative(searched, pk.dir.slice())}) catch "" else "";
+ Query.take(p, pk, kind, rows, under);
// A listing's names, scored as they come.
if (kind == .files) pk.names.rescore(p.gpa);
return true;
@@ -443,15 +554,31 @@ pub fn declsArrived(p: *Pardes, serial: u32) void {
Query.gather(p, &pk.names, .symbols, pk.dir.slice(), null, p.paneBySerial(serial));
pk.names.typed(p.gpa, pk.names.queryText());
pk.names.rescore(p.gpa);
+ if (live(p) == pk) toBest(p, pk);
};
}
+/// The live picker's cursor on its best match, wherever its group puts it
+/// (UX DESIGN N3: a Symbols list stays grouped while typed), its rows
+/// sorted as far as the band shows past it.
+fn toBest(p: *Pardes, pk: *Pick) void {
+ const at = pk.names.bestRow();
+ pk.names.reachTo(at + Band.Cursor.shown);
+ p.view().tag_state.rows.at = @intCast(@min(at, std.math.maxInt(u16)));
+}
+
/// After every step: each live picker's names scored on (a frame's count),
/// and on a frame of its own after the cursor stood, the preview of the
/// current row.
pub fn produceAll(p: *Pardes, tick: bool) void {
for (p.picks) |slot| if (slot) |pk| if (pk.unrolled) {
- if (pk.names.busy()) pk.names.rescore(p.gpa);
+ if (pk.names.busy()) {
+ // A cursor on the best match follows it while the rest are
+ // scored.
+ const on_best = live(p) == pk and p.view().tag_state.rows.at == pk.names.bestRow();
+ pk.names.rescore(p.gpa);
+ if (on_best) toBest(p, pk);
+ }
// A theme's preview in the step of the key that moved to it.
if (pk.source == .themes) pardes.colors.previewTheme(p, refAt(p, pk));
if (tick) preview(p, pk);
@@ -513,9 +640,9 @@ const Target = union(enum) { none, place: struct { path: []const u8, at: look.Sp
/// Row `i` as the band shows it and what it points at, its text in
/// `arena`.
-const Row = struct { text: []const u8, key: u8 = 0, pre: u16 = 0, faint: u16 = 0, dim: bool = false, marks: []const u16 = &.{}, target: Target = .none, meta: []const u8 = "" };
+const Row = struct { text: []const u8, key: u8 = 0, kind: u8 = 0, pre: u16 = 0, faint: u16 = 0, quiet: [2]u16 = .{ 0, 0 }, dim: bool = false, marks: []const u16 = &.{}, target: Target = .none, meta: []const u8 = "" };
-fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row {
+fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) std.mem.Allocator.Error!Row {
const dir = pk.dir.slice();
if (!fuzzy(pk) and pk.source == .all) {
var order: [pardes.MAX_PANES]usize = undefined;
@@ -555,7 +682,8 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row {
var marks: std.ArrayList(u16) = .empty;
var c = fd.col;
while (c < fd.end and c >= lead and pre.len + 1 + c - lead < text.len) : (c += 1) try marks.append(arena, @intCast(pre.len + 1 + c - lead));
- const path = try std.Io.Dir.path.join(arena, &.{ dir, name });
+ // (Under an absolute leading directory, grepScope's, an absolute path.)
+ const path = if (name.len > 0 and name[0] == '/') name else try std.Io.Dir.path.join(arena, &.{ dir, name });
return .{ .text = text, .pre = @intCast(pre.len), .marks = marks.items, .target = .{ .place = .{ .path = path, .at = .{ .line = fd.line, .col = fd.col + 1 } } } };
}
var marks: [Names.max_query * 4]u16 = undefined;
@@ -568,19 +696,44 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) !Row {
var namebuf: [4096]u8 = undefined;
const name = if (text.len > 1 and text[0] == '"' and text[text.len - 1] == '"') look.unquoted(&namebuf, text[1 .. text.len - 1]) else text;
row.faint = @intCast(if (std.mem.lastIndexOfScalar(u8, text, '/')) |k| k + 1 else 0);
- row.target = .{ .place = .{ .path = try std.Io.Dir.path.join(arena, &.{ dir, name }), .at = .{ .line = 1, .col = 1 } } };
+ // A text at its first line; a kind's file whole, as a Look of
+ // its name opens it (a place in it is its kind's address).
+ const at: look.Spot = if (p.kinds.forPath(name) != null) .{} else .{ .line = 1, .col = 1 };
+ row.target = .{ .place = .{ .path = try std.Io.Dir.path.join(arena, &.{ dir, name }), .at = at } };
},
.panes => {
row.pre = cand.key -| 1;
row.dim = p.paneBySerial(cand.ref) == null;
row.target = .{ .pane = cand.ref };
},
+ // ` 12 m Counts.lines : usize = 0` (Query.gather): the line its
+ // meta, the mark in the keyword's ink, the qualifier and what
+ // follows the name dim (UX DESIGN N4).
.symbols => {
- row.pre = 6;
+ const line = 8;
+ if (text.len <= line or cand.key < line) return row;
+ row.text = text[line..];
+ row.meta = std.mem.trimStart(u8, text[0..6], " ");
+ const marks_in = try arena.alloc(u16, row.marks.len);
+ for (marks_in, row.marks) |*m, at| m.* = at -| line;
+ row.marks = marks_in;
+ const name_at = cand.key - line;
+ row.kind = @intCast(name_at - 1);
+ row.pre = @intCast(name_at);
+ row.faint = cand.base;
+ if (name_at + cand.key_len < row.text.len) row.quiet = .{ @intCast(name_at + cand.key_len), @intCast(row.text.len) };
const owner = p.panes[p.paneBySerial(pk.owner) orelse return row] orelse return row;
const f = owner.file orelse return row;
row.target = .{ .place = .{ .path = f.path, .at = .{ .line = cand.ref } } };
},
+ // A kept picker: where it last landed, its current row's place the
+ // preview (UX L'3).
+ .lists => {
+ const kp = byId(p, cand.ref) orelse return row;
+ row.meta = kp.landed.slice();
+ const n = count(p, kp);
+ if (n > 0) row.target = (try rowAt(p, kp, arena, @min(kp.at, n - 1))).target;
+ },
// The theme in use says so, whichever the window wears (POLISH 12).
.themes => if (p.custom_theme == null and cand.ref == p.settings.theme) {
row.meta = "in use";
@@ -647,6 +800,8 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head {
const text = &b.text;
// SPC's cell, then its keys': `␣ f`.
if (pk.keys.len > 0) try b.keyCells(.leader, pk.keys.slice());
+ // One Resume opened: where it stands among the kept (UX L'2).
+ if (p.resume_at != 0) try text.print(arena, "Resume {d}/{d} ", .{ p.resume_at, nkept(p) });
try text.appendSlice(arena, pk.word.slice());
try text.append(arena, ' ');
for (pk.refined[0..pk.nrefined]) |r| try text.print(arena, "{s} | ", .{r.query.slice()});
@@ -660,10 +815,15 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head {
if (n == 0) try text.append(arena, '0') else try text.print(arena, "{d}/{d}", .{ s.rows.at + 1, n });
if (pk.marks.items.len > 0) try text.print(arena, " •{d}", .{pk.marks.items.len});
if (pk.names.busy() or p.stream.busyFor(pk.id)) try text.appendSlice(arena, " ⋯");
- // Themes and actions have no acts and no other sources: no second row.
- if (pk.source == .themes or pk.source == .actions) {
+ // Themes, actions and Lists have no acts and no other sources: no
+ // second row.
+ if (pk.source == .themes or pk.source == .actions or pk.source == .lists) {
const hints = text.items.len;
- try b.styled(if (pk.source == .themes) "⏎ wear it · esc" else "⏎ or 1-9 apply it · esc", .dim);
+ try b.styled(switch (pk.source) {
+ .themes => "⏎ wear it · esc",
+ .lists => "⏎ reopen it · esc",
+ else => "⏎ or 1-9 apply it · esc",
+ }, .dim);
try b.right(counted, hints);
var h = b.done();
h.caret = caret;
@@ -685,7 +845,7 @@ pub fn head(p: *Pardes, arena: std.mem.Allocator, pane: *Pane) !?TagState.Head {
const nacts = nw;
offer[nw] = "|";
nw += 1;
- inline for (comptime std.enums.values(Source)) |src| if (src != .list and src != .messages and src != .themes and src != .actions and src != pk.source) {
+ inline for (comptime std.enums.values(Source)) |src| if (src != .list and src != .messages and src != .themes and src != .actions and src != .lists and src != pk.source) {
offer[nw] = words.get(src).word;
nw += 1;
};
@@ -722,6 +882,7 @@ pub fn bandRows(p: *const Pardes) u16 {
for (acts) |act| n += @intFromBool(offered(pk, act));
break :acts @max(rows, n);
},
+ .history => @max(rows, pardes.Prompt.historyRows(p.prompt_history.pick.getPtrConst(pk.source), p.view().tag_state.field.text())),
.rows, .edit => rows,
});
}
@@ -731,8 +892,10 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator) ![]Band.Step {
const pk = live(p) orelse return &.{};
const s = &p.view().tag_state;
const n = count(p, pk);
- const out = try arena.alloc(Band.Step, if (pk.spine == .sources or pk.spine == .acts) 2 else 1);
+ const out = try arena.alloc(Band.Step, if (pk.spine == .sources or pk.spine == .acts or pk.spine == .history or pk.source == .lists) 2 else 1);
+ if (pk.spine == .history) _ = try pardes.Prompt.historyStep(arena, p.prompt_history.pick.getPtrConst(pk.source), s.field.text(), pk.recall, &out[1]);
if (pk.spine == .acts) out[1] = try actStep(p, pk, arena);
+ if (pk.source == .lists) out[1] = try listedStep(p, pk, arena);
if (pk.spine == .sources) {
const rows = try arena.alloc(Band.Row, spine_rows.len);
for (spine_rows, rows, 0..) |src, *row, i| row.* = .{ .text = try std.fmt.allocPrint(arena, "{c} {s}", .{ src.key, src.word }), .key = 1, .index = @intCast(i), .dim = src.source == pk.source };
@@ -748,7 +911,7 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator) ![]Band.Step {
const rows = try arena.alloc(Band.Row, w.hi - w.lo);
for (rows, w.lo..) |*row, i| {
const r = try rowAt(p, pk, arena, i);
- row.* = .{ .text = r.text, .key = r.key, .on = i == s.rows.at, .mark = marked(pk, idOf(pk, i)) != null, .dim = r.dim, .pre = r.pre, .faint = r.faint, .marks = r.marks, .index = @intCast(i), .meta = r.meta };
+ row.* = .{ .text = r.text, .key = r.key, .kind = r.kind, .on = i == s.rows.at, .mark = marked(pk, idOf(pk, i)) != null, .dim = r.dim, .pre = r.pre, .faint = r.faint, .quiet = r.quiet, .marks = r.marks, .index = @intCast(i), .meta = r.meta };
}
// A place's text (a Grep's line, a list's): its `path:line` in the dim
// ink and the text after it in one column, the widest place shown
@@ -778,6 +941,18 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator) ![]Band.Step {
return out;
}
+/// Lists' second step (UX L'3): the kept picker under its cursor, its
+/// rows around its own cursor, which is marked `▶`; read, never a list.
+fn listedStep(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator) !Band.Step {
+ const kp = byId(p, @intCast(refAt(p, pk) orelse return .{ .doc = true })) orelse return .{ .doc = true };
+ const n = count(p, kp);
+ const lo = if (kp.at < Band.Cursor.shown) 0 else kp.at + 1 - Band.Cursor.shown;
+ const hi = @min(n, lo + Band.Cursor.shown);
+ const rows = try arena.alloc(Band.Row, hi -| lo);
+ for (rows, lo..) |*row, i| row.* = .{ .text = try std.fmt.allocPrint(arena, "{s}{s}", .{ if (i == kp.at) "▶ " else " ", (try rowAt(p, kp, arena, i)).text }) };
+ return .{ .rows = rows, .doc = true };
+}
+
// ---- the preview ----
/// The line (from 0) pane `pane`'s body lands the live picker's cursor row
@@ -807,7 +982,7 @@ pub fn landingLine(p: *Pardes, arena: std.mem.Allocator, pane: *const Pane) ?usi
/// previewing.
pub fn sentence(p: *const Pardes, w: *std.Io.Writer) ?[2]usize {
const pk = live(p) orelse return null;
- if (!pk.previews or pk.source == .themes or pk.source == .actions) return null;
+ if (!pk.previews or pk.source == .themes or pk.source == .actions or pk.source == .lists) return null;
if (pk.landing == pk.owner) {
w.writeAll("⏎ lands here") catch return null;
} else {
@@ -824,7 +999,11 @@ pub fn sentence(p: *const Pardes, w: *std.Io.Writer) ?[2]usize {
/// The landing pane's body showing the current row's place (SPEC §5.3):
/// a file at its line, the query's matches lit for a Grep. Its own text is
/// set aside the first time, put back when the picker rolls up. A file an
-/// open pane shows is taken from it; any other is read.
+/// open pane shows is taken from it; any other is read. A file a kind
+/// takes (an addon's: a picture, a PDF), as a Look would open it
+/// (look.resolve), shows through that kind (showKind); any other that is
+/// not text (a NUL in its first 8000 bytes) as one line naming it,
+/// `blob.bin · binary · 3.0 kB`, never its bytes.
fn preview(p: *Pardes, pk: *Pick) void {
const s = &p.view().tag_state;
// No row yet: none shown, so the first to come is (a Find's listing
@@ -843,45 +1022,27 @@ fn preview(p: *Pardes, pk: *Pick) void {
const pane = p.panes[id].?;
const f = if (pane.file) |*file| file else return;
if (f.twin != 0) return;
- if (!std.mem.eql(u8, f.path, place.path)) {
+ const showing = if (pane.addon) |k| k.path else f.path;
+ if (!std.mem.eql(u8, showing, place.path)) {
if (exec.kindOf(p.tape, place.path)) |kind| if (kind != .file) return;
- const bytes = openText(p, place.path) orelse (p.tape.site(.preview, p.gpa, filesystem.read, .{ p, place.path }) catch return);
- if (std.mem.indexOfScalar(u8, bytes[0..@min(bytes.len, 8000)], 0) != null) {
- p.gpa.free(bytes);
- return;
+ const read = openText(p, place.path) orelse (p.tape.site(.preview, p.gpa, filesystem.read, .{ p, place.path }) catch return);
+ if (pane.addon != null) Kind.close(p, pane);
+ if (p.kinds.forPath(place.path)) |k| {
+ defer p.gpa.free(read);
+ return showKind(p, pk, id, k, place.path, read);
}
- const path = p.gpa.dupe(u8, place.path) catch {
- p.gpa.free(bytes);
- return;
+ const bytes = if (std.mem.indexOfScalar(u8, read[0..@min(read.len, 8000)], 0) == null) read else named: {
+ defer p.gpa.free(read);
+ break :named nameLine(p.gpa, place.path, "binary", read.len, "") catch return;
};
- if (pk.aside == null and !pk.made) {
- const history = File.History.create(p.gpa) catch {
- p.gpa.free(bytes);
- p.gpa.free(path);
- return;
- };
- pk.aside = pane.file;
- pane.file = .{ .path = path, .content = bytes, .output = .{ .from = .preview }, .history = history };
- } else {
- const pf = &pane.file.?;
- p.gpa.free(pf.path);
- pf.path = path;
- File.setContent(p, pf, bytes);
- pf.saved_revision = pf.revision;
- pf.scroll = 0;
- pf.scroll_row = 0;
- pf.syntax_dirty = true;
- pane.places.clear(p.gpa);
- }
- pane.hscroll = 0;
- pk.previewed = true;
- p.sync();
+ showText(p, pk, id, place.path, bytes);
}
+ if (pane.addon != null) return;
// The body under the band from the first place it shows (previewing):
// laid out again before the place is put in its rows.
if (!pk.previewed) {
pk.previewed = true;
- p.sync();
+ p.layOut();
}
const keyboard = p.view().active;
defer p.view().active = keyboard;
@@ -897,7 +1058,85 @@ fn preview(p: *Pardes, pk: *Pick) void {
}
look.focusPaneLine(p, id, at, .third);
// A Grep's matches in the file lit, as its own pane would have them.
- if (pk.source == .grep) pane.places.search(p, pane, .list, pk.id, std.mem.trim(u8, s.field.text(), " "), true, null, false);
+ if (pk.source == .grep) {
+ var buf: [4096]u8 = undefined;
+ pane.places.search(p, pane, .list, pk.id, grepScope(p, pk, std.mem.trim(u8, s.field.text(), " "), &buf).pat, true, null, false);
+ }
+}
+
+/// Landing pane `id`'s text `bytes` (taken) as `path`: its own text set
+/// aside the first time, a preview's text after that changed in place.
+fn showText(p: *Pardes, pk: *Pick, id: usize, path_: []const u8, bytes: []u8) void {
+ const pane = p.panes[id].?;
+ const path = p.gpa.dupe(u8, path_) catch {
+ p.gpa.free(bytes);
+ return;
+ };
+ if (pk.aside == null and !pk.made) {
+ const history = File.History.create(p.gpa) catch {
+ p.gpa.free(bytes);
+ p.gpa.free(path);
+ return;
+ };
+ pk.aside = pane.file;
+ pane.file = .{ .path = path, .content = bytes, .output = .{ .from = .preview }, .history = history };
+ } else {
+ const pf = &pane.file.?;
+ p.gpa.free(pf.path);
+ pf.path = path;
+ File.setContent(p, pf, bytes);
+ pf.saved_revision = pf.revision;
+ pf.scroll = 0;
+ pf.scroll_row = 0;
+ pf.syntax_dirty = true;
+ pane.places.clear(p.gpa);
+ }
+ pane.hscroll = 0;
+ pk.previewed = true;
+ p.layOut();
+}
+
+/// Landing pane `id` showing the file at `path` through kind `k`, as a
+/// Look would open it in a pane of its own: a slot of that kind over the
+/// pane's text, which stays under it, unseen, until the next row or the
+/// roll-up takes the slot away (Kind.close). Its kind does the work it
+/// does for its own pane (an image decoded on a worker; a draw of a row
+/// passed by dropped, Kind.Slot.drawn_from), and nothing more: what it
+/// says, looks at or runs is not done while it previews (Kind.Call.end).
+/// Until its picture is drawn, the line naming it (draw.zig); one its kind
+/// refuses is that line as text, saying why.
+fn showKind(p: *Pardes, pk: *Pick, id: usize, k: u8, path: []const u8, bytes: []const u8) void {
+ const pane = p.panes[id].?;
+ const slot = Kind.newSlot(p, k, path) catch |err| return p.reportError(.at(id), "pick", err);
+ slot.size = bytes.len;
+ pane.addon = slot;
+ pk.previewed = true;
+ if (!Kind.reopen(p, id, slot, bytes) and slot.refused.len > 0) {
+ const line = nameLine(p.gpa, path, slot.nameOf(), bytes.len, slot.refused.slice()) catch return Kind.close(p, pane);
+ Kind.close(p, pane);
+ return showText(p, pk, id, path, line);
+ }
+ p.layOut();
+}
+
+/// The one line a file shows while a picker previews it and none of its
+/// text is shown: its name, what it is (`binary`, a kind's name), its size
+/// and why when it says why: `photo.png · image · 1.2 MB`.
+pub fn nameLine(gpa: std.mem.Allocator, path: []const u8, what: []const u8, size: u64, why: []const u8) ![]u8 {
+ var out: std.Io.Writer.Allocating = .init(gpa);
+ errdefer out.deinit();
+ const w = &out.writer;
+ try w.print("{s} · {s} · ", .{ std.Io.Dir.path.basename(path), what });
+ if (size < 1000) try w.print("{d} B", .{size}) else {
+ const units = [_][]const u8{ "kB", "MB", "GB", "TB", "PB", "EB" };
+ var unit: u64 = 1000;
+ var u: usize = 0;
+ while (size / unit >= 1000 and u + 1 < units.len) : (u += 1) unit *= 1000;
+ const tenths = size / (unit / 10);
+ try w.print("{d}.{d} {s}", .{ tenths / 10, tenths % 10, units[u] });
+ }
+ if (why.len > 0) try w.print(" · {s}", .{why});
+ return out.toOwnedSlice();
}
/// The text of `path` as an open pane has it, copied: no read for it.
@@ -918,6 +1157,9 @@ fn restore(p: *Pardes, pk: *Pick) void {
const id = p.paneBySerial(pk.landing) orelse return;
for (p.panes) |slot| if (slot) |tp| if (tp.places.from == pk.id) tp.places.clear(p.gpa);
if (pk.made) {
+ // A kind's file shown: its slot closed first, as a pane's text
+ // closing is no file closed (no Recent row).
+ if (p.panes[id].?.addon != null) Kind.close(p, p.panes[id].?);
pk.made = false;
p.removePane(id, p.paneBySerial(pk.owner)) catch |err| p.reportError(.at(id), "pick", err);
return;
@@ -929,6 +1171,7 @@ fn restore(p: *Pardes, pk: *Pick) void {
fn putBack(p: *Pardes, pk: *Pick) void {
const id = p.paneBySerial(pk.landing) orelse return;
const pane = p.panes[id].?;
+ if (pane.addon != null) Kind.close(p, pane);
if (pk.made) return;
const own = pk.aside orelse {
// Its own file previewed: its caret and top as they were.
@@ -944,7 +1187,7 @@ fn putBack(p: *Pardes, pk: *Pick) void {
pane.body.cur_row = pk.aside_row;
pane.body.cur_col = pk.aside_col;
pane.body.vsel.active = false;
- p.sync();
+ p.layOut();
}
/// The live picker rolled up (Esc, or the tag put to rest by anything):
@@ -954,9 +1197,13 @@ pub fn rollUp(p: *Pardes) void {
const pk = live(p) orelse return;
const s = &p.view().tag_state;
if (pk.spine != .edit) pk.query.set(s.field.text());
+ // Its query its source's history's (UX L2's C-r): Lists keeps none.
+ if (pk.source != .lists) p.prompt_history.pick.getPtr(pk.source).add(pk.query.slice());
pk.spine = .rows;
+ pk.recall = 0;
pk.at = s.rows.at;
pk.unrolled = false;
+ pk.walking = null;
if (p.stream.target == pk.id) _ = p.stream.stop();
restore(p, pk);
}
@@ -1071,8 +1318,8 @@ pub fn ghosts(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r:
if (rows <= first) return;
const w: usize = s.cols;
const old = try arena.dupe(Cell, s.cells[(y0 + first) * w .. (y0 + rows) * w]);
- const grounds = colors.Grounds.of(p.theme());
- const ink = p.theme().fg orelse p.theme().tag_fg;
+ const chrome = p.chrome();
+ const ink = chrome.page.text;
const x0 = r.x + config.GUTTER + File.gutterWidth(pane);
const width = r.w -| (x0 - r.x);
var out: usize = first;
@@ -1089,15 +1336,15 @@ pub fn ghosts(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r:
if (out >= rows) break;
const y: u16 = @intCast(y0 + out);
s.fill(0, y, @intCast(s.cols), 1, .{});
- s.fill(x0, y, width, 1, .{ .bg = .{ .rgb = grounds.add.row } });
- _ = s.print(x0, y, width, l, .{ .fg = .{ .rgb = ink }, .bg = .{ .rgb = grounds.add.row } });
+ s.fill(x0, y, width, 1, .{ .bg = .{ .rgb = chrome.add.row } });
+ _ = s.print(x0, y, width, l, .{ .fg = .{ .rgb = ink }, .bg = .{ .rgb = chrome.add.row } });
out += 1;
};
}
}
if (out >= rows) break;
@memcpy(s.cells[(y0 + out) * w ..][0..w], old[(vr - first) * w ..][0..w]);
- if (g < groups.items.len and line >= groups.items[g].lo and line < groups.items[g].hi) s.tint(x0, @intCast(y0 + out), width, grounds.del.row, null);
+ if (g < groups.items.len and line >= groups.items[g].lo and line < groups.items[g].hi) s.tint(x0, @intCast(y0 + out), width, chrome.del.row, null);
out += 1;
}
}
@@ -1119,10 +1366,34 @@ pub fn key(p: *Pardes, k: Key) void {
return;
}
if (pk.spine == .acts) return actKey(p, pk, k);
+ // Its source's earlier queries unrolled (C-r, UX L2): Down and Up
+ // move their cursor, Enter puts the one under it in the field, C-r
+ // and Esc (closeHistory) roll them up; anything else is the field's,
+ // which filters both.
+ if (pk.spine == .history) {
+ const r = p.prompt_history.pick.getPtr(pk.source);
+ if (pardes.Prompt.historyKey(r, s.field.text(), &pk.recall, k)) return;
+ if (plain and k.cp == Key.enter) {
+ const at = pardes.Prompt.historyAt(r, s.field.text(), pk.recall);
+ pk.spine = .rows;
+ pk.recall = 0;
+ if (at == 0) return;
+ s.field.set(r.get(at).?);
+ return filter(p, pk);
+ }
+ if (ctrl and k.cp == 'r') {
+ pk.spine = .rows;
+ return;
+ }
+ pk.recall = 0;
+ if (s.field.key(k)) filter(p, pk);
+ return;
+ }
// Themes: Enter wears the one under the cursor; actions: Enter, or an
// action's digit with the field empty, applies it; the rows and the
// field.
- if (pk.source == .themes or pk.source == .actions) {
+ if (pk.source == .themes or pk.source == .actions or pk.source == .lists) {
+ if (plain and k.cp == Key.enter and pk.source == .lists) return reopenListed(p, pk);
if (plain and k.cp == Key.enter and pk.source == .themes) {
const at = refAt(p, pk) orelse return;
TagState.toRest(p);
@@ -1148,6 +1419,12 @@ pub fn key(p: *Pardes, k: Key) void {
_ = s.field.key(k);
return;
}
+ // A list a walk reopened (UX L'1): Ctrl-o and Ctrl-i walk on from its
+ // word, the list rolled up unlanded. Ctrl-i is Tab where the terminal
+ // cannot tell them apart: a mark, as Tab.
+ if (pk.walking) |at| if (ctrl and (k.cp == 'o' or k.cp == 'i')) return walkOn(p, pk, at, if (k.cp == 'o') -1 else 1);
+ // One Resume opened: the next older or newer kept one (UX L'2).
+ if (p.resume_at != 0 and ctrl and (k.cp == 'o' or k.cp == 'i')) return resumeAt(p, p.paneBySerial(pk.owner) orelse p.view().active, if (k.cp == 'o') p.resume_at + 1 else p.resume_at - 1);
if (alt and (k.cp == Key.enter or k.cp == 'l')) {
pk.spine = .acts;
pk.act_at = 0;
@@ -1169,6 +1446,11 @@ pub fn key(p: *Pardes, k: Key) void {
}
if (ctrl and (k.cp == ' ' or k.cp == '@')) return refine(p, pk, false);
if (ctrl and k.cp == 'q') return keep(p, pk);
+ if (ctrl and k.cp == 'r') {
+ pk.spine = .history;
+ pk.recall = 0;
+ return;
+ }
if (alt and k.cp == 'p') {
pk.previews = !pk.previews;
pk.shown = no_row;
@@ -1184,6 +1466,16 @@ pub fn key(p: *Pardes, k: Key) void {
if (s.field.key(k)) filter(p, pk);
}
+/// Esc with the live picker's history unrolled (keys.tagStateKey): that
+/// rolled up alone, the picker as it was; false with none.
+pub fn closeHistory(p: *Pardes) bool {
+ const pk = live(p) orelse return false;
+ if (pk.spine != .history) return false;
+ pk.spine = .rows;
+ pk.recall = 0;
+ return true;
+}
+
/// The source spine (M-h): a key a source, the query kept.
const spine_rows = [_]struct { key: u8, word: []const u8, source: ?Source }{
.{ .key = 'f', .word = "Find", .source = .find },
@@ -1192,6 +1484,7 @@ const spine_rows = [_]struct { key: u8, word: []const u8, source: ?Source }{
.{ .key = 'b', .word = "Panes", .source = .panes },
.{ .key = 's', .word = "Symbols", .source = .symbols },
.{ .key = '/', .word = "All", .source = .all },
+ .{ .key = '\'', .word = "Lists", .source = .lists },
.{ .key = '?', .word = "Help", .source = null },
};
@@ -1207,6 +1500,13 @@ fn switchTo(p: *Pardes, pk: *Pick, source: ?Source) void {
p.view().tag_state.field.set(query.slice());
return TagState.filter(p);
};
+ // Lists is a picker of the kept ones, this one among them: one of its
+ // own, from where this one was asked (UX L'3).
+ if (to == .lists) {
+ const from = p.paneBySerial(pk.owner) orelse p.view().active;
+ TagState.toRest(p);
+ return open(p, from, to, "", "", "");
+ }
if (p.stream.target == pk.id) _ = p.stream.stop();
for (p.panes) |slot| if (slot) |tp| if (tp.places.from == pk.id) tp.places.clear(p.gpa);
for (pk.refined[0..pk.nrefined]) |*r| r.names.deinit(p.gpa);
@@ -1257,6 +1557,7 @@ fn refine(p: *Pardes, pk: *Pick, drop: bool) void {
if (drop and (if (pk.marks.items.len > 0) marked(pk, h.cand) != null else h.cand == current)) continue;
const c = pk.names.cands.items[h.cand];
next.add(p.gpa, pk.names.bytes.items[c.start..][0..c.len], c.key, c.key_len, c.base, c.ref) catch break;
+ next.cands.items[next.cands.items.len - 1].group = c.group;
}
} else {
var arena = std.heap.ArenaAllocator.init(p.gpa);
@@ -1308,6 +1609,7 @@ fn back(p: *Pardes, pk: *Pick) void {
if (!fuzzy(pk) and pk.source == .all) filter(p, pk);
return;
}
+ if (pk.walking) |at| return walkOn(p, pk, at, -1);
const keys = pk.keys;
TagState.toRest(p);
if (keys.len == 0) return;
@@ -1318,6 +1620,16 @@ fn back(p: *Pardes, pk: *Pick) void {
s.unrolled = true;
}
+/// Ctrl-o (`delta` < 0) or Ctrl-i in a list a walk reopened at step `at`
+/// of its landing pane's trail (UX L'1): the list rolled up unlanded, the
+/// pane as it was, and the walk on from the list's word; past the last
+/// word, the jump list's step.
+fn walkOn(p: *Pardes, pk: *Pick, at: u8, delta: i32) void {
+ const id = p.paneBySerial(pk.landing) orelse return TagState.toRest(p);
+ TagState.toRest(p);
+ if (!Trail.walkFrom(p, id, at, delta)) pardes.Jump.listBy(p, delta);
+}
+
/// C-q: the rows (the marked, else all, `Query.max_rows` at most) kept as
/// text in a +Search under the asking pane, the source's word and query
/// its first line, each row an address a Look opens.
@@ -1345,7 +1657,7 @@ fn keep(p: *Pardes, pk: *Pick) void {
const row = rowAt(p, pk, arena.allocator(), i) catch break;
switch (row.target) {
.place => |t| if (pk.source == .symbols)
- out.writer.print("{s}:{d} {s}\n", .{ std.Io.Dir.path.basename(t.path), t.at.line, std.mem.trimStart(u8, row.text, " 0123456789") }) catch break
+ out.writer.print("{s}:{d} {s}\n", .{ std.Io.Dir.path.basename(t.path), t.at.line, row.text }) catch break
else
out.writer.print("{s}\n", .{row.text}) catch break,
else => out.writer.print("{s}\n", .{row.text}) catch break,
@@ -1379,6 +1691,9 @@ fn land(p: *Pardes, wanted: How) void {
const a = arena.allocator();
const picked = pickedRows(p, pk, a) catch return;
if (picked.len == 0) return;
+ const walking = pk.walking;
+ touch(p, pk);
+ p.resume_at = 0;
// Walk: the first now, the others queued for C-i.
pk.queue.clearRetainingCapacity();
pk.queue_bytes.clearRetainingCapacity();
@@ -1412,9 +1727,17 @@ fn land(p: *Pardes, wanted: How) void {
_ = p.store.reopen(p, serial, from);
},
.place => |at| if (k == 0 and (how == .walk or how == .queue)) {
+ // A list a walk reopened lands as its word's (UX L'1): a step
+ // from that word, the steps after it dropped.
+ const word: ?u8 = if (walking) |i| (if (from == landing and isWord(p.panes[from].?, i, pk.id)) i else null) else null;
+ if (word) |i| {
+ const trail = &p.panes[from].?.trail;
+ trail.n = i + 1;
+ trail.cur = i;
+ }
switch (look.open(p, from, at.path, at.at, .replace)) {
.none => {},
- else => listed(p, pk),
+ else => listed(p, pk, word),
}
} else if (k == 0 and how == .column) {
// A column made only where there is no free space (UX J1).
@@ -1429,6 +1752,9 @@ fn land(p: *Pardes, wanted: How) void {
_ = look.open(p, from, at.path, at.at, .below);
},
};
+ if (picked[0] == .place) if (p.panes[v.active]) |at| if (at.file) |f| {
+ _ = pk.landed.print(config.pane_addr ++ "{d} › {s}:{d}", .{ at.serial, std.Io.Dir.path.basename(f.path), at.body.cur_row + 1 });
+ };
if (how == .queue and pk.queue.items.len > 0) {
var said: Kind.Buf(64) = .{};
p.setMessage(.at(v.active), said.print("Walk: {d} more places here, C-i for the next", .{pk.queue.items.len}));
@@ -1452,11 +1778,25 @@ fn wordOf(p: *const Pardes, pk: *const Pick, buf: *Kind.Buf(Trail.max_text)) []c
return buf.slice();
}
+/// Whether step `i` of pane `pane`'s trail is picker `id`'s word.
+fn isWord(pane: *const Pane, i: u8, id: u32) bool {
+ const t = &pane.trail;
+ return i < t.n and t.steps[i] == .list and t.steps[i].list.index == id;
+}
+
/// The list rolled into the trail of the reading pane it landed in, its
-/// word before the place: the list `n` and `N` walk there.
-fn listed(p: *Pardes, pk: *const Pick) void {
- const pane = p.panes[p.view().active] orelse return;
+/// word before the place: the list `n` and `N` walk there; a list a walk
+/// reopened at step `at` says where it is now in that word. The notice row
+/// says what Ctrl-o goes back to (UX L'1).
+fn listed(p: *Pardes, pk: *const Pick, at: ?u8) void {
+ const id = p.view().active;
+ const pane = p.panes[id] orelse return;
if (!Trail.reading(p, pane)) return;
+ defer Trail.sayBack(p, id);
+ if (at) |i| if (isWord(pane, i, pk.id)) {
+ _ = wordOf(p, pk, &pane.trail.steps[i].list.text);
+ return;
+ };
var w: Trail.Word = .{ .index = pk.id };
_ = wordOf(p, pk, &w.text);
Trail.through(&pane.trail, .{ .list = w });
@@ -1502,16 +1842,20 @@ pub fn walkList(p: *Pardes, id: usize, forward: bool) bool {
return true;
}
-/// Look on a list word in pane `id`'s trail (SPEC §6.3): the list unrolled
-/// again in that pane's tag, its rows, marks, cursor and query as they were.
-pub fn reopen(p: *Pardes, id: usize, index: u32) void {
+/// Look on a list word in pane `id`'s trail (SPEC §6.3), or a walk onto
+/// it at step `walking` (UX L'1): the list unrolled again in that pane's
+/// tag, its rows, marks, cursor and query as they were.
+pub fn reopen(p: *Pardes, id: usize, index: u32, walking: ?u8) void {
const pk = byId(p, index) orelse return p.setMessage(.at(id), "walk: that list is gone: the last 8 are kept");
const pane = p.panes[id] orelse return;
TagState.toRest(p);
+ p.resume_at = 0;
+ touch(p, pk);
pk.landing = pane.serial;
pk.made = false;
unroll(p, pk, pk.query.slice());
unrollRows(p, pk);
+ pk.walking = walking;
}
/// A list unrolled again: All's places found again, the cursor where it was.
@@ -1530,27 +1874,57 @@ pub fn rerun(p: *Pardes, id: usize, index: u32) void {
open(p, id, pk.source, pk.word.slice(), query.slice(), pk.rows);
}
-/// Resume (`SPC '`): the last picker reopened as it was, from pane `from`,
-/// in the tag of the pane its Enter lands in.
+/// Resume (`SPC '`): the newest kept picker reopened as it was, from pane
+/// `from`, in the tag of the pane its Enter lands in; again after an Esc
+/// from it, nothing typed between, the one before it (UX L'2).
pub fn resumeFrom(p: *Pardes, from: usize) void {
- var newest: ?*Pick = null;
- for (p.picks) |slot| if (slot) |pk| if (newest == null or pk.id > newest.?.id) {
- newest = pk;
- };
- const pk = newest orelse return p.setMessage(.at(from), "Resume: no picker yet");
- TagState.toRest(p);
+ if (p.resume_at == 0 and nkept(p) == 0) return p.setMessage(.at(from), "Resume: no picker yet");
if (p.panes[from] == null) return;
+ resumeAt(p, from, p.resume_at + 1);
+}
+
+/// The `k`th newest kept picker reopened as it was, asked from pane
+/// `from`, in the tag of the pane its Enter lands in.
+fn resumeAt(p: *Pardes, from: usize, k: usize) void {
+ const pk = (if (k > 0) nth(p, k) else null) orelse
+ return p.setMessage(.at(from), if (k == 0) "Resume: the newest picker" else "Resume: no picker before it: the last 8 are kept");
+ TagState.toRest(p);
hostIn(p, pk, from) catch |err| return p.reportError(.at(from), "Resume", err);
unroll(p, pk, pk.query.slice());
unrollRows(p, pk);
+ p.resume_at = @intCast(k);
+}
+
+/// A key the tag at rest takes (keys.handleKey): any but the leader and
+/// Resume's after it ends a Resume walk, so that `SPC '` opens the newest
+/// again (UX L'2).
+pub fn keyAtRest(p: *Pardes, k: Key) void {
+ const v = p.view();
+ if (p.resume_at == 0) return;
+ if (v.prefix == .none and pardes.hit(k, config.leader)) return;
+ if (v.prefix == .leader and v.leader_n == 0 and !k.ctrl and !k.alt and k.cp == config.leader_path.get(.Resume).?[0]) return;
+ p.resume_at = 0;
}
/// B3 on a picker's row (mouse.zig bandPress): Enter on it.
pub fn landHere(p: *Pardes) void {
const pk = live(p) orelse return;
+ if (pk.source == .lists) return reopenListed(p, pk);
if (pk.spine == .rows) land(p, .walk);
}
+/// Enter in Lists (UX L'3): the kept picker under its cursor unrolled again
+/// as it was left, where Lists was asked from, and the newest now.
+fn reopenListed(p: *Pardes, pk: *Pick) void {
+ const kp = byId(p, @intCast(refAt(p, pk) orelse return)) orelse return;
+ const from = p.paneBySerial(pk.owner) orelse p.view().active;
+ TagState.toRest(p);
+ touch(p, kp);
+ hostIn(p, kp, from) catch |err| return p.reportError(.at(from), "Lists", err);
+ unroll(p, kp, kp.query.slice());
+ unrollRows(p, kp);
+}
+
/// The rows an act or Enter takes: the marked, else the current.
fn pickedRows(p: *Pardes, pk: *const Pick, a: std.mem.Allocator) ![]Target {
const s = &p.view().tag_state;
@@ -1749,6 +2123,8 @@ fn editRows(p: *Pardes, pk: *Pick) void {
/// picker's.
pub fn execWord(p: *Pardes, txt: []const u8) bool {
const pk = live(p) orelse return false;
+ // Lists offers no acts and no sources (UX L'3).
+ if (pk.source == .lists) return false;
const word = std.mem.trim(u8, txt, " \t\n");
for (spine_rows) |src| if (std.mem.eql(u8, word, src.word)) {
switchTo(p, pk, src.source);
@@ -1766,6 +2142,9 @@ pub fn execWord(p: *Pardes, txt: []const u8) bool {
}
fn testFile(p: *Pardes, tmp: *std.testing.TmpDir, name: []const u8, text: []const u8) ![]u8 {
+ // The directory a work tree of its own, as a project is: Find and Grep
+ // search it, not the tree the test runs in.
+ tmp.dir.createDir(std.testing.io, ".git", .default_dir) catch |err| if (err != error.PathAlreadyExists) return err;
try tmp.dir.writeFile(std.testing.io, .{ .sub_path = name, .data = text });
var base_buf: [std.Io.Dir.max_path_bytes]u8 = undefined;
const dir = base_buf[0..try tmp.dir.realPath(std.testing.io, &base_buf)];
@@ -2352,15 +2731,15 @@ test "code actions: a picker in the asking pane's tag, the one under the cursor
const r = p.view().rects[id];
const x = r.x + config.GUTTER + File.gutterWidth(pane);
const y = p.bodyTop(pane, r);
- const grounds = colors.Grounds.of(p.theme());
+ const chrome = p.chrome();
for ([_][]const u8{ "o", "t", "t", "t" }, [_][]const u8{ "n", "w", "w", "h" }, 0..) |c0, c1, row| {
try std.testing.expectEqualStrings(c0, shot.at(x, y + @as(u16, @intCast(row))).grapheme());
try std.testing.expectEqualStrings(c1, shot.at(x + 1, y + @as(u16, @intCast(row))).grapheme());
}
try std.testing.expectEqualStrings("a", shot.at(x + 4, y + 1).grapheme());
try std.testing.expectEqualStrings("s", shot.at(x + 4, y + 2).grapheme());
- try std.testing.expectEqual(pardes.Color{ .rgb = grounds.del.row }, shot.at(x, y + 1).style.bg);
- try std.testing.expectEqual(pardes.Color{ .rgb = grounds.add.row }, shot.at(x, y + 2).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = chrome.del.row }, shot.at(x, y + 1).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = chrome.add.row }, shot.at(x, y + 2).style.bg);
try std.testing.expectEqualStrings("one\ntwo add\nthree\n", pane.file.?.content);
// An action lands nowhere: no landing line, no `▸` before the line it
// changes, no sentence of where Enter lands (UX D7's are a jump's; an
@@ -2377,10 +2756,10 @@ test "code actions: a picker in the asking pane's tag, the one under the cursor
frame = std.heap.ArenaAllocator.init(std.testing.allocator);
shot = try p.render(frame.allocator());
try std.testing.expectEqualStrings("/", shot.at(x, y).grapheme());
- try std.testing.expectEqual(pardes.Color{ .rgb = grounds.add.row }, shot.at(x, y).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = chrome.add.row }, shot.at(x, y).style.bg);
try std.testing.expectEqualStrings("o", shot.at(x, y + 1).grapheme());
- try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = grounds.del.row }, shot.at(x, y + 1).style.bg));
- try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = p.chromeTheme().roles.hit }, shot.at(x, y + 1).style.bg));
+ try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = chrome.del.row }, shot.at(x, y + 1).style.bg));
+ try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = p.chrome().hit }, shot.at(x, y + 1).style.bg));
// `3`: the rename applied, the tag at rest; one undo takes it back.
p.update(.{ .key = .{ .cp = '3', .text = "3" } });
try std.testing.expectEqual(TagState.Kind.rest, s.kind);
@@ -2487,16 +2866,16 @@ test "a picker's preview is legible as one (UX D7): its landing line on the hit
};
try std.testing.expectEqual(@as(?u16, @intCast((pane.rows + 2) / 3)), at);
const y = body_y + at.?;
- const roles = &p.chromeTheme().roles;
+ const c = p.chrome();
const tx = r.x + pardes.config.GUTTER;
const gutter = File.gutterWidth(pane);
// Its text on the hit ground across the row; the row above as it was.
- for (gutter..r.w - pardes.config.GUTTER) |x| try std.testing.expectEqual(pardes.Color{ .rgb = roles.hit }, s.at(tx + @as(u16, @intCast(x)), y).style.bg);
- try std.testing.expect(!std.meta.eql(s.at(tx + gutter + 2, y - 1).style.bg, pardes.Color{ .rgb = roles.hit }));
+ for (gutter..r.w - pardes.config.GUTTER) |x| try std.testing.expectEqual(pardes.Color{ .rgb = c.hit }, s.at(tx + @as(u16, @intCast(x)), y).style.bg);
+ try std.testing.expect(!std.meta.eql(s.at(tx + gutter + 2, y - 1).style.bg, pardes.Color{ .rgb = c.hit }));
// `▸` in the key ink in the gutter's cell after the number.
const mark = s.at(tx + gutter - 1, y);
try std.testing.expectEqualStrings("▸", mark.grapheme());
- try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, mark.style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.key }, mark.style.fg);
// The notice row: where Enter lands, the owner's address a word in it.
var buf: [pardes.Messages.notice_row_cap]u8 = undefined;
const said = pardes.Messages.noticeRow(p, 120, &buf);
@@ -2815,3 +3194,510 @@ test "a picker's preview starts under its band: its landing line ⌈visible/3⌉
try std.testing.expectEqual(rest, .{ pane.tag_rows, pane.rows, pane.file.?.scroll, p.bodyTop(pane, r) });
try std.testing.expect(std.mem.startsWith(u8, pane.file.?.content, "own 1\n"));
}
+
+test "SPC ' steps back through the kept pickers (UX L'2): again after an Esc, nothing typed between, the one before; Ctrl-o and Ctrl-i in it the next older and newer, its head `Resume 2/3`; a key between, the newest again; a list word naming a picker no longer kept says so and the walk passes it by" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const a_path = try testFile(p, &tmp, "alpha.zig", "one\ntwo\n");
+ defer p.gpa.free(a_path);
+ const b_path = try testFile(p, &tmp, "base.zig", "text\n");
+ const base = try p.setTestFile("text\n");
+ p.gpa.free(base.file.?.path);
+ base.file.?.path = b_path;
+ const id = p.view().active;
+ const row = try std.fmt.allocPrint(p.gpa, "{s}:2:1 two\n", .{a_path});
+ defer p.gpa.free(row);
+ // Three lists kept, C the newest.
+ for ([_][]const u8{ "A", "B", "C" }) |word| {
+ open(p, id, .list, word, "", row);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ }
+ try std.testing.expect(live(p) == null);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const Shown = struct {
+ /// The live picker's word and its head's `Resume k/N`, as `2/3 B`.
+ fn of(pp: *Pardes, a: std.mem.Allocator) ![]const u8 {
+ const pk = live(pp) orelse return "none";
+ const h = (try head(pp, a, pp.panes[pp.paneBySerial(pk.landing).?].?)).?;
+ const at = std.mem.indexOf(u8, h.text, "Resume ") orelse return pk.word.slice();
+ const end = std.mem.indexOfScalarPos(u8, h.text, at + "Resume ".len, ' ').?;
+ return std.fmt.allocPrint(a, "{s} {s}", .{ h.text[at + "Resume ".len .. end], pk.word.slice() });
+ }
+ };
+ const Step = struct { keys: []const u8, want: []const u8 };
+ for ([_]Step{
+ .{ .keys = " '", .want = "1/3 C" },
+ .{ .keys = "\x1b '", .want = "2/3 B" },
+ .{ .keys = "o", .want = "3/3 A" },
+ .{ .keys = "o", .want = "3/3 A" },
+ .{ .keys = "i", .want = "2/3 B" },
+ .{ .keys = "i", .want = "1/3 C" },
+ .{ .keys = "\x1bj '", .want = "1/3 C" },
+ .{ .keys = "\x1b '", .want = "2/3 B" },
+ }, 0..) |step, n| {
+ for (step.keys) |c| switch (c) {
+ 0x1b => p.update(.{ .key = .{ .cp = Key.escape } }),
+ // Ctrl-o and Ctrl-i alone in a step: in the picker.
+ 'o', 'i' => p.update(.{ .key = .{ .cp = c, .ctrl = true } }),
+ else => p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } }),
+ };
+ errdefer std.debug.print("step {d}\n", .{n});
+ try std.testing.expectEqualStrings(step.want, try Shown.of(p, frame.allocator()));
+ if (n == 3) try std.testing.expect(std.mem.indexOf(u8, p.messages.headline().?.words(), "no picker before it") != null);
+ }
+ // Its Enter lands as any list's: the walk over, it the newest.
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ p.sync();
+ p.update(.{ .key = .{ .cp = ' ', .text = " " } });
+ p.update(.{ .key = .{ .cp = '\'', .text = "'" } });
+ try std.testing.expectEqualStrings("1/3 B", try Shown.of(p, frame.allocator()));
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // A list word naming a picker no longer kept: said, and passed by.
+ const reader = p.view().active;
+ const t = &p.panes[reader].?.trail;
+ try std.testing.expect(t.n == 3 and t.cur == 2 and t.steps[1] == .list);
+ t.steps[1].list.index = 999_999;
+ p.update(.{ .key = .{ .cp = 'o', .ctrl = true } });
+ p.sync();
+ try std.testing.expect(std.mem.indexOf(u8, p.messages.headline().?.words(), "that list is gone: the last 8 are kept") != null);
+ try std.testing.expect(live(p) == null);
+ try std.testing.expectEqualStrings("base.zig", std.Io.Dir.path.basename(p.panes[p.view().active].?.file.?.path));
+ try std.testing.expectEqual(@as(u8, 0), p.panes[p.view().active].?.trail.cur);
+}
+
+test "Lists (UX L'3): a picker of the kept pickers, newest first, each its list word and where it last landed; the body previews the one under the cursor at its current row, its rows beside, its cursor's marked; Enter reopens it as it was left, the newest now; Lists is never kept and drops none of the eight for its room" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const a_path = try testFile(p, &tmp, "alpha.zig", "one\ntwo\n");
+ defer p.gpa.free(a_path);
+ const b_path = try testFile(p, &tmp, "beta.zig", "b1\nb2\n");
+ defer p.gpa.free(b_path);
+ const base = try p.setTestFile("text\n");
+ p.gpa.free(base.file.?.path);
+ base.file.?.path = try testFile(p, &tmp, "base.zig", "text\n");
+ const rows = try std.fmt.allocPrint(p.gpa, "{s}:2:1 two\n{s}:2:1 b2\n", .{ a_path, b_path });
+ defer p.gpa.free(rows);
+ // Eight kept: A to F, G left on its second row, H landed, the newest.
+ for ("ABCDEFG") |c| {
+ open(p, p.view().active, .list, &[_]u8{c}, "", rows);
+ if (c == 'G') p.update(.{ .key = .{ .cp = Key.down } });
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ }
+ open(p, p.view().active, .list, "H", "", rows);
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ p.sync();
+ const at = p.view().active;
+ var ids: [max_lists]u32 = undefined;
+ for (&ids, 1..) |*id, k| id.* = nth(p, max_lists + 1 - k).?.id;
+ exec.runBuiltin(p, .Lists, at, "", null);
+ const lists = live(p).?;
+ try std.testing.expectEqual(Source.lists, lists.source);
+ // None dropped for it, and it is none of the kept.
+ try std.testing.expectEqual(@as(usize, max_lists), nkept(p));
+ for (ids) |id| try std.testing.expect(byId(p, id) != null);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ try std.testing.expectEqual(@as(usize, max_lists), count(p, lists));
+ var buf: [64]u8 = undefined;
+ for ("HGFEDCBA", 0..) |c, i| {
+ const row = try rowAt(p, lists, a, i);
+ try std.testing.expectEqualStrings(try std.fmt.bufPrint(&buf, "{c} {d}/2", .{ c, @as(u8, if (c == 'G') 2 else 1) }), row.text);
+ if (c == 'H') try std.testing.expectEqualStrings(try std.fmt.bufPrint(&buf, "@p{d} › alpha.zig:2", .{p.panes[at].?.serial}), row.meta);
+ }
+ // On G: the body previews its current row, beta.zig's line 2; its rows
+ // beside, its cursor's marked.
+ p.update(.{ .key = .{ .cp = Key.down } });
+ settle(p);
+ const host = p.panes[p.paneBySerial(lists.landing).?].?;
+ try std.testing.expectEqualStrings(b_path, host.file.?.path);
+ try std.testing.expectEqual(@as(i32, 1), host.body.cur_row);
+ const band = try steps(p, a);
+ try std.testing.expect(band.len == 2 and band[1].doc and band[1].rows.len == 2);
+ try std.testing.expect(std.mem.startsWith(u8, band[1].rows[1].text, "▶ ") and std.mem.startsWith(u8, band[1].rows[0].text, " "));
+ // Enter: G as it was left, the newest now; Lists rolled up.
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ const g = live(p).?;
+ try std.testing.expectEqualStrings("G", g.word.slice());
+ try std.testing.expectEqual(@as(u16, 1), p.view().tag_state.rows.at);
+ try std.testing.expect(nth(p, 1).? == g);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // A ninth picker drops the oldest kept, never for Lists' room.
+ open(p, p.view().active, .list, "I", "", rows);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(@as(usize, max_lists), nkept(p));
+ try std.testing.expect(byId(p, ids[0]) == null and byId(p, ids[1]) != null);
+ // `'` among a picker's sources (M-h): Lists, from where it was asked.
+ open(p, p.view().active, .list, "J", "", rows);
+ p.update(.{ .key = .{ .cp = 'h', .alt = true } });
+ p.update(.{ .key = .{ .cp = '\'', .text = "'" } });
+ try std.testing.expectEqual(Source.lists, live(p).?.source);
+ try std.testing.expectEqualStrings("J 1/2", (try rowAt(p, live(p).?, a, 0)).text);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+}
+
+test "Ctrl-r in a picker unrolls its source's earlier queries (UX L2's last line): recorded as a picker lands and as it is left with its field typed; the band's rows filtered by the field, Enter puts one in the field, Esc closes the band; each source its own; Lists none; as many as a prompt's history keeps" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ p.stream.engine = .walk;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ const w_path = try testFile(p, &tmp, "words.zig", "in_word\n");
+ defer p.gpa.free(w_path);
+ const base = try p.setTestFile("text\n");
+ p.gpa.free(base.file.?.path);
+ base.file.?.path = try testFile(p, &tmp, "main.zig", "text\n");
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const History = struct {
+ /// The history band's rows, joined by `|`; "" with none shown.
+ fn rows(pp: *Pardes, a: std.mem.Allocator) ![]const u8 {
+ const band = try steps(pp, a);
+ if (band.len < 2) return "";
+ var out: std.ArrayList(u8) = .empty;
+ for (band[1].rows, 0..) |row, i| try out.print(a, "{s}{s}", .{ if (i > 0) "|" else "", row.text });
+ return out.items;
+ }
+ };
+ const ctrl_r: Key = .{ .cp = 'r', .ctrl = true };
+ const Type = struct {
+ fn keys(pp: *Pardes, text: []const u8) void {
+ for (text) |c| pp.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ }
+ };
+ // SPC f f words, Enter: `words` is Find's.
+ Type.keys(p, " ffwords");
+ settle(p);
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ p.sync();
+ try std.testing.expect(live(p) == null);
+ // A Grep left with its field typed: `in_w` is Grep's.
+ Type.keys(p, " fgin_w");
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // SPC f f, Ctrl-r: Find's alone.
+ Type.keys(p, " ff");
+ p.update(.{ .key = ctrl_r });
+ try std.testing.expectEqualStrings("words", try History.rows(p, frame.allocator()));
+ // Esc closes the band, back to the picker; Ctrl-r again, Enter: the
+ // line in the field, the rows filtered by it.
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expect(live(p) != null);
+ try std.testing.expectEqualStrings("", try History.rows(p, frame.allocator()));
+ p.update(.{ .key = ctrl_r });
+ p.update(.{ .key = .{ .cp = Key.enter } });
+ try std.testing.expect(live(p) != null);
+ try std.testing.expectEqualStrings("words", p.view().tag_state.field.text());
+ try std.testing.expectEqualStrings("", try History.rows(p, frame.allocator()));
+ settle(p);
+ try std.testing.expectEqual(@as(usize, 1), count(p, live(p).?));
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // Grep's: its own line.
+ Type.keys(p, " fg");
+ p.update(.{ .key = ctrl_r });
+ try std.testing.expectEqualStrings("in_w", try History.rows(p, frame.allocator()));
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // Lists keeps none: left with its field typed, nothing recorded.
+ Type.keys(p, " flzz");
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ try std.testing.expectEqual(@as(u8, 0), p.prompt_history.pick.get(.lists).n);
+ // The bound: a prompt's history's, the oldest gone, newest first; the
+ // rows filtered by the field.
+ for (0..pardes.Prompt.Ring.max + 1) |i| {
+ Type.keys(p, " ff");
+ var q: [8]u8 = undefined;
+ Type.keys(p, try std.fmt.bufPrint(&q, "q{d}", .{i}));
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ }
+ const find = p.prompt_history.pick.get(.find);
+ try std.testing.expectEqual(@as(u8, pardes.Prompt.Ring.max), find.n);
+ try std.testing.expectEqualStrings("q16", find.get(1).?);
+ try std.testing.expectEqualStrings("q1", find.get(pardes.Prompt.Ring.max).?);
+ Type.keys(p, " ffq1");
+ p.update(.{ .key = ctrl_r });
+ const shown = try History.rows(p, frame.allocator());
+ try std.testing.expect(std.mem.startsWith(u8, shown, "q16|q15|q14|q13|q12|q11|q10|q1"));
+ try std.testing.expect(std.mem.indexOf(u8, shown, "words") == null);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ p.update(.{ .key = .{ .cp = Key.escape } });
+}
+
+/// A Symbols picker opened from a file pane whose path is `name` and text
+/// `text`, its symbols parsed (small: here and now), and the pane.
+fn openSymbols(p: *Pardes, name: []const u8, text: []const u8) !*Pane {
+ const pane = try p.setTestFile(text);
+ p.gpa.free(pane.file.?.path);
+ pane.file.?.path = try p.gpa.dupe(u8, name);
+ open(p, p.view().active, .symbols, "", "", "");
+ settle(p);
+ return pane;
+}
+
+/// The live picker's rows, `meta text` a line each.
+fn rowLines(p: *Pardes, a: std.mem.Allocator) ![]const u8 {
+ const pk = live(p).?;
+ var out: std.ArrayList(u8) = .empty;
+ for (0..count(p, pk)) |i| {
+ const r = try rowAt(p, pk, a, i);
+ try out.print(a, "{s: >2} {s}\n", .{ r.meta, r.text });
+ }
+ return out.items;
+}
+
+const counts_zig =
+ \\const std = @import("std");
+ \\pub const Counts = struct {
+ \\ lines: usize = 0,
+ \\ words: usize = 0,
+ \\ pub const zero: Counts = .{};
+ \\ pub fn add(c: *Counts, text: []const u8) void {
+ \\ const local = text.len;
+ \\ c.lines += local;
+ \\ }
+ \\};
+ \\const Mode = enum { fast, slow };
+ \\var hits: u32 = 0;
+ \\pub fn count(text: []const u8) Counts {
+ \\ return .{ .lines = text.len };
+ \\}
+ \\test "count.add" {}
+ \\
+;
+
+test "Symbols (UX DESIGN N): a Zig file's rows types, functions, fields, then the rest, each in the text's order with the field empty; a row its kind's mark, its name qualified, what its first line says after it, its line the meta; the mark in the keyword's ink, the qualifier and the rest dim" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ _ = try openSymbols(p, "/w6/counts.zig", counts_zig);
+ try std.testing.expectEqualStrings(
+ \\ 2 t Counts = struct
+ \\11 t Mode = enum { fast, slow }
+ \\ 6 f Counts.add (c: *Counts, text: []const u8) void
+ \\13 f count (text: []const u8) Counts
+ \\ 3 m Counts.lines : usize = 0
+ \\ 4 m Counts.words : usize = 0
+ \\11 m Mode.fast
+ \\11 m Mode.slow
+ \\ 1 n std = @import("std")
+ \\ 5 c Counts.zero : Counts = .{}
+ \\12 v hits : u32 = 0
+ \\16 · "count.add"
+ \\
+ , try rowLines(p, a));
+ // The qualifier dim, `Counts.`; a name holding a `.` none of it.
+ try std.testing.expectEqual(@as(u16, "Counts.".len), (try rowAt(p, live(p).?, a, 4)).faint);
+ try std.testing.expectEqual(@as(u16, 0), (try rowAt(p, live(p).?, a, 11)).faint);
+ // Drawn: `m Counts.lines : usize = 0` (not the cursor's row).
+ const pane = p.panes[p.paneBySerial(live(p).?.landing).?].?;
+ _ = try p.render(a);
+ const layer = &p.surface.tag_layers[pardes.BAND_LAYER];
+ const roles = &p.chromeTheme().roles;
+ const inks = roles.on(if (Trail.reading(p, pane)) .reading_focused else .focused);
+ var found = false;
+ for (0..layer.rows) |y| {
+ const cells = layer.cells[y * layer.cols ..][0..layer.cols];
+ var text: std.ArrayList(u8) = .empty;
+ var at: std.ArrayList(usize) = .empty;
+ for (cells, 0..) |c, x| {
+ try at.append(a, text.items.len);
+ try text.appendSlice(a, c.grapheme());
+ _ = x;
+ }
+ const from = std.mem.indexOf(u8, text.items, "m Counts.lines") orelse continue;
+ var x: usize = 0;
+ while (at.items[x] < from) x += 1;
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().on(.focus).kind }, cells[x].style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, cells[x + 2].style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = inks.text }, cells[x + 9].style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, cells[x + 16].style.fg);
+ // Its line at the row's right end, dim.
+ const three = std.mem.lastIndexOfScalar(u8, text.items, '3').?;
+ var m: usize = 0;
+ while (at.items[m] < three) m += 1;
+ try std.testing.expect(m > x + 30);
+ try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, cells[m].style.fg);
+ found = true;
+ }
+ try std.testing.expect(found);
+}
+
+test "Symbols (UX DESIGN N3): typed, the rows stay grouped, scored within each group, and the cursor starts on the best match wherever its group puts it; the name alone is matched, never the signature" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ const pane = try openSymbols(p, "/w6/counts.zig", counts_zig);
+ for ("count") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ settle(p);
+ const rows = try rowLines(p, a);
+ try std.testing.expect(std.mem.startsWith(u8, rows,
+ \\ 2 t Counts = struct
+ \\13 f count (text: []const u8) Counts
+ \\ 6 f Counts.add (c: *Counts, text: []const u8) void
+ \\ 3 m Counts.lines : usize = 0
+ \\ 4 m Counts.words : usize = 0
+ \\
+ ));
+ // `count` matched best: the cursor on it, not on the first row, and
+ // the count says where it is.
+ const s = &p.view().tag_state;
+ try std.testing.expectEqual(@as(u16, 1), s.rows.at);
+ const h = (try head(p, a, p.panes[p.paneBySerial(live(p).?.landing).?].?)).?;
+ try std.testing.expect(std.mem.indexOf(u8, h.text, "2/7") != null);
+ // Enter lands on its line.
+ _ = pane;
+ // `u8` is in signatures only: nothing matches.
+ for (0..5) |_| p.update(.{ .key = .{ .cp = pardes.Key.backspace } });
+ for ("u8") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ settle(p);
+ try std.testing.expectEqual(@as(usize, 0), count(p, live(p).?));
+}
+
+test "Symbols (UX DESIGN N): a C++ file's rows by its kind table, members named in their class and namespace, a function's locals none" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ _ = try openSymbols(p, "/w6/parser.cc",
+ \\#define LIMIT 4
+ \\namespace torque {
+ \\class Parser : public Base {
+ \\ public:
+ \\ Parser();
+ \\ int Parse(int depth) const { return depth; }
+ \\ int depth_;
+ \\};
+ \\enum class Kind { kA, kB };
+ \\int Parser::Run(int n) { int local = n; return local; }
+ \\static int counter = 0;
+ \\const int limit = 4;
+ \\using Alias = int;
+ \\}
+ \\
+ );
+ try std.testing.expectEqualStrings(
+ \\ 3 t torque.Parser : public Base
+ \\ 9 t torque.Kind
+ \\13 t torque.Alias = int
+ \\ 5 f torque.Parser.Parser ()
+ \\ 6 f torque.Parser.Parse (int depth) const
+ \\10 f torque.Parser::Run (int n)
+ \\ 7 m torque.Parser.depth_
+ \\ 9 m torque.Kind.kA
+ \\ 9 m torque.Kind.kB
+ \\ 1 · LIMIT 4
+ \\ 2 n torque
+ \\11 v torque.counter = 0
+ \\12 c torque.limit = 4
+ \\
+ , try rowLines(p, frame.allocator()));
+}
+
+test "Symbols: every row is ordinary text: no header rows, the cursor steps onto each in turn, the band shows each row's text, and C-q keeps them in a +Search with the mark a word" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 140, .rows = 50 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ _ = try openSymbols(p, "/w6/counts.zig", counts_zig);
+ const pk = live(p).?;
+ const n = count(p, pk);
+ try std.testing.expectEqual(@as(usize, 12), n);
+ const s = &p.view().tag_state;
+ for (0..n) |i| {
+ try std.testing.expectEqual(@as(u16, @intCast(i)), s.rows.at);
+ const r = try rowAt(p, pk, a, i);
+ const host = p.paneBySerial(pk.landing).?;
+ const band = (try Band.of(p, a, p.panes[host].?, host)).?;
+ var shown = false;
+ for (0..band.height) |y| {
+ const ln = try band.line(a, p.settings.tab, @intCast(y));
+ shown = shown or std.mem.indexOf(u8, ln.text, r.text) != null;
+ }
+ try std.testing.expect(shown);
+ p.update(.{ .key = .{ .cp = pardes.Key.down } });
+ }
+ p.update(.{ .key = .{ .cp = 'q', .ctrl = true } });
+ var kept: ?[]const u8 = null;
+ for (p.panes) |slot| if (slot) |tp| if (tp.file) |f| if (std.mem.startsWith(u8, f.content, "Symbols ")) {
+ kept = f.content;
+ };
+ try std.testing.expect(std.mem.indexOf(u8, kept.?, "\ncounts.zig:3 m Counts.lines : usize = 0\n") != null);
+ try std.testing.expect(std.mem.indexOf(u8, kept.?, "\ncounts.zig:2 t Counts = struct\n") != null);
+}
+
+test "Find and Grep search the work tree (W8): from a pane deep in a repo Find lists the files from its root and `sub/name` narrows it, a leading directory narrows Grep, and outside a repo they search the pane's directory" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 30 });
+ defer p.deinit();
+ p.settings.jumps = .walk;
+ p.stream.engine = .walk;
+ var tmp = std.testing.tmpDir(.{});
+ defer tmp.cleanup();
+ for ([_][]const u8{ "src/deep", "sub", "other" }) |d| try tmp.dir.createDirPath(std.testing.io, d);
+ const deep = try testFile(p, &tmp, "src/deep/x.txt", "deep\n");
+ defer p.gpa.free(deep);
+ for ([_][2][]const u8{ .{ "sub/name.txt", "needle one\n" }, .{ "other/name.txt", "needle two\n" } }) |f| p.gpa.free(try testFile(p, &tmp, f[0], f[1]));
+ const root = std.Io.Dir.path.dirname(std.Io.Dir.path.dirname(std.Io.Dir.path.dirname(deep).?).?).?;
+ _ = try p.setTestFile("held\n");
+ const asker = p.view().active;
+ Trail.keep(p.panes[asker].?);
+ p.gpa.free(p.panes[asker].?.file.?.path);
+ p.panes[asker].?.file.?.path = try p.gpa.dupe(u8, deep);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const a = frame.allocator();
+ // Find from src/deep: the root's files, by their paths from it.
+ open(p, asker, .find, "", "", "");
+ var pk = live(p).?;
+ try std.testing.expectEqualStrings(root, pk.dir.slice());
+ settle(p);
+ try std.testing.expectEqual(@as(usize, 3), count(p, pk));
+ for ("sub/name") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ settle(p);
+ try std.testing.expectEqual(@as(usize, 1), count(p, pk));
+ try std.testing.expectEqualStrings("sub/name.txt", (try rowAt(p, pk, a, 0)).text);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // Grep: the whole tree, then `sub needle` in sub/ alone, its row's
+ // path from the root, landing on the file there.
+ open(p, asker, .grep, "", "", "");
+ pk = live(p).?;
+ for ("needle") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ // (Its typing paused: the search starts.)
+ p.clock.now_ns = p.stream.due_ns.?;
+ settle(p);
+ try std.testing.expectEqual(@as(usize, 2), count(p, pk));
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ open(p, asker, .grep, "", "", "");
+ pk = live(p).?;
+ for ("sub needle") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ // (Its typing paused: the search starts.)
+ p.clock.now_ns = p.stream.due_ns.?;
+ settle(p);
+ try std.testing.expectEqual(@as(usize, 1), count(p, pk));
+ const row = try rowAt(p, pk, a, 0);
+ try std.testing.expect(std.mem.startsWith(u8, row.text, "sub/name.txt:1 needle one"));
+ try std.testing.expectEqualStrings(try std.Io.Dir.path.join(a, &.{ root, "sub/name.txt" }), row.target.place.path);
+ p.update(.{ .key = .{ .cp = Key.escape } });
+ // Outside a repo (`/`, the test text's directory, holds no .jj nor
+ // .git): the pane's directory, as before.
+ p.gpa.free(p.panes[asker].?.file.?.path);
+ p.panes[asker].?.file.?.path = try p.gpa.dupe(u8, "/held.txt");
+ open(p, asker, .find, "", "", "");
+ try std.testing.expectEqualStrings("/", live(p).?.dir.slice());
+ p.update(.{ .key = .{ .cp = Key.escape } });
+}
diff --git a/core/Places.zig b/core/Places.zig
index 8563d7c8..b4ef17aa 100644
--- a/core/Places.zig
+++ b/core/Places.zig
@@ -659,19 +659,17 @@ pub fn origin(set: *const Places, pane: *Pane) usize {
}
/// Every place on the rows shown, tinted over the text: the hit ground,
-/// the current one the current hit's (colors.Roles, UX D4, D14).
+/// the current one solid in the hue with the page's ink (R8, UX D14); a
+/// search prompt's pattern that is no regex, its last places dimmed: the
+/// current on the hit ground, the rest faint.
pub fn paint(set: *Places, p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void {
if (!set.shows(pane)) return;
const f = &pane.file.?;
- const th = p.theme();
- const roles = &p.chromeTheme().roles;
- var strong = roles.hit_current;
- var quiet = roles.hit;
- // A search prompt's pattern that is no regex: its last places, dimmed.
- if (pardes.Prompt.dims(p, pane)) {
- strong = quiet;
- quiet = colors.mix(th.bg orelse th.tag_bg, quiet);
- }
+ const c = p.chrome();
+ const dim = pardes.Prompt.dims(p, pane);
+ const strong = if (dim) c.hit else c.hit_current;
+ const strong_ink: ?[3]u8 = if (dim) null else c.hit_current_text;
+ const quiet = if (dim) c.hit_faint else c.hit;
const hits = set.hits.items;
if (hits.len == 0) return;
const nlines = File.nlines(p.gpa, f);
@@ -697,7 +695,7 @@ pub fn paint(set: *Places, p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect,
const b = @min(hits[i].end, le) - ls;
if (b <= a) continue;
const current = set.current != null and set.current.? == i;
- File.paintWordSelection(p, s, pane, r, line, @intCast(a), @intCast(b), if (current) strong else quiet);
+ File.paintWordSelection(p, s, pane, r, line, @intCast(a), @intCast(b), if (current) strong else quiet, if (current) strong_ink else null);
}
}
}
@@ -903,3 +901,42 @@ test "a session's places loaded from its dump find what an edit makes as the ses
b.panes[b.view().active].?.file.?.mtime = a.panes[a.view().active].?.file.?.mtime;
try std.testing.expectEqual(pardes.walk.digest(Pardes, a), pardes.walk.digest(Pardes, b));
}
+
+test "places: each on the hit ground in its text's own ink, the current one solid, the hue its ground and the page its ink (R8, G7), the selection over it; a search whose field is no regex dims them, the rest faint" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
+ defer p.deinit();
+ colors.setThemeIndex(p, colors.themeIndex("orchard").?);
+ const pane = try p.setTestFile("alpha beta\ngamma alpha\nb\nb\nb\nb\nb\nb\nb\nzeta alpha\n");
+ // Landed on the first, the caret then moved off it: the places stay.
+ typeKeys(p, "/alpha");
+ p.update(.{ .key = .{ .cp = pardes.Key.enter } });
+ typeKeys(p, "j");
+ try std.testing.expect(pane.places.shows(pane));
+ try std.testing.expectEqual(@as(?usize, 0), pane.places.current);
+ const c = p.chrome();
+ var frame: std.heap.ArenaAllocator = .init(std.testing.allocator);
+ defer frame.deinit();
+ const r = p.view().rects[0];
+ const x = r.x + pardes.config.GUTTER + File.gutterWidth(pane);
+ const y = p.bodyTop(pane, r);
+ var s = try p.render(frame.allocator());
+ for (0..5) |i| {
+ const current = s.at(x + @as(u16, @intCast(i)), y).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_current }, current.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_current_text }, current.fg);
+ const other = s.at(x + 6 + @as(u16, @intCast(i)), y + 1).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit }, other.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.text }, other.fg);
+ }
+ // Searched again from line 2: its place current and selected, drawn as
+ // the place (body_layer: one meaning, one look); then `(`, no regex: the
+ // others faint (line 10's: the prompt's words lie over the top rows).
+ typeKeys(p, "/alpha");
+ try std.testing.expectEqual(@as(?usize, 1), pane.places.current);
+ s = try p.render(frame.allocator());
+ for (0..4) |i| try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_current }, s.at(x + 6 + @as(u16, @intCast(i)), y + 1).style.bg);
+ typeKeys(p, "(");
+ try std.testing.expect(pardes.Prompt.dims(p, pane));
+ s = try p.render(frame.allocator());
+ for (5..10) |i| try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_faint }, s.at(x + @as(u16, @intCast(i)), y + 9).style.bg);
+}
diff --git a/core/Prompt.zig b/core/Prompt.zig
index c54bb228..49a9645d 100644
--- a/core/Prompt.zig
+++ b/core/Prompt.zig
@@ -78,11 +78,14 @@ refused: bool = false,
/// `:`'s (Command.zig): what its rows are of, and where Tab writes.
command: Command = .{},
-/// The session's prompt histories: the lines Enter took, newest last.
+/// The session's prompt histories: the lines Enter took, newest last; and
+/// each picker source's queries, as its picker landed or was left typed
+/// (Pick.zig, UX L2).
pub const History = struct {
search: Ring = .{},
pipe: Ring = .{},
command: Ring = .{},
+ pick: std.EnumArray(pardes.Pick.Source, Ring) = .initFill(.{}),
};
pub const Ring = struct {
@@ -262,25 +265,9 @@ pub fn key(p: *Pardes, k: Key) void {
// Up and C-p move its cursor to the next line it shows, older or newer,
// the field kept as typed; Enter takes the line under it.
if (s.prompt.history) {
- const down = (plain and k.cp == Key.down) or (ctrl and k.cp == 'n');
- const up = (plain and k.cp == Key.up) or (ctrl and k.cp == 'p');
const r = ring(p, s.prompt.op);
- const at = historyAt(p);
- if (down or up) {
- var newer: u8 = 0;
- var older: u8 = 0;
- var rows: usize = 0;
- var back: u8 = 1;
- while (back <= r.n and rows < Band.Cursor.shown) : (back += 1) {
- if (std.mem.indexOf(u8, r.get(back).?, s.field.text()) == null) continue;
- rows += 1;
- if (back < at) newer = back;
- if (back > at and older == 0) older = back;
- }
- const to = if (down) older else newer;
- if (to != 0) s.prompt.recall = to;
- return;
- }
+ if (historyKey(r, s.field.text(), &s.prompt.recall, k)) return;
+ const at = historyAt(r, s.field.text(), s.prompt.recall);
if (plain and k.cp == Key.enter and at != 0) {
s.field.set(r.get(at).?);
live(p, pane);
@@ -445,8 +432,10 @@ fn land(p: *Pardes, id: usize, pane: *Pane, op: Op, pat: []const u8, bad: bool)
p.registers.put(p.gpa, '/', pat, 0, 1, true) catch |err| return p.reportError(.at(id), "search", err);
p.registers.last_search = '/';
set.provenance = .search;
+ const from = set.origin(pane);
set.forget(p.gpa);
- word(pane, if (op == .search_back) '?' else '/', pat);
+ word(p, pane, if (op == .search_back) '?' else '/', pat, from);
+ Trail.sayBack(p, id);
}
/// Alt-Enter in `/ ?` or `s S K A-K` (SPEC §7.2): the result kept as a
@@ -688,36 +677,44 @@ pub fn execRecipe(p: *Pardes, id: usize) void {
/// Pane `pane`'s search word, `/re/ 3/7`: one a pane, its `index` the
/// length of its `/re/` with bit 16 set after n or N went round an end.
-fn wordOf(pane: *Pane) ?*Trail.Word {
+fn wordOf(pane: *Pane) ?*Trail.Search {
for (pane.trail.steps[0..pane.trail.n]) |*step| if (step.* == .search) return &step.search;
return null;
}
-fn patternOf(w: *const Trail.Word) []const u8 {
+fn patternOf(w: *const Trail.Search) []const u8 {
const end = patternEnd(w);
return if (end < 2) "" else w.text.slice()[1 .. end - 1];
}
/// Where a search word's `/re/` ends: held to its text (a damaged image's
/// says anything).
-fn patternEnd(w: *const Trail.Word) u16 {
+fn patternEnd(w: *const Trail.Search) u16 {
return std.math.clamp(@as(u16, @truncate(w.index)), @min(2, w.text.len), w.text.len);
}
/// Whether the places the pane's body shows are its search word's.
-fn lights(pane: *const Pane, w: *const Trail.Word) bool {
+fn lights(pane: *const Pane, w: *const Trail.Search) bool {
const set = &pane.places;
return set.shows(pane) and set.provenance == .search and !set.literal and std.mem.eql(u8, set.pattern, patternOf(w));
}
/// `pat`, delimited by `delim`, as pane `pane`'s one search word, in place
-/// of the one it had, written for where its places stand.
-fn word(pane: *Pane, delim: u8, pat: []const u8) void {
+/// of the one it had, written for where its places stand, its start the
+/// byte `from` of its text (UX L'1: a walk back onto it puts the caret
+/// there).
+fn word(p: *Pardes, pane: *Pane, delim: u8, pat: []const u8, from: usize) void {
// Its pattern and its place in the trail's room, else none.
if (pat.len + 2 + 32 > Trail.max_text) return;
- var w: Trail.Word = .{};
+ const f = &pane.file.?;
+ var w: Trail.Search = .{};
_ = w.text.print("{c}{s}{c}", .{ delim, pat, delim });
w.index = w.text.len;
+ if (f.path.len <= Trail.max_text) if (File.lineIndex(p.gpa, f)) |index| {
+ const line = Places.lineOf(index, @min(from, f.content.len));
+ w.from = .{ .line = @intCast(line + 1), .col = @intCast(@min(from, f.content.len) - File.lineStart(p.gpa, f, line) + 1) };
+ w.from.path.set(f.path);
+ } else |_| {};
pane.trail.setWord(.{ .search = w });
refresh(pane, false);
}
@@ -796,8 +793,9 @@ pub fn stepped(p: *Pardes, id: usize, forward: bool, before: ?usize) void {
/// `*`: pattern `pat`, the selection's (in `/` already), lights its places
/// in `pane`'s body and is its search word, no prompt asked (SPEC §7.3).
pub fn star(p: *Pardes, pane: *Pane, pat: []const u8) void {
+ const sel = pane.body.primaryRange(pane.file.?.content, 0);
pane.places.search(p, pane, .search, 0, pat, false, null, false);
- word(pane, '/', pat);
+ word(p, pane, '/', pat, @min(sel.anchor, sel.head));
}
/// Look on pane `id`'s search word (SPEC §6.3): its places lit again and
@@ -806,15 +804,25 @@ pub fn lookWord(p: *Pardes, id: usize) void {
const pane = p.panes[id] orelse return;
const w = wordOf(pane) orelse return;
const set = &pane.places;
+ light(p, id);
+ const rest = w.text.slice()[patternEnd(w)..];
+ const n = std.fmt.parseInt(usize, std.mem.trim(u8, rest[0 .. std.mem.indexOfScalar(u8, rest, '/') orelse rest.len], " "), 10) catch return;
+ if (n > 0 and n <= set.hits.items.len) set.goTo(p.settings.tab, pane, n - 1, false);
+}
+
+/// Pane `id`'s search word's places lit again, `/` its pattern, the caret
+/// where it is: a Look on the word, a walk onto it (Trail.walkFrom, the
+/// caret where the search started, UX L'1).
+pub fn light(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ const w = wordOf(pane) orelse return;
+ const set = &pane.places;
const pat = patternOf(w);
p.registers.put(p.gpa, '/', pat, 0, 1, true) catch |err| return p.reportError(.at(id), "search", err);
p.registers.last_search = '/';
set.search(p, pane, .search, 0, pat, false, null, false);
set.fill(p, pane, std.math.maxInt(usize), regexp.Regex.budget);
p.view().active = id;
- const rest = w.text.slice()[patternEnd(w)..];
- const n = std.fmt.parseInt(usize, std.mem.trim(u8, rest[0 .. std.mem.indexOfScalar(u8, rest, '/') orelse rest.len], " "), 10) catch return;
- if (n > 0 and n <= set.hits.items.len) set.goTo(p.settings.tab, pane, n - 1, false);
}
/// Exec on it: searched again from the caret, as its prompt and Enter
@@ -841,7 +849,7 @@ pub fn unlit(p: *const Pardes, pane: *Pane) ?[2]usize {
if (Trail.outOfRest(p, pane)) return null;
const t = &pane.trail;
const whole = pardes.tagline.folded(p, pane).whole;
- for (t.steps[0..t.cur], 0..) |*step, i| if (step.* == .search) {
+ for (t.steps[0..t.backs()], 0..) |*step, i| if (step.* == .search) {
if (lights(pane, &step.search) or t.isFolded(i, whole)) return null;
return t.spanOf(i, whole);
};
@@ -866,7 +874,7 @@ pub fn paintGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h:
const tab = p.settings.tab;
const x = gutterX(pane, r);
const y = p.bodyTop(pane, r);
- const ink = p.chromeTheme().roles.key;
+ const ink = p.chrome().page.key;
const nlines = File.nlines(p.gpa, f);
// `▸` on the current place's line alone: the lines with places are the
// rail's ticks (Places.addTicks), never glyphs of their own (UX D14).
@@ -945,8 +953,8 @@ pub fn ghosts(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r:
if (rows <= first) return;
const w: usize = s.cols;
const old = try arena.dupe(Cell, s.cells[(y0 + first) * w .. (y0 + rows) * w]);
- const grounds = colors.Grounds.of(p.theme());
- const ink = p.theme().fg orelse p.theme().tag_fg;
+ const chrome = p.chrome();
+ const ink = chrome.page.text;
const x0 = r.x + config.GUTTER + File.gutterWidth(pane);
const width = r.w -| (x0 - r.x);
const ranges = live_run.ranges[0..live_run.nranges];
@@ -961,18 +969,18 @@ pub fn ghosts(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r:
// `!`: its output before the selection's first line.
var j = k;
if (how == .insert and opens) while (j < ranges.len and lineAt(index, @min(ranges[j].anchor, ranges[j].head)) == line) : (j += 1) {
- out = ghostRows(s, live_run, j, out, rows, y0, x0, width, grounds.add.row, ink);
+ out = ghostRows(s, live_run, j, out, rows, y0, x0, width, chrome.add.row, ink);
};
if (out >= rows) break;
@memcpy(s.cells[(y0 + out) * w ..][0..w], old[(vr - first) * w ..][0..w]);
j = k;
while (j < ranges.len and lineAt(index, @min(ranges[j].anchor, ranges[j].head)) <= line) : (j += 1) {
- if (how == .replace and outcome(live_run, j) == 0) s.tint(x0, @intCast(y0 + out), width, grounds.del.row, null);
+ if (how == .replace and outcome(live_run, j) == 0) s.tint(x0, @intCast(y0 + out), width, chrome.del.row, null);
}
out += 1;
// `|` and `A-!`: after the selection's last line.
if (how != .insert and closes) while (k < ranges.len and lineAt(index, @max(ranges[k].anchor, ranges[k].head) -| 1) == line) : (k += 1) {
- out = ghostRows(s, live_run, k, out, rows, y0, x0, width, grounds.add.row, ink);
+ out = ghostRows(s, live_run, k, out, rows, y0, x0, width, chrome.add.row, ink);
};
}
// What was pushed past the view leaves blank rows behind it, none.
@@ -1019,7 +1027,7 @@ fn fence(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void
if (snap.len == 0) return;
const x = gutterX(pane, r);
const y = p.bodyTop(pane, r);
- const ink = p.chromeTheme().box;
+ const ink = p.chrome().page.key;
const nlines = File.nlines(p.gpa, f);
const op = p.view().tag_state.prompt.op;
var kept: [Text.max_selections]modal.Selection = undefined;
@@ -1240,11 +1248,12 @@ fn plural(n: usize) []const u8 {
/// lines the field is in, eleven at most.
pub fn takes(p: *Pardes) u16 {
const s = &p.view().tag_state;
- if (s.prompt.op == .command) return @max(Command.takes(p), if (s.prompt.history) historyRows(p) else 0);
+ const rows = historyRows(ring(p, s.prompt.op), s.field.text());
+ if (s.prompt.op == .command) return @max(Command.takes(p), if (s.prompt.history) rows else 0);
if (s.prompt.op == .pipe_to) if (p.panes[TagState.hostOf(p) orelse return 0]) |pane| if (answered(p, pane, s.field.text())) |l|
- return @max(runRows(l), if (s.prompt.history) historyRows(p) else 0);
+ return @max(runRows(l), if (s.prompt.history) rows else 0);
if (!s.prompt.history) return 0;
- return historyRows(p);
+ return rows;
}
/// `A-|`'s runs as rows: each `#1 exit 0`, then its output's lines.
@@ -1254,12 +1263,12 @@ fn runRows(l: *const Pipe.PendingPipe) u16 {
return @intCast(@min(Band.Cursor.shown, n));
}
-fn historyRows(p: *Pardes) u16 {
- const s = &p.view().tag_state;
+/// The rows history `r` unrolled takes: its lines holding `q`, one at
+/// least, eleven at most.
+pub fn historyRows(r: *const Ring, q: []const u8) u16 {
var n: u16 = 0;
- const r = ring(p, s.prompt.op);
for (r.lines[0..r.n]) |l| {
- if (std.mem.indexOf(u8, l.slice(), s.field.text()) != null) n += 1;
+ if (std.mem.indexOf(u8, l.slice(), q) != null) n += 1;
}
return @max(1, @min(Band.Cursor.shown, n));
}
@@ -1271,8 +1280,9 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator, out: *[Band.max_steps]Band.St
var made: usize = 0;
// `:`'s history before its rows and their doc, which takes the width
// left after the others.
+ const r = ring(p, s.prompt.op);
if (s.prompt.op == .command) {
- if (s.prompt.history) made = try historyStep(p, arena, &out[0]);
+ if (s.prompt.history) made = try historyStep(arena, r, s.field.text(), s.prompt.recall, &out[0]);
return out[0 .. made + try Command.steps(p, arena, out[made..])];
}
if (s.prompt.op == .pipe_to) if (p.panes[TagState.hostOf(p) orelse return out[0..0]]) |pane| if (answered(p, pane, s.field.text())) |l| {
@@ -1291,35 +1301,55 @@ pub fn steps(p: *Pardes, arena: std.mem.Allocator, out: *[Band.max_steps]Band.St
made += 1;
};
if (!s.prompt.history) return out[0..made];
- return out[0 .. made + try historyStep(p, arena, &out[made])];
+ return out[0 .. made + try historyStep(arena, r, s.field.text(), s.prompt.recall, &out[made])];
}
-/// The line of its history the cursor of the history unrolled is on: the
-/// one the keys moved to (`recall`), else the newest holding the field;
-/// 0 with none.
-fn historyAt(p: *Pardes) u8 {
- const s = &p.view().tag_state;
- if (s.prompt.recall != 0) return s.prompt.recall;
- const r = ring(p, s.prompt.op);
+/// The line of history `r` the cursor of it unrolled is on: the one the
+/// keys moved to (`recall`), else the newest holding the field `q`; 0
+/// with none.
+pub fn historyAt(r: *const Ring, q: []const u8, recall: u8) u8 {
+ if (recall != 0) return recall;
var back: u8 = 1;
while (back <= r.n) : (back += 1) {
- if (std.mem.indexOf(u8, r.get(back).?, s.field.text()) != null) return back;
+ if (std.mem.indexOf(u8, r.get(back).?, q) != null) return back;
}
return 0;
}
+/// Down and Ctrl-n, Up and Ctrl-p in history `r` unrolled (UX D5: a list
+/// like any other): its cursor `recall` to the next line it shows, older
+/// or newer, the field `q` kept as typed; true when the key was one.
+pub fn historyKey(r: *const Ring, q: []const u8, recall: *u8, k: Key) bool {
+ const plain = !k.ctrl and !k.alt;
+ const ctrl = k.ctrl and !k.alt;
+ const down = (plain and k.cp == Key.down) or (ctrl and k.cp == 'n');
+ const up = (plain and k.cp == Key.up) or (ctrl and k.cp == 'p');
+ if (!down and !up) return false;
+ const at = historyAt(r, q, recall.*);
+ var newer: u8 = 0;
+ var older: u8 = 0;
+ var rows: usize = 0;
+ var back: u8 = 1;
+ while (back <= r.n and rows < Band.Cursor.shown) : (back += 1) {
+ if (std.mem.indexOf(u8, r.get(back).?, q) == null) continue;
+ rows += 1;
+ if (back < at) newer = back;
+ if (back > at and older == 0) older = back;
+ }
+ const to = if (down) older else newer;
+ if (to != 0) recall.* = to;
+ return true;
+}
+
/// A history step's row's index: its line's place in the ring with this
/// bit, which a click tells from the other steps' rows (Command.point).
pub const history_row: u16 = 0x8000;
-/// The history step (Ctrl-r): its lines newest first, those holding the
-/// field, its cursor on one.
-fn historyStep(p: *Pardes, arena: std.mem.Allocator, out: *Band.Step) !usize {
- const s = &p.view().tag_state;
- const r = ring(p, s.prompt.op);
+/// History `r`'s step (Ctrl-r): its lines newest first, those holding the
+/// field `q`, its cursor on one.
+pub fn historyStep(arena: std.mem.Allocator, r: *const Ring, q: []const u8, recall: u8, out: *Band.Step) !usize {
var rows: std.ArrayList(Band.Row) = .empty;
- const q = s.field.text();
- const at = historyAt(p);
+ const at = historyAt(r, q, recall);
var back: u8 = 1;
while (back <= r.n and rows.items.len < Band.Cursor.shown) : (back += 1) {
const l = r.get(back).?;
@@ -1470,12 +1500,12 @@ test "/ searches the body as it is typed: the current place selected, `▸` in t
{
const s = try p.render(frame.allocator());
const r = p.view().rects[0];
- const roles = &p.chromeTheme().roles;
+ const c = p.chrome();
const x = r.x + config.GUTTER + File.gutterWidth(pane);
const y = p.bodyTop(pane, r);
- try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, s.at(x - 1 - File.laneCells(pane) - pane.layers.heat, y + 2).style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.key }, s.at(x - 1 - File.laneCells(pane) - pane.layers.heat, y + 2).style.fg);
// Line 1's place (`dirty` at its start) on the hit ground.
- try std.testing.expectEqual(pardes.Color{ .rgb = roles.hit }, s.at(x, y).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit }, s.at(x, y).style.bg);
}
p.update(.{ .key = .{ .cp = Key.enter } });
try std.testing.expectEqual(TagState.Kind.rest, p.view().tag_state.kind);
@@ -1621,8 +1651,10 @@ test "a pipe prompt runs a known filter live, a run a selection: the outputs gho
const x = r.x + config.GUTTER + File.gutterWidth(pane);
const y = p.bodyTop(pane, r);
for ([_][]const u8{ "b", "B", "a", "A", "c" }, 0..) |want, row| try std.testing.expectEqualStrings(want, s.at(x, y + @as(u16, @intCast(row))).grapheme());
- try std.testing.expectEqual(pardes.Color{ .rgb = colors.Grounds.of(p.theme()).del.row }, s.at(x, y).style.bg);
- try std.testing.expectEqual(pardes.Color{ .rgb = colors.Grounds.of(p.theme()).add.row }, s.at(x, y + 1).style.bg);
+ // On the chrome's diff rows (R10), the ghost in the page's text.
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().del.row }, s.at(x, y).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().add.row }, s.at(x, y + 1).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().page.text }, s.at(x, y + 1).style.fg);
try std.testing.expectEqualStrings("b\na\nc\n", pane.file.?.content);
// Enter: what the live run made, applied.
p.update(.{ .key = .{ .cp = Key.enter } });
diff --git a/core/Query.zig b/core/Query.zig
index 2b2abebb..f9651faf 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -471,8 +471,8 @@ fn makeNameRows(p: *Pardes, id: usize) !void {
var rows: std.ArrayList(locations.Row) = .empty;
var spans: std.ArrayList(pardes.Term.Span) = .empty;
errdefer spans.deinit(p.gpa);
- const chrome = p.bodyChrome();
- const tint: pardes.CellStyle = .{ .fg = .{ .rgb = chrome.search_fg }, .bg = .{ .rgb = chrome.search_bg }, .bold = true };
+ const chrome = p.chrome();
+ const tint: pardes.CellStyle = .{ .fg = .{ .rgb = chrome.page.text }, .bg = .{ .rgb = chrome.hit }, .bold = true };
const shown = @min(q.names.hits.items.len, Names.max_rows);
var marks: [Names.max_query * 4]u16 = undefined;
const base = lineOne(rp.file.?.content).len + 1;
@@ -510,7 +510,7 @@ fn makeNameRows(p: *Pardes, id: usize) !void {
// A closed pane's row is dimmer, the gutter's colour, between its
// marks (spans are walked in order, never overlapping).
const dim = q.source == .panes and p.paneBySerial(cand.ref) == null;
- const dimmed: pardes.CellStyle = .{ .fg = .{ .rgb = chrome.lineno } };
+ const dimmed: pardes.CellStyle = .{ .fg = .{ .rgb = chrome.line_number } };
var gap: usize = 0;
var k: usize = 0;
while (k < nmarks) {
@@ -530,8 +530,9 @@ fn makeNameRows(p: *Pardes, id: usize) !void {
f.pager_spans = spans.toOwnedSlice(p.gpa) catch &.{};
q.total = q.names.hits.items.len;
q.more = q.names.busy() or p.stream.busyFor(rp.serial);
- // The best is current until a step or a click moves it.
- q.current = if (shown > 0) 0 else null;
+ // The best is current until a step or a click moves it: in a grouped
+ // list (Symbols) wherever its group puts it.
+ q.current = if (shown > 0) @min(q.names.bestRow(), shown - 1) else null;
countCurrent(q);
showCurrent(p.settings.tab, rp);
if (q.current == null) blankPreview(p, id) else showTarget(p, id);
@@ -771,23 +772,54 @@ pub fn gather(p: *Pardes, names: *Names, source: Source, dir: []const u8, self:
const oid = owner_id orelse return;
const owner = p.panes[oid].?;
const f = if (owner.file) |*file| file else return;
- const decls = ownerDecls(f) orelse {
+ if (f.context.revision != f.revision) {
// Parsed on the worker; listed when it is done (declsArrived).
Stream.parseFor(p, oid);
return;
- };
- for (decls) |d| {
- const header = f.content[d.start_byte..@min(d.header_end_byte, f.content.len)];
- const first = std.mem.trim(u8, header[0 .. std.mem.indexOfScalar(u8, header, '\n') orelse header.len], " \t\r");
- var buf: [256 + 16]u8 = undefined;
- const row = std.fmt.bufPrint(&buf, "{d: >6} {s}", .{ d.start_line + 1, first[0..@min(first.len, 240)] }) catch continue;
- names.add(gpa, row, 8, row.len - 8, 0, @intCast(d.start_line + 1)) catch break;
}
+ // The file's text, which was parsed (the `Changes` layer's lines
+ // are none of it).
+ const text = File.fileText(f, p.scratch.allocator()) catch return;
+ const symbols = f.context.symbols;
+ // A row a symbol, ` 12 m Counts.lines : usize = 0`: its
+ // line, its mark, its name qualified by the ones it is in, then
+ // what its first line says after the name; types, functions,
+ // fields, then the rest, each in the text's order (UX DESIGN N).
+ // The qualified name alone is matched, its own name the
+ // basename.
+ for (0..4) |group| for (symbols) |sym| {
+ if (sym.kind.group() != group or sym.kind == .scope or sym.end > text.len) continue;
+ var buf: [512]u8 = undefined;
+ var row: std.Io.Writer = .fixed(&buf);
+ row.print("{d: >6} {s} ", .{ sym.line + 1, sym.kind.mark() }) catch continue;
+ const key_at = row.end;
+ qualify(&row, symbols, text, sym.parent, 4) catch continue;
+ // The name its basename: the qualifier dim (Pick.rowAt).
+ const base = row.end - key_at;
+ row.writeAll(text[sym.name_start..sym.name_end]) catch continue;
+ const key_len = row.end - key_at;
+ const rest = text[sym.name_end..@max(sym.name_end, sym.end)];
+ var detail = std.mem.trim(u8, rest[0 .. std.mem.indexOfScalar(u8, rest, '\n') orelse rest.len], " \t\r");
+ detail = std.mem.trimEnd(u8, std.mem.trimEnd(u8, detail, "{,;"), " \t");
+ if (detail.len > 0) row.print(" {s}", .{detail[0..@min(detail.len, buf.len - row.end -| 2)]}) catch {};
+ names.add(gpa, row.buffered(), key_at, key_len, @intCast(base), sym.line + 1) catch break;
+ names.cands.items[names.cands.items.len - 1].group = @intCast(group);
+ };
},
else => {},
}
}
+/// The names of the symbols `parent` (an index + 1) is in, outermost
+/// first, each with its `.`: `Outer.Inner.` (the `depth` innermost).
+fn qualify(w: *std.Io.Writer, symbols: []const syntax.Symbol, text: []const u8, parent: u32, depth: u8) std.Io.Writer.Error!void {
+ if (parent == 0 or parent > symbols.len or depth == 0) return;
+ const up = symbols[parent - 1];
+ if (up.name_end > text.len) return;
+ try qualify(w, symbols, text, up.parent, depth - 1);
+ try w.print("{s}.", .{text[up.name_start..up.name_end]});
+}
+
/// What a Panes row of a closed pane ends with.
const closed_word = " (closed)";
@@ -1269,7 +1301,7 @@ fn countGrepCurrent(q: *Query) void {
/// picker (Pick.zig: the same fields): a Grep's lines (`path:line:col-end
/// code`, relative to the pane's directory) kept as found, a listing's
/// names added to what Find scores.
-pub fn take(p: *Pardes, q: anytype, kind: Stream.Kind, rows: []const u8) void {
+pub fn take(p: *Pardes, q: anytype, kind: Stream.Kind, rows: []const u8, under: []const u8) void {
var lines = std.mem.splitScalar(u8, rows, '\n');
while (lines.next()) |ln| {
if (ln.len == 0) continue;
@@ -1286,13 +1318,14 @@ pub fn take(p: *Pardes, q: anytype, kind: Stream.Kind, rows: []const u8) void {
const name = if (ln[0] == '"') look.unquoted(&namebuf, t.path) else t.path;
const found: Found = .{
.path = std.math.cast(u32, q.found_bytes.items.len) orelse return,
- .path_len = std.math.cast(u16, name.len) orelse continue,
+ .path_len = std.math.cast(u16, under.len + name.len) orelse continue,
.line = std.math.cast(u32, t.at.line) orelse continue,
.col = std.math.cast(u32, t.at.col -| 1) orelse continue,
.end = std.math.cast(u32, if (t.at.end_col > 0) t.at.end_col else t.at.col) orelse continue,
- .code = std.math.cast(u32, q.found_bytes.items.len + name.len) orelse return,
+ .code = std.math.cast(u32, q.found_bytes.items.len + under.len + name.len) orelse return,
.code_len = std.math.cast(u32, code.len) orelse continue,
};
+ q.found_bytes.appendSlice(p.gpa, under) catch return;
q.found_bytes.appendSlice(p.gpa, name) catch return;
q.found_bytes.appendSlice(p.gpa, code) catch return;
q.found.append(p.gpa, found) catch return;
@@ -1703,7 +1736,7 @@ fn displayPreview(p: *Pardes, qid: usize, path: []const u8, at: look.Spot) void
pane.hscroll = 0;
// another file: its own places, found below
pane.places.clear(p.gpa);
- p.sync();
+ p.layOut();
}
look.clearNavigationSelection(p, pane);
if (at.line == 0 or at.line > File.nlines(p.gpa, f)) {
@@ -2092,8 +2125,7 @@ pub fn tagPrefix(q: *const Query, arena: std.mem.Allocator, path: []const u8) er
pub fn paintMark(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void {
const q = pane.query orelse return;
const c = q.current orelse return;
- const th = p.theme();
- const mark = colors.mix(th.bg orelse th.tag_bg, th.sel_bg);
+ const mark = p.chrome().selection_secondary;
const tx = r.x + config.GUTTER;
const tw = r.w -| config.GUTTER;
const col = File.gutterWidth(pane);
@@ -2106,13 +2138,11 @@ pub fn paintMark(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u
/// The other places on a hit row's line tinted, from the pane its rows are
/// in (the first is the row's own mark, Output.decorateRow): the current
-/// one strongest, as in that pane's text.
+/// one solid, as in that pane's text (Places.paint).
pub fn paint(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16) void {
const q = pane.query orelse return;
const f = if (pane.file) |*file| file else return;
- const th = p.theme();
- const strong = p.chromeTheme().search_bg;
- const quiet = colors.mix(th.bg orelse th.tag_bg, strong);
+ const c = p.chrome();
var vr: i32 = 0;
var last: i32 = -1;
while (vr < body_h) : (vr += 1) {
@@ -2144,7 +2174,7 @@ pub fn paint(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, body_h: u16)
const b = @min(line.len, meta.code_start + (@min(h.end, next) - ls - meta.source_column));
if (b <= a or a >= line.len) continue;
const current = set.current != null and set.current.? == hi;
- File.paintWordSelection(p, s, pane, r, row, @intCast(a), @intCast(b), if (current) strong else quiet);
+ File.paintWordSelection(p, s, pane, r, row, @intCast(a), @intCast(b), if (current) c.hit_current else c.hit, if (current) c.hit_current_text else null);
}
}
}
@@ -2811,7 +2841,52 @@ test "Grep: a row whose numbers a Found cannot hold (a column past u32) is passe
defer p.deinit();
var q: Query = .{ .owner = 0 };
defer q.deinit(p.gpa);
- take(p, &q, .grep, "a:5000000000:b:3:1-4 hit\nok.txt:2:3-5 hit\nb:7:4294967297 hit\n");
+ take(p, &q, .grep, "a:5000000000:b:3:1-4 hit\nok.txt:2:3-5 hit\nb:7:4294967297 hit\n", "");
// Taken or passed over, each: never cast (main: Query.zig:1267).
try std.testing.expect(q.found.items.len <= 3);
}
+
+test "a query pane's hits are the body's: a row's match on the hit ground in the text's ink, the owner's current place solid in the hue with the page's ink, the current row marked with the selection's faint half" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
+ defer p.deinit();
+ p.settings.jumps = .@"new-pane";
+ colors.setThemeIndex(p, colors.themeIndex("orchard").?);
+ const pane = try p.setTestFile("alpha one alpha\nbeta\ngamma alpha\n");
+ slash(p, "/alpha");
+ const qid = queryPane(p).?;
+ const qp = p.panes[qid].?;
+ try std.testing.expectEqual(@as(?usize, 0), qp.query.?.current);
+ try std.testing.expectEqual(@as(?usize, 0), pane.places.current);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const s = try p.render(frame.allocator());
+ const c = p.chrome();
+ const r = p.view().rects[qid];
+ // Row 1 (line 1 is the query) the first place's line, row 2 the third's.
+ var rows: [2][]const u8 = undefined;
+ for (&rows, 1..) |*row, k| {
+ var text: std.ArrayList(u8) = .empty;
+ for (0..r.w) |x| try text.appendSlice(frame.allocator(), s.at(r.x + @as(u16, @intCast(x)), p.bodyTop(qp, r) + @as(u16, @intCast(k))).grapheme());
+ row.* = text.items;
+ }
+ const y = p.bodyTop(qp, r) + 1;
+ const first = std.mem.indexOf(u8, rows[0], "alpha").?;
+ const second = std.mem.lastIndexOf(u8, rows[0], "alpha").?;
+ const third = std.mem.indexOf(u8, rows[1], "alpha").?;
+ try std.testing.expect(second > first + 5);
+ for (0..5) |i| {
+ const current = s.at(r.x + @as(u16, @intCast(first + i)), y).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_current }, current.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_current_text }, current.fg);
+ const other = s.at(r.x + @as(u16, @intCast(second + i)), y).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit }, other.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.text }, other.fg);
+ const below = s.at(r.x + @as(u16, @intCast(third + i)), y + 1).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.hit }, below.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.text }, below.fg);
+ }
+ // The current row's mark between its places and to its end; none below.
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.selection_secondary }, s.at(r.x + @as(u16, @intCast(first + 6)), y).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.selection_secondary }, s.at(r.x + r.w - 2, y).style.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.ground }, s.at(r.x + r.w - 2, y + 1).style.bg);
+}
diff --git a/core/Store.zig b/core/Store.zig
index 1328af38..8a1c3987 100644
--- a/core/Store.zig
+++ b/core/Store.zig
@@ -223,7 +223,7 @@ pub fn reopen(s: *Store, p: *Pardes, serial: u32, from: usize) bool {
};
p.view().active = free;
if (layout.findPane(p, free)) |f| p.setActiveColumn(f.col);
- p.sync();
+ p.layOut();
return true;
}
diff --git a/core/Stream.zig b/core/Stream.zig
index c5069ed5..4691e192 100644
--- a/core/Stream.zig
+++ b/core/Stream.zig
@@ -67,10 +67,11 @@ pub const Batch = struct {
end: ?End = null,
/// A parse's own time on the worker (`parse_ns`).
took_ns: u64 = 0,
- /// A parse's answer (`parseFor`): the declarations of pane `serial`'s
- /// text at `revision`.
+ /// A parse's answer (`parseFor`): the declarations and symbols of pane
+ /// `serial`'s text at `revision`.
parsed: ?struct { serial: u32, revision: u32 } = null,
decls: []syntax.ContextDeclaration = &.{},
+ symbols: []syntax.Symbol = &.{},
/// A paint's answer (`paintAhead`): the colours of pane `serial`'s text
/// at `revision` from byte `start`, one syntax.Syn a byte.
painted: ?struct { serial: u32, revision: u32, start: usize } = null,
@@ -83,6 +84,7 @@ pub const Batch = struct {
pub fn deinit(b: *const Batch, gpa: std.mem.Allocator) void {
gpa.free(b.rows);
gpa.free(b.decls);
+ gpa.free(b.symbols);
gpa.free(b.styles);
}
};
@@ -480,9 +482,9 @@ pub fn parseFor(p: *Pardes, id: usize) void {
fn parseWork(io: std.Io, job: *TextJob, ctx: ?*anyopaque, sink: Sink) void {
const began = std.Io.Clock.awake.now(io);
- const decls: []syntax.ContextDeclaration = syntax.declarationsApart(job.out, job.path, job.source, &job.stop) catch @constCast(&[_]syntax.ContextDeclaration{});
+ const made: syntax.Context = syntax.contextApart(job.out, job.path, job.source, &job.stop) catch .{};
const took: u64 = @intCast(@max(0, began.durationTo(std.Io.Clock.awake.now(io)).nanoseconds));
- _ = sink(ctx, .{ .gen = job.gen, .decls = decls, .parsed = .{ .serial = job.serial, .revision = job.revision }, .end = .done, .took_ns = took });
+ _ = sink(ctx, .{ .gen = job.gen, .decls = made.declarations, .symbols = made.symbols, .parsed = .{ .serial = job.serial, .revision = job.revision }, .end = .done, .took_ns = took });
}
fn now() u64 {
@@ -717,7 +719,7 @@ pub fn receive(p: *Pardes, b: *const Batch) void {
const id = p.paneBySerial(s.target) orelse return;
const q = p.panes[id].?.query orelse return;
q.capped = s.state == .capped;
- panes.Query.take(p, q, s.kind, b.rows);
+ panes.Query.take(p, q, s.kind, b.rows, "");
}
/// A parse's answer: its task joined; the declarations kept as the pane's
@@ -732,12 +734,15 @@ fn receiveParse(p: *Pardes, b: *const Batch, serial: u32, revision: u32) void {
t.job.deinit();
};
s.parse_ns = b.took_ns;
- if (p.paneBySerial(serial)) |id| if (p.panes[id].?.file) |*f| if (f.revision == revision and b.decls.len > 0) {
- if (p.tree_sitter_gpa.dupe(syntax.ContextDeclaration, b.decls)) |copy| {
- f.context.replace(p.tree_sitter_gpa, copy, revision);
- panes.Query.declsArrived(p, serial);
- panes.Pick.declsArrived(p, serial);
- } else |_| {}
+ if (p.paneBySerial(serial)) |id| if (p.panes[id].?.file) |*f| if (f.revision == revision and (b.decls.len > 0 or b.symbols.len > 0)) kept: {
+ const decls = p.tree_sitter_gpa.dupe(syntax.ContextDeclaration, b.decls) catch break :kept;
+ const symbols = p.tree_sitter_gpa.dupe(syntax.Symbol, b.symbols) catch {
+ p.tree_sitter_gpa.free(decls);
+ break :kept;
+ };
+ f.context.replace(p.tree_sitter_gpa, .{ .declarations = decls, .symbols = symbols }, revision);
+ panes.Query.declsArrived(p, serial);
+ panes.Pick.declsArrived(p, serial);
};
p.needs_frame = true;
// A `Churn` waiting on these declarations (jj.zig).
diff --git a/core/Tables.zig b/core/Tables.zig
index a0256d8a..99e464ac 100644
--- a/core/Tables.zig
+++ b/core/Tables.zig
@@ -645,16 +645,16 @@ fn glyph(cell: *Cell, g: []const u8) void {
/// A pane's table rows drawn as tables: every unescaped `|` a rule, the
/// delimiter row one rule across (its dashes, its blanks and its pads, its
/// `:` kept in the rule's colour, since they say the alignment), the header
-/// row bold on the tag's ground, as compact context rows are. Only glyphs
+/// row bold on the tag's ground, as compact context rows are, the rules in
+/// the page's rule ink (R11). Only glyphs
/// and colours change, on the cells the row has: where each byte is and how
/// wide is fillBody's, so nothing is drawn over anything, B1 on a rule is
/// B1 on its `|`, and a selection's tint lies over the rules as over text.
pub fn paint(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw: u16, body_h: u16) void {
const f = if (pane.file) |*file| file else return;
if (f.tables.list.items.len == 0) return;
- const th = p.theme();
- const rule_fg: Color = .{ .rgb = th.border orelse th.lineno };
- const head_bg: Color = .{ .rgb = th.tag_bg };
+ const rule_fg: Color = .{ .rgb = p.chrome().page.rule };
+ const head_bg: Color = .{ .rgb = p.chrome().tag[0].ground };
const prefix: usize = File.gutterWidth(pane);
const body_y = p.bodyTop(pane, r);
var vr: u16 = 0;
diff --git a/core/Term.zig b/core/Term.zig
index d4baf4e8..509da6d9 100644
--- a/core/Term.zig
+++ b/core/Term.zig
@@ -422,7 +422,7 @@ pub const calls = [_]struct { []const u8, []const u8, []const u8 }{
.{ "endOutputHere", "ninep/pty.zig:1", "WRITE: a 9P pty/run's step ends a command's output at the cursor: the session's step, replayed as such" },
.{ "replies", "Core.zig:1", "WRITE: a step drains the reply buffer (in the digest), counted when it held any (the feed's own unit, which filled it); only the session writes it to the pty (pty_write is off the tape)" },
// ---- reads by a step: in the digest ----
- .{ "grid", "Core.zig:2 ansi.zig:3 body_layer.zig:3 draw.zig:2 dump.zig:4 echo.zig:8 exec.zig:2 layout.zig:2 panes.zig:6 replica.zig:2", "READ: the size, the history's length, the cursor: in the digest (a view's place is its pane's; ansi.zig, body_layer.zig, draw.zig, echo.zig: a draw's)" },
+ .{ "grid", "Core.zig:3 ansi.zig:3 body_layer.zig:3 draw.zig:2 dump.zig:4 echo.zig:8 exec.zig:2 layout.zig:2 panes.zig:6 replica.zig:2", "READ: the size, the history's length, the cursor: in the digest (a view's place is its pane's; ansi.zig, body_layer.zig, draw.zig, echo.zig: a draw's)" },
.{ "modes", "Core.zig:5 draw.zig:1 dump.zig:2 echo.zig:3 exec.zig:3 mouse.zig:4 ninep/pty.zig:3 panes.zig:2 replica.zig:1", "READ: the program's modes (mouse, focus, bracketed paste, the alternate screen): in the digest (draw.zig, echo.zig: a draw's; panes.zig: a view scrolls no history on the alternate screen)" },
.{ "prompt", "Core.zig:1 builtins.zig:1 echo.zig:1 exec.zig:3 ninep/pty.zig:1 panes.zig:1", "READ: the OSC 133 cycle: in the digest (`marksOf`); Core.zig's and ninep/pty.zig's also taped (`.prompt`, each side's compared)" },
.{ "promptPrefix", "body_layer.zig:1 edit.zig:1 exec.zig:1", "READ: a row's prompt cells (`promptCut`): the active area's in the digest; a history row's text is not (below)" },
diff --git a/core/Trail.zig b/core/Trail.zig
index f2b4fef4..e42ab1e2 100644
--- a/core/Trail.zig
+++ b/core/Trail.zig
@@ -57,15 +57,17 @@ pub const Step = union(enum) {
/// A list the pane came through (`Find pick 3/6 •2`, §5.6): its word
/// and the pickers' index for it. Made as a picker lands (Pick.listed).
list: Word,
- /// A search made in the pane (`/dirty/ 3/7`, §7.3). Made by a search
- /// prompt (Prompt.word).
- search: Word,
+ /// A search made in the pane (`/dirty/ 3/7`, §7.3) and where it
+ /// started: a walk back onto it puts the caret there (UX L'1). Made by
+ /// a search prompt (Prompt.word).
+ search: Search,
/// A chain of selection prompts as an Edit line (§7.5). Made by the sam
/// prompts (Prompt.link).
recipe: Word,
};
pub const Place = struct { path: Kind.Buf(max_text) = .{}, line: u32 = 0, col: u32 = 0 };
pub const Word = struct { text: Kind.Buf(max_text) = .{}, index: u32 = 0 };
+pub const Search = struct { text: Kind.Buf(max_text) = .{}, index: u32 = 0, from: Place = .{} };
/// A file the walk can show: a text on its path, not an output, a
/// listing, a pager, a query or a kind (§2: what is not a file is held).
@@ -157,8 +159,11 @@ fn push(t: *Trail, s: Step) void {
pub fn step(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
const pane = p.panes[id].?;
const t = &pane.trail;
+ // At a word (a walk onto a search's, a list's Enter, UX L'1): a step
+ // from it keeps the word, and is one wherever the pane is.
+ const word = t.cur < t.n and t.steps[t.cur] != .place;
// Where it is already: no step.
- if (here(pane)) |was| if (samePlace(was, path, at.line)) return show(p, id, path, at);
+ if (!word) if (here(pane)) |was| if (samePlace(was, path, at.line)) return show(p, id, path, at);
for (t.steps[0..t.cur], 0..) |s, i| if (samePlace(s, path, at.line)) return go(p, id, @intCast(i));
if (t.n > t.cur + 1) for (t.steps[t.cur + 1 .. t.n], t.cur + 1..) |s, j| if (samePlace(s, path, at.line)) return go(p, id, @intCast(j));
const to = placeOf(path, at.line, at.col) orelse return error.NameTooLong;
@@ -166,7 +171,7 @@ pub fn step(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
if (here(pane)) |was| {
if (t.n > t.cur) {
t.n = t.cur + 1;
- t.steps[t.cur] = was;
+ if (!word) t.steps[t.cur] = was;
} else push(t, was);
} else t.n = t.cur;
push(t, to);
@@ -175,19 +180,27 @@ pub fn step(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
}
/// Go to step `i` of reading pane `id`'s trail, back or forward (§6.4):
-/// where it is now becomes the step it leaves, the ones between stay.
+/// where it is now becomes the step it leaves (a word it is at stays the
+/// word), the ones between stay.
pub fn go(p: *Pardes, id: usize, i: u8) !usize {
const pane = p.panes[id].?;
const t = &pane.trail;
if (i >= t.n or t.steps[i] != .place) return id;
const s = t.steps[i];
- if (t.n > t.cur) if (here(pane)) |was| {
- t.steps[t.cur] = was;
- };
+ leave(pane);
t.cur = i;
return show(p, id, s.place.path.slice(), .{ .line = s.place.line, .col = s.place.col });
}
+/// Where pane `pane` is now kept as the step it leaves, when that is a
+/// place: a word it is at stays the word.
+fn leave(pane: *Pane) void {
+ const t = &pane.trail;
+ if (t.cur < t.n and t.steps[t.cur] == .place) if (here(pane)) |was| {
+ t.steps[t.cur] = was;
+ };
+}
+
/// A list the pane's newest step came through (§6.2: a picker's Enter,
/// Pick.zig): its word before the step's place.
pub fn through(t: *Trail, s: Step) void {
@@ -210,7 +223,7 @@ pub fn through(t: *Trail, s: Step) void {
pub fn replaceStep(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
const to = placeOf(path, at.line, at.col) orelse return error.NameTooLong;
const t = &p.panes[id].?.trail;
- if (t.cur < t.n) t.steps[t.cur] = to;
+ if (t.cur < t.n and t.steps[t.cur] == .place) t.steps[t.cur] = to;
return show(p, id, path, at);
}
@@ -237,7 +250,9 @@ fn show(p: *Pardes, id: usize, path: []const u8, at: Spot) !usize {
.opened => |free| free,
.shown, .none => return p.view().active,
};
- if (at.line > panes.File.nlines(p.gpa, &p.panes[free].?.file.?)) {
+ // (A kind's pane, look.open's for a file a kind takes, has no lines.)
+ const nf = if (p.panes[free].?.file) |*f| f else return free;
+ if (at.line > panes.File.nlines(p.gpa, nf)) {
try p.removePane(free, null);
p.view().active = id;
return error.LineMissing;
@@ -327,7 +342,7 @@ pub fn keep(pane: *Pane) void {
if (t.held) return;
t.held = true;
var w: u8 = 0;
- for (t.steps[0..t.cur]) |s| if (s == .search or s == .recipe) {
+ for (t.steps[0..t.backs()]) |s| if (s == .search or s == .recipe) {
t.steps[w] = s;
w += 1;
};
@@ -350,23 +365,96 @@ pub fn edited(p: *Pardes, f: *const panes.File.State) void {
}
-/// Back (`delta` < 0) or forward one place in reading pane `id`'s walk,
-/// as Ctrl-o and Ctrl-i go first (pick-ui SPEC §6.4): true when it had
-/// one that way, false to leave the step to the jump list (Jump.jumpBy).
+/// Back (`delta` < 0) or forward one word in pane `id`'s walk, as Ctrl-o
+/// and Ctrl-i go first (pick-ui SPEC §6.4, UX L'1): true when it had one
+/// that way, false to leave the step to the jump list (Jump.jumpBy).
pub fn walkBy(p: *Pardes, id: usize, delta: i32) bool {
const pane = p.panes[id] orelse return false;
- if (!reading(p, pane)) return false;
+ return walkFrom(p, id, pane.trail.cur, delta);
+}
+
+/// One word `delta`'s way from step `from` of pane `id`'s walk (UX L'1:
+/// the trail's words are the stack): onto a place, there (`go`); onto a
+/// list's word, that list unrolled again as it was left, previewing here,
+/// its Ctrl-o and Ctrl-i going on from its word (Pick.reopen); onto a
+/// search's, the caret where the search started and its places lit
+/// (Prompt.light); a held pane onto its own words, a search's and a
+/// recipe's (its selections back). A list no longer kept is said and
+/// passed by.
+pub fn walkFrom(p: *Pardes, id: usize, from: usize, delta: i32) bool {
+ const pane = p.panes[id] orelse return false;
const t = &pane.trail;
- var i: usize = t.cur;
- while (if (delta < 0) i > 0 else i + 1 < t.n) {
- i = if (delta < 0) i - 1 else i + 1;
- if (t.steps[i] != .place) continue;
- _ = go(p, id, @intCast(i)) catch |err| p.reportError(.at(id), "walk", err);
+ var at = from;
+ while (reach(p, pane, at, delta)) |i| {
+ switch (t.steps[i]) {
+ .owner => return false, // reach passes it by
+ .place => _ = go(p, id, i) catch |err| p.reportError(.at(id), "walk", err),
+ .list => |w| {
+ if (pardes.Pick.byId(p, w.index) == null) {
+ p.setMessage(.at(id), "walk: that list is gone: the last 8 are kept");
+ at = i;
+ continue;
+ }
+ pardes.Pick.reopen(p, id, w.index, i);
+ },
+ .search => |*s| {
+ leave(pane);
+ t.cur = i;
+ // Its place copied: a step to another file frees this pane.
+ const start = s.from;
+ var to = id;
+ if (start.path.len > 0 and !t.held) {
+ to = show(p, id, start.path.slice(), .{ .line = start.line, .col = start.col }) catch |err| {
+ p.reportError(.at(id), "walk", err);
+ return true;
+ };
+ } else if (start.path.len > 0 and std.mem.eql(u8, start.path.slice(), pane.file.?.path)) {
+ look.focusPaneLine(p, id, .{ .line = start.line, .col = start.col }, .center);
+ }
+ pardes.Prompt.light(p, to);
+ },
+ .recipe => {
+ t.cur = i;
+ pardes.Prompt.lookRecipe(p, id);
+ },
+ }
return true;
}
return false;
}
+/// The step a walk from step `from` of pane `pane`'s trail reaches
+/// `delta`'s way (UX L'1): a place, a list's word or a search's of a
+/// reading pane; a held pane's own words, a search's and a recipe's; never
+/// the owner. Only where it walks: a file, in a session whose jumps walk.
+fn reach(p: *const Pardes, pane: *const Pane, from: usize, delta: i32) ?u8 {
+ if (p.settings.jumps != .walk or !isFile(pane)) return null;
+ const t = &pane.trail;
+ var i = from;
+ while (if (delta < 0) i > 0 else i + 1 < t.n) {
+ i = if (delta < 0) i - 1 else i + 1;
+ switch (t.steps[i]) {
+ .owner => {},
+ .search => return @intCast(i),
+ .place, .list => if (!t.held) return @intCast(i),
+ .recipe => if (t.held) return @intCast(i),
+ }
+ }
+ return null;
+}
+
+/// After a landing and a search's Enter in pane `id` (UX L'1): the word
+/// its next Ctrl-o reaches, said on the notice row as an echo, `C-o back
+/// to Find words 1/1`, never logged.
+pub fn sayBack(p: *Pardes, id: usize) void {
+ const pane = p.panes[id] orelse return;
+ const i = reach(p, pane, pane.trail.cur, -1) orelse return;
+ var buf: [max_text + 16]u8 = undefined;
+ var said: [max_text + 32]u8 = undefined;
+ const text = std.fmt.bufPrint(&said, "C-o back to {s}", .{wordOf(&pane.trail, i, &buf)}) catch return;
+ _ = pardes.Messages.keep(p, .echo, pane.serial, "", text);
+}
+
// ---- the words ----
/// `newest`: out of rest (UX D1), the owner's word and the newest back
@@ -387,7 +475,8 @@ fn wordOf(t: *const Trail, i: usize, buf: *[max_text + 16]u8) []const u8 {
while (from > 0 and shared(t, i, path[from..])) from = if (std.mem.lastIndexOfScalar(u8, path[0 .. from - 1], '/')) |slash| slash + 1 else 0;
break :place std.fmt.bufPrint(buf, "{s}:{d}", .{ path[from..], at.line }) catch unreachable; // a path and a u32 fit
},
- .list, .search, .recipe => |*w| w.text.slice(),
+ .list, .recipe => |*w| w.text.slice(),
+ .search => |*s| s.text.slice(),
};
}
@@ -406,10 +495,17 @@ fn shared(t: *const Trail, i: usize, end: []const u8) bool {
const sep = " › ";
+/// The end of the steps written before the path: the back steps, and the
+/// word the pane is at when a walk stepped onto one (UX L'1: a search's,
+/// its caret where the search started).
+pub fn backs(t: *const Trail) usize {
+ return if (t.cur < t.n and t.steps[t.cur] != .place) t.cur + 1 else t.cur;
+}
+
/// The steps a part writes.
fn range(t: *const Trail, part: Part) [2]usize {
return switch (part) {
- .back, .newest => .{ 0, t.cur },
+ .back, .newest => .{ 0, t.backs() },
.forward => .{ @min(t.n, t.cur + 1), t.n },
};
}
@@ -417,20 +513,34 @@ fn range(t: *const Trail, part: Part) [2]usize {
/// The forward steps written whole after the path at rest; the rest fold.
pub const shown_ahead = 2;
-/// Steps [lo, hi) of `part` folded into one dim `+N` word where the first
-/// of them is (UX D8): at rest the back steps older than the newest
-/// `whole` (never the owner), the forward steps past `shown_ahead`.
-fn foldOf(t: *const Trail, part: Part, whole: usize) [2]usize {
+/// Whether step `i` folds into a dim `+N` in `part`, one `+N` a run of them
+/// where its first is (UX D8, L'1: the fold takes places): at rest a place
+/// older than the newest `whole` back steps, or past the first
+/// `shown_ahead` forward steps; a list's word only where the tag keeps its
+/// newest step alone (`whole` 1), and never the newest list's; the owner's,
+/// a search's and a recipe's never.
+fn folds(t: *const Trail, part: Part, whole: usize, i: usize) bool {
+ const end = t.backs();
return switch (part) {
- .back => back: {
- const lo: usize = @intFromBool(t.cur > 0 and t.steps[0] == .owner);
- break :back .{ lo, @max(lo, t.cur -| whole) };
+ .newest => false,
+ .forward => t.steps[i] == .place and i > t.cur + shown_ahead,
+ .back => i + whole < end and switch (t.steps[i]) {
+ .place => true,
+ .list => whole == 1 and for (t.steps[i + 1 .. end]) |s| {
+ if (s == .list) break true;
+ } else false,
+ .owner, .search, .recipe => false,
},
- .forward => .{ @min(t.n, t.cur + 1 + shown_ahead), t.n },
- .newest => .{ 0, 0 },
};
}
+/// The first of step `i`'s run of folded steps in `part`.
+fn runStart(t: *const Trail, part: Part, whole: usize, i: usize) usize {
+ var at = i;
+ while (at > range(t, part)[0] and folds(t, part, whole, at - 1)) at -= 1;
+ return at;
+}
+
/// The cells of the newest step's word out of rest: a longer one is cut
/// in its middle (UX D1: `Find pick…3/6`).
const newest_cells = 24;
@@ -440,9 +550,13 @@ const newest_cells = 24;
/// of rest the owner's and the newest step's alone, a word longer than
/// `newest_cells` keeping its first and last cells around a `…`.
fn wordIn(t: *const Trail, part: Part, whole: usize, i: usize, buf: *[max_text + 16]u8, cut: *[max_text + 16]u8) ?[]const u8 {
- if (part == .newest and t.steps[i] != .owner and i + 1 != t.cur) return null;
- const fold = foldOf(t, part, whole);
- if (i >= fold[0] and i < fold[1]) return if (i == fold[0]) std.fmt.bufPrint(buf, "+{d}", .{fold[1] - fold[0]}) catch unreachable else null;
+ if (part == .newest and t.steps[i] != .owner and i + 1 != t.backs()) return null;
+ if (folds(t, part, whole, i)) {
+ if (runStart(t, part, whole, i) != i) return null;
+ var end = i;
+ while (end < range(t, part)[1] and folds(t, part, whole, end)) end += 1;
+ return std.fmt.bufPrint(buf, "+{d}", .{end - i}) catch unreachable; // a count fits
+ }
const word = wordOf(t, i, buf);
if (part != .newest or word.len <= newest_cells) return word;
const tab = 8; // a step's word holds no tab
@@ -455,7 +569,7 @@ fn wordIn(t: *const Trail, part: Part, whole: usize, i: usize, buf: *[max_text +
/// The back steps' words, each with the separator after it (before the
/// path), or the forward steps', each with one before it (after the path),
-/// the folded ones as one `+N` (`foldOf`); out of rest (`newest`) the
+/// each run of folded ones as one `+N` (`folds`); out of rest (`newest`) the
/// owner's and the newest's.
pub fn write(t: *const Trail, part: Part, whole: usize, w: *std.Io.Writer) std.Io.Writer.Error!void {
var buf: [max_text + 16]u8 = undefined;
@@ -482,7 +596,7 @@ pub fn bytes(t: *const Trail, part: Part, whole: usize) usize {
/// The back step `n` and N walk (Pick.walkList, Prompt): the newest list
/// or search; its word is underlined (UX D8).
pub fn walked(t: *const Trail) ?u8 {
- var i: usize = t.cur;
+ var i: usize = t.backs();
while (i > 0) {
i -= 1;
if (t.steps[i] == .list or t.steps[i] == .search) return @intCast(i);
@@ -503,21 +617,18 @@ pub fn outOfRest(p: *const Pardes, pane: *const Pane) bool {
pub fn spanOf(t: *const Trail, i: usize, whole: usize) [2]usize {
var buf: [max_text + 16]u8 = undefined;
var cut: [max_text + 16]u8 = undefined;
+ const at = if (folds(t, .back, whole, i)) runStart(t, .back, whole, i) else i;
var x: usize = 0;
- for (0..i) |j| if (wordIn(t, .back, whole, j, &buf, &cut)) |word| {
+ for (0..at) |j| if (wordIn(t, .back, whole, j, &buf, &cut)) |word| {
x += word.len + sep.len;
};
- const fold = foldOf(t, .back, whole);
- const at = if (i >= fold[0] and i < fold[1]) fold[0] else i;
- if (at < i) return spanOf(t, at, whole);
- const word: []const u8 = wordIn(t, .back, whole, i, &buf, &cut) orelse "";
+ const word: []const u8 = wordIn(t, .back, whole, at, &buf, &cut) orelse "";
return .{ x, x + word.len };
}
-/// Whether back step `i` is in the fold's `+N`.
+/// Whether back step `i` is in a fold's `+N`.
pub fn isFolded(t: *const Trail, i: usize, whole: usize) bool {
- const fold = foldOf(t, .back, whole);
- return i >= fold[0] and i < fold[1];
+ return folds(t, .back, whole, i);
}
/// The step whose word in `part` is at byte `off` of what `write` wrote
@@ -527,12 +638,17 @@ pub fn stepAt(t: *const Trail, part: Part, whole: usize, off: usize) ?u8 {
var cut: [max_text + 16]u8 = undefined;
var x: usize = 0;
const r = range(t, part);
- const fold = foldOf(t, part, whole);
for (r[0]..r[1]) |i| {
const word = wordIn(t, part, whole, i, &buf, &cut) orelse continue;
if (part == .forward) x += sep.len;
// A fold's `+N` is the step nearest the path of those it holds.
- if (off >= x and off < x + word.len) return @intCast(if (i == fold[0] and fold[0] < fold[1]) (if (part == .back) fold[1] - 1 else fold[0]) else i);
+ if (off >= x and off < x + word.len) {
+ var near = i;
+ if (part == .back and folds(t, part, whole, i)) while (near + 1 < r[1] and folds(t, part, whole, near + 1)) {
+ near += 1;
+ };
+ return @intCast(near);
+ }
x += word.len;
if (part != .forward) x += sep.len;
}
@@ -550,7 +666,7 @@ pub fn lookStep(p: *Pardes, id: usize, i: u8) void {
.owner => |serial| if (p.paneBySerial(serial)) |owner| {
p.view().active = owner;
} else p.reportFailure(id, "walk: its owner is closed"),
- .list => |w| pardes.Pick.reopen(p, id, w.index),
+ .list => |w| pardes.Pick.reopen(p, id, w.index, null),
.search => pardes.Prompt.lookWord(p, id),
.recipe => pardes.Prompt.lookRecipe(p, id),
}
@@ -867,14 +983,18 @@ test "the walk drawn with a picker's list and the notice row (walk UI G 2e, SPEC
var arena: std.heap.ArenaAllocator = .init(std.testing.allocator);
defer arena.deinit();
// The reader's tag in the reading tint, the held one's not; the notice
- // row, nothing said, where the reader's caret is.
+ // row says what Ctrl-o goes back to (UX L'1), and with nothing said,
+ // where the reader's caret is.
try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().tag_reading_bg }, try tagGroundOf(p, &arena, rd));
try std.testing.expect(!std.meta.eql(pardes.Color{ .rgb = p.chromeTheme().tag_reading_bg }, try tagGroundOf(p, &arena, f.held)));
- const s = try p.render(arena.allocator());
- const foot = s.region(.notice_row, pardes.Region.none).?.rect;
- var row: std.ArrayList(u8) = .empty;
- for (0..s.cols) |x| try row.appendSlice(arena.allocator(), s.at(@intCast(x), foot.y).grapheme());
- try std.testing.expect(std.mem.indexOf(u8, row.items, try std.fmt.bufPrint(&want, "{s}/place.zig:8", .{f.dir})) != null);
+ for ([_][]const u8{ "C-o back to Refs 1/2", try std.fmt.bufPrint(&want, "{s}/place.zig:8", .{f.dir}) }) |said| {
+ const s = try p.render(arena.allocator());
+ const foot = s.region(.notice_row, pardes.Region.none).?.rect;
+ var row: std.ArrayList(u8) = .empty;
+ for (0..s.cols) |x| try row.appendSlice(arena.allocator(), s.at(@intCast(x), foot.y).grapheme());
+ try std.testing.expect(std.mem.indexOf(u8, row.items, said) != null);
+ _ = p.messages.retire(&.{.echo});
+ }
// n: the list's next place, in place of the current step.
typeKeys(p, "n");
p.sync();
@@ -1320,3 +1440,74 @@ test "a walk step never closes a file with unsaved changes: a reading pane chang
try std.testing.expectEqualStrings("changed\n", kept.file.?.content);
try std.testing.expect(kept.trail.held);
}
+
+test "the fold takes places alone (UX L'1): a list's and a search's words are never in a `+N`, a run of places between them each its own; where the tag keeps its newest step alone, older lists fold with the places, the newest list never" {
+ const Make = struct {
+ fn place(line: u32) Step {
+ var at: Place = .{ .line = line, .col = 1 };
+ at.path.set("/x/a.zig");
+ return .{ .place = at };
+ }
+ fn list(text: []const u8) Step {
+ var w: Word = .{};
+ w.text.set(text);
+ return .{ .list = w };
+ }
+ fn written(t: *const Trail, part: Part, whole: usize, out: []u8) ![]const u8 {
+ var w: std.Io.Writer = .fixed(out);
+ try t.write(part, whole, &w);
+ return w.buffered();
+ }
+ };
+ var out: [1024]u8 = undefined;
+ var t: Trail = .{};
+ for ([_]Step{ Make.place(1), Make.place(2), Make.list("A 1/2"), Make.place(3), Make.place(4), Make.place(5), Make.place(6) }) |s| push(&t, s);
+ t.cur = 6;
+ try std.testing.expectEqualStrings("+2 › A 1/2 › a.zig:3 › a.zig:4 › a.zig:5 › ", try Make.written(&t, .back, 3, &out));
+ try std.testing.expectEqualStrings("+2 › A 1/2 › +2 › a.zig:5 › ", try Make.written(&t, .back, 1, &out));
+ // Each `+N` is its run's: a click on the second goes to its newest.
+ try std.testing.expectEqual(@as(?u8, 1), t.stepAt(.back, 1, 0));
+ try std.testing.expectEqual(@as(?u8, 4), t.stepAt(.back, 1, "+2 › A 1/2 › ".len));
+ try std.testing.expectEqualDeep([2]usize{ "+2 › A 1/2 › ".len, "+2 › A 1/2 › +2".len }, t.spanOf(3, 1));
+ try std.testing.expect(t.isFolded(4, 1) and !t.isFolded(2, 1) and !t.isFolded(5, 1));
+ // Two lists: with the newest step alone the older folds, the newer not.
+ t = .{};
+ for ([_]Step{ Make.place(1), Make.list("A 1/2"), Make.place(2), Make.list("B 1/1"), Make.place(3), Make.place(4) }) |s| push(&t, s);
+ t.cur = 5;
+ try std.testing.expectEqualStrings("+3 › B 1/1 › a.zig:3 › ", try Make.written(&t, .back, 1, &out));
+ try std.testing.expectEqualStrings("+1 › A 1/2 › a.zig:2 › B 1/1 › a.zig:3 › ", try Make.written(&t, .back, 3, &out));
+ // A search's word never folds; forward, the places past two alone.
+ t = .{};
+ var s: Search = .{};
+ s.text.set("/s/ 1/1");
+ for ([_]Step{ Make.place(1), Make.place(2), .{ .search = s }, Make.place(3), Make.place(4), Make.place(5), Make.list("C 1/1"), Make.place(6), Make.place(7) }) |x| push(&t, x);
+ t.cur = 4;
+ try std.testing.expectEqualStrings("+2 › /s/ 1/1 › a.zig:3 › ", try Make.written(&t, .back, 1, &out));
+ try std.testing.expectEqualStrings(" › a.zig:5 › C 1/1 › +2", try Make.written(&t, .forward, 1, &out));
+}
+
+test "a held pane walks its own words (UX L'1): Ctrl-o onto its search's word puts the caret where the search started, its places lit; past it, the jump list's" {
+ var f: Fixture = .{ .p = undefined, .tmp = undefined };
+ try f.init(60);
+ defer f.deinit();
+ const p = f.p;
+ const held = p.panes[f.held].?;
+ pardes.look.focusPaneLine(p, f.held, .{ .line = 20, .col = 3 }, .center);
+ typeKeys(p, "/line 9");
+ p.update(.{ .key = .{ .cp = pardes.Key.enter } });
+ p.sync();
+ try std.testing.expectEqual(@as(i32, 89), held.body.cur_row);
+ try std.testing.expect(held.trail.n == 1 and held.trail.cur == 1 and held.trail.steps[0] == .search);
+ try std.testing.expectEqualStrings("C-o back to /line 9/ 2/11", p.messages.headline().?.words());
+ held.places.clear(p.gpa);
+ p.update(.{ .key = .{ .cp = 'o', .ctrl = true } });
+ p.sync();
+ try std.testing.expectEqual(@as(usize, f.held), p.view().active);
+ try std.testing.expectEqual(@as(i32, 19), held.body.cur_row);
+ try std.testing.expectEqual(@as(i32, 2), held.body.cur_col);
+ try std.testing.expectEqual(@as(u8, 0), held.trail.cur);
+ try std.testing.expect(held.places.shows(held) and std.mem.eql(u8, held.places.pattern, "line 9"));
+ // Its word still before its path, the search's.
+ try std.testing.expect(std.mem.startsWith(u8, try tagOf(p, held), "/line 9/ "));
+ try std.testing.expect(!walkBy(p, f.held, -1));
+}
diff --git a/core/ansi.zig b/core/ansi.zig
index e4fbf5da..3fb866fc 100644
--- a/core/ansi.zig
+++ b/core/ansi.zig
@@ -20,33 +20,12 @@ const Surface = pardes.Surface;
const BodyWalk = @import("body_layer.zig").BodyWalk;
const EditBuffer = panes.Text.EditBuffer;
-/// The theme's colours as a terminal's paint takes them.
-pub fn inkOf(theme: *const pardes.LegacyTheme) Term.Ink {
- return .{
- .fg = theme.fg,
- .bg = theme.bg,
- .tag_fg = theme.tag_fg,
- .tag_bg = theme.tag_bg,
- .palette = theme.palette,
- .base = theme.palette orelse .{
- theme.bg orelse theme.tag_bg,
- theme.kw,
- theme.str,
- theme.num,
- theme.box,
- theme.sel_bg,
- theme.comment,
- theme.fg orelse theme.tag_fg,
- theme.lineno,
- theme.kw,
- theme.str,
- theme.num,
- theme.scroll_thumb,
- theme.sel_fg,
- theme.tag_fg,
- theme.fg orelse theme.tag_fg,
- },
- };
+/// The theme's colours as a terminal's paint takes them (Chrome's: its page,
+/// text, faint and sixteen); a theme that leaves them to the host (`dark`)
+/// leaves them to a tty, and a window draws its own (DESIGN.md R14).
+pub fn inkOf(p: *const Pardes) Term.Ink {
+ const c = p.chrome();
+ return .{ .fg = c.page.text, .bg = c.page.ground, .dim = c.page.dim, .ansi = c.ansi, .host = c.host_page and !p.view().frontend.windowed };
}
/// Its program's colours over the body's rows, through the theme's filter
@@ -85,7 +64,7 @@ pub fn recolor(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw
{
const tz_paint = tracy.zone(@src(), "termPaint");
defer tz_paint.end();
- const ink = inkOf(p.theme());
+ const ink = inkOf(p);
Term.paint(state, &ink, &p.tty_filter_palette, pane.tty_filter, pane.scrolled_to, @intCast(lo), cols, cells, rows);
}
const filtered = pane.tty_filter;
@@ -453,15 +432,15 @@ pub fn recolorDiffOutput(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, t
}
if (lo > hi) return;
const styles = syntax.highlightDiffRows(arena, flat, lo, hi, true) catch return;
- const tints: Colors.Grounds = .of(p.theme());
- const ink = p.theme().fg orelse p.theme().tag_fg;
+ const chrome = p.chrome();
const body_y = p.bodyTop(pane, r);
shown = std.mem.splitScalar(u8, body, '\n');
for (views, 0..) |maybe, vr| {
const line = shown.next() orelse break;
const view = maybe orelse continue;
const base = @intFromPtr(rows[view.row].ptr) - flat_start - lo;
- const tint = if (base < styles.len) tints.forStyle(styles[base]) else null;
+ const lead: u8 = if (base < styles.len) styles[base] else 0;
+ const tint: ?Colors.Chrome.Diff = if (lead & syntax.ground_add != 0) chrome.add else if (lead & syntax.ground_del != 0) chrome.del else null;
if (tint) |t| s.tint(tx, body_y + @as(u16, @intCast(vr)), tw, t.row, null);
var c: usize = 0;
var screen_c: usize = 0;
@@ -478,7 +457,7 @@ pub fn recolorDiffOutput(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, t
else if (panes.File.synStyle(p, @fromBackingInt(@intCast(style & syntax.syn_bits)))) |ss|
ss
else if (tint != null)
- .{ .fg = ink, .bold = false }
+ .{ .fg = chrome.page.text, .bold = false }
else
null;
if (paint) |ss| {
diff --git a/core/body_layer.zig b/core/body_layer.zig
index 513f9a6d..a1d76784 100644
--- a/core/body_layer.zig
+++ b/core/body_layer.zig
@@ -148,21 +148,12 @@ pub fn paintPointerSelection(
}
}
-/// The selection colour of each pointer button's sweep: the select button's
-/// and the look and exec buttons', each tinted toward its own accent.
-pub fn buttonTints(th: *const colors.LegacyTheme) [3][3]u8 {
- if (th.sweep_bg) |own| return own;
- const accent2 = if (std.mem.eql(u8, &th.num, &th.str)) th.comment else th.num;
- return .{
- colors.mix(th.sel_bg, colors.mix(th.sel_bg, th.kw)),
- colors.mix(th.sel_bg, colors.mix(th.sel_bg, th.str)),
- colors.mix(th.sel_bg, colors.mix(th.sel_bg, accent2)),
- };
-}
-
-/// The ink over each button's sweep.
-pub fn buttonInks(th: *const colors.LegacyTheme) [3][3]u8 {
- return th.sweep_fg orelse @splat(th.sel_fg);
+/// The rail's column in the theme's rail and thumb, and the column right
+/// of it the page.
+fn paintRail(c: *const colors.Chrome, s: *Surface, bar: pardes.Region) void {
+ s.fill(bar.rect.x, bar.rect.y, 1, bar.rect.h, .{ .bg = .{ .rgb = c.rail } });
+ s.fill(bar.rect.x + 1, bar.rect.y, 1, bar.rect.h, .{ .bg = if (c.host_page) .default else .{ .rgb = c.page.ground } });
+ s.fill(bar.rect.x, bar.rect.y + bar.thumb_y, 1, bar.thumb_h, .{ .bg = .{ .rgb = c.rail_thumb } });
}
/// A pane's body, painted once. A file body with compact tree-sitter
@@ -221,14 +212,7 @@ pub fn joinBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
if (layer.cursor) |cursor| if (cursor.y < viewport_rows) {
s.cursor = .{ .x = body.rect.x + cursor.x, .y = body.rect.y + cursor.y, .bar = cursor.bar };
};
- const chrome = p.chromeTheme();
- const theme = p.theme();
- const pane_bg: Color = if (theme.bg) |c| .{ .rgb = c } else .default;
- if (rail.rect.h > 0) {
- s.fill(rail.rect.x, rail.rect.y, 1, rail.rect.h, .{ .bg = .{ .rgb = chrome.scroll_track } });
- s.fill(rail.rect.x + 1, rail.rect.y, 1, rail.rect.h, .{ .bg = pane_bg });
- s.fill(rail.rect.x, rail.rect.y + rail.thumb_y, 1, rail.thumb_h, .{ .bg = .{ .rgb = chrome.scroll_thumb } });
- }
+ if (rail.rect.h > 0) paintRail(p.chrome(), s, rail);
}
fn drawGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw: u16, body_h: u16, active: bool) void {
@@ -239,12 +223,13 @@ fn drawGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw:
const cur_line: i32 = if (active and typing_body) gcrow else std.math.minInt(i32);
// the body's first row, the way renderPane derives it
const body_y = p.bodyTop(pane, r);
- const context_bg = p.theme().tag_bg;
+ const chrome = p.chrome();
+ // The context rows on the tag's ground, as a header.
for (0..@min(pane.context_rows, body_h)) |context_row| {
for (0..tw) |col| {
const cell = s.at(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(context_row)));
cell.default = false;
- cell.style.bg = .{ .rgb = context_bg };
+ cell.style.bg = .{ .rgb = chrome.tag[0].ground };
cell.style.font_role = .tagline;
}
}
@@ -259,10 +244,7 @@ fn drawGutter(p: *Pardes, s: *Surface, pane: *Pane, r: pardes.Rect, tx: u16, tw:
while (c < prefix_width and c < tw) : (c += 1) {
const cell = s.at(tx + c, body_y + vr);
cell.default = false; // paints blank gutter rows too
- cell.style.fg = .{ .rgb = if (on_cursor)
- p.theme().lineno_active orelse p.theme().lineno
- else
- p.theme().lineno };
+ cell.style.fg = .{ .rgb = if (on_cursor) chrome.line_number_current else chrome.line_number };
cell.style.bold = on_cursor;
}
}
@@ -280,7 +262,7 @@ fn drawWrapMarkers(
) void {
if (tw <= panes.File.gutterWidth(pane) + 1) return;
const body_y = p.bodyTop(pane, r);
- const marker_fg = p.chromeTheme().lineno;
+ const marker_fg = p.chrome().line_number;
var row: u16 = 0;
while (row + 1 < pane.wrap_n and row + 1 < body_h) : (row += 1) {
if (pane.wrap_line[row + 1] != pane.wrap_line[row] or pane.wrap_col[row] < 0) continue;
@@ -292,21 +274,20 @@ fn drawWrapMarkers(
}
pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool, rail: ?pardes.Region) !void {
- const th = p.theme();
- const chrome = p.chromeTheme();
+ const c = p.chrome();
const tx = r.x + config.GUTTER;
const tw = r.w - config.GUTTER;
// Below the notice bands: they are stacked at the top of the body the
// way tree-sitter context rows are, so the body starts under them
// rather than being painted over by them.
const body_y = p.bodyTop(pane, r);
- const pane_bg: Color = if (th.bg) |c| .{ .rgb = c } else .default;
- const page_rgb = th.bg orelse th.tag_bg;
+ // A theme that leaves its page to the host leaves it its text too.
+ const pane_bg: Color = if (c.host_page) .default else .{ .rgb = c.page.ground };
// body: emulator rows, prompt rows hidden outside tty mode
const body_h = r.h -| pane.tag_rows;
const body_bottom = r.h;
const body_style: CellStyle = .{
- .fg = if (th.fg) |c| .{ .rgb = c } else .default,
+ .fg = if (c.host_page) .default else .{ .rgb = c.page.text },
.bg = pane_bg,
};
const tz_body = tracy.zone(@src(), "bodyText");
@@ -319,7 +300,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
// the rows, which paint over it.
const sweep = pane.sel[pardes.sel_slot];
if (sweep.state != .none and (sweep.state != .done or pardes.sel_slot == 0) and @min(sweep.r0, sweep.r1) < pane.tag_rows)
- paintPointerSelection(p, s, pane, r, sweep, pane.tag_rows, th.sel_bg, th.sel_fg);
+ paintPointerSelection(p, s, pane, r, sweep, pane.tag_rows, c.sweeps[pardes.sel_slot].ground, c.sweeps[pardes.sel_slot].text);
{
// The rows themselves. `bodyText` above is only the string BUILD;
// this is what writes it into the surface.
@@ -363,16 +344,14 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
tz_color.end();
if (pane.isTerminal()) ansi.images(p, s, pane, id, tx, tw, body_y, body_h);
- const sel_btn = buttonTints(th);
if (p.look_hover_preview) |preview| {
if (preview.pane == id and preview.serial == pane.serial) {
// Preserve body ink, then let every real user selection below
// win over this quiet affordance.
- const preview_bg = colors.mix(page_rgb, colors.mix(page_rgb, th.sel_bg));
if (preview.file_word) |word|
- panes.File.paintWordSelection(p, s, pane, r, word.row, word.lo, word.hi, preview_bg)
+ panes.File.paintWordSelection(p, s, pane, r, word.row, word.lo, word.hi, c.selection_secondary, null)
else if (preview.sel) |sel|
- paintPointerSelection(p, s, pane, r, sel, pane.tag_rows, preview_bg, null);
+ paintPointerSelection(p, s, pane, r, sel, pane.tag_rows, c.selection_secondary, null);
}
}
const modal_hover = if (p.look_hover_preview) |preview|
@@ -385,7 +364,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
// A select sweep over the tag is the tag's selection, painted there
// in the tag's own selection colours.
if (b == pardes.sel_slot and @min(sl.r0, sl.r1) < pane.tag_rows) continue;
- paintPointerSelection(p, s, pane, r, sl, pane.tag_rows, sel_btn[b], buttonInks(th)[b]);
+ paintPointerSelection(p, s, pane, r, sl, pane.tag_rows, c.sweeps[b].ground, c.sweeps[b].text);
}
// A selecting prompt's live result (Prompt.zig), dimmed while its
// field is no regex.
@@ -394,6 +373,17 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
const show_prim = (pane.body.mode == .normal and pane.body.vsel.active) or preview or
(modal_hover and pane.body.vsel.active);
const show_extra = pane.body.mode != .tty and pane.body.nsel > 0;
+ // The primary selection that is the current place (a live `/`, `n`, a
+ // preview select it) is drawn as that place, its solid chip, not the
+ // selection: one meaning, one look; the caret still shows.
+ const on_place = place: {
+ const f = pane.file orelse break :place false;
+ const at = pane.places.current orelse break :place false;
+ if (!pane.places.shows(pane) or at >= pane.places.hits.items.len) break :place false;
+ const range = pane.body.primaryRange(f.content, 0);
+ const hit = pane.places.hits.items[at];
+ break :place hit.start == @min(range.anchor, range.head) and hit.end == @max(range.anchor, range.head);
+ };
if (show_prim or show_extra) {
const vpfx: i32 = if (pane.file != null) panes.File.gutterWidth(pane) else 0;
var si: usize = 0;
@@ -408,14 +398,14 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
} else pane.body.sels[si];
const bnd = edit.cellBounds(sr);
const hover_only = primary and modal_hover and pane.body.mode != .normal and !preview;
- const bg = if (hover_only or (selecting != null and selecting.?.dim))
- colors.mix(page_rgb, colors.mix(page_rgb, th.sel_bg))
- else if (primary)
- th.sel_bg
- else
- colors.mix(th.sel_bg, page_rgb);
+ // The primary on the selection in its ink; every other range,
+ // a hover and a dimmed preview on its faint half, the text's
+ // own ink kept (R7).
+ const full = primary and !hover_only and !(selecting != null and selecting.?.dim);
+ const bg = if (full) c.page.selection.ground else c.selection_secondary;
var vr: i32 = 0;
while (vr + @as(i32, pane.tag_rows) < @as(i32, body_bottom)) : (vr += 1) {
+ if (primary and on_place) break;
const w = pane.wrapAt(p.settings.tab, vr);
if (w.line < bnd.lo_row or w.line > bnd.hi_row) continue;
const visible_line = modal.lineSlice(body, @intCast(vr));
@@ -452,7 +442,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
@as(i32, tw) - 1;
const col: i32 = @max(cstart, vpfx);
const end = @min(cend + 1, tw);
- if (col < end) s.tint(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(vr)), @intCast(end - col), bg, if (hover_only) null else th.sel_fg);
+ if (col < end) s.tint(tx + @as(u16, @intCast(col)), body_y + @as(u16, @intCast(vr)), @intCast(end - col), bg, if (full) c.page.selection.text else null);
}
if (primary and !preview and !hover_only) continue; // the hardware cursor IS the primary's
if (hover_only) continue; // quiet preview preserves the source ink
@@ -473,8 +463,8 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
if (crow >= pane.tag_rows and crow < @as(i32, body_bottom) and ccol >= vpfx and ccol < tw) {
const cell = s.at(tx + @as(u16, @intCast(ccol)), body_y + @as(u16, @intCast(crow - pane.tag_rows)));
cell.default = false;
- cell.style.bg = .{ .rgb = th.sel_fg };
- cell.style.fg = .{ .rgb = th.sel_bg };
+ cell.style.bg = .{ .rgb = c.page.selection.text };
+ cell.style.fg = .{ .rgb = c.page.selection.ground };
}
}
}
@@ -492,7 +482,7 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
if (pane.jump.items.len > 0) labels: {
const flat = edit.flatSurface(p.editor(), &pane.body) catch break :labels;
const letters = config.jump_label_alphabet;
- const style: CellStyle = .{ .fg = .{ .rgb = th.sel_fg }, .bg = .{ .rgb = th.sel_bg }, .bold = true };
+ const style: CellStyle = .{ .fg = .{ .rgb = c.page.selection.text }, .bg = .{ .rgb = c.page.selection.ground }, .bold = true };
for (pane.jump.items, 0..) |word, i| {
if (pane.jump_first) |first| if (i / letters.len != first) continue;
var at = @min(word.anchor, word.head);
@@ -563,14 +553,10 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
if (pane.file != null) try pardes.Prompt.ghosts(p, s, arena, pane, r, body_h);
// A code action's edit, previewed (Pick.zig).
if (pane.file != null) try pardes.Pick.ghosts(p, s, arena, pane, r, body_h);
- if (rail) |bar| if (bar.rect.h > 0) {
- // The rail covers the notice bands too: nothing else paints those
- // two gutter columns, so a gap there keeps the frame-wide border
- // fill and reads as a notch cut out of the scrollbar.
- s.fill(bar.rect.x, bar.rect.y, 1, bar.rect.h, .{ .bg = .{ .rgb = chrome.scroll_track } });
- s.fill(bar.rect.x + 1, bar.rect.y, 1, bar.rect.h, .{ .bg = pane_bg });
- s.fill(bar.rect.x, bar.rect.y + bar.thumb_y, 1, bar.thumb_h, .{ .bg = .{ .rgb = chrome.scroll_thumb } });
- };
+ // The rail covers the notice bands too: nothing else paints those two
+ // gutter columns, so a gap there keeps the frame-wide border fill and
+ // reads as a notch cut out of the scrollbar.
+ if (rail) |bar| if (bar.rect.h > 0) paintRail(c, s, bar);
}
/// A message at the lines it names, drawn and never written (SPEC §10.2,
@@ -585,9 +571,8 @@ pub fn renderBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane
fn messageGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y: u16, body_h: u16) void {
const Messages = pardes.Messages;
const f = pane.file.?;
- const chrome = p.chromeTheme();
- const th = p.theme();
- const pane_bg: Color = if (th.bg) |c| .{ .rgb = c } else .default;
+ const page = &p.chrome().page;
+ const pane_bg: Color = if (p.chrome().host_page) .default else .{ .rgb = page.ground };
const Hit = struct { line: usize, said: *const Messages.Said, place: *const Messages.Place };
var hits: [Messages.max_live * Messages.Said.max_places]Hit = undefined;
var n: usize = 0;
@@ -615,7 +600,7 @@ fn messageGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y:
if (at < tw) {
var buf: [160]u8 = undefined;
const words = std.fmt.bufPrint(&buf, "{s} {s}", .{ hit.said.kind.glyph(), hit.place.text.slice() }) catch &buf;
- _ = s.print(tx + @as(u16, @intCast(at)), body_y + row, @intCast(tw - at), words, .{ .fg = .{ .rgb = Messages.ink(chrome, hit.said.kind) }, .bg = pane_bg });
+ _ = s.print(tx + @as(u16, @intCast(at)), body_y + row, @intCast(tw - at), words, .{ .fg = .{ .rgb = Messages.inkOn(page, hit.said.kind) }, .bg = pane_bg });
}
if (pane.ghost_rows > 0 and row == pane.ghost_at) detail = hit.said;
}
@@ -634,7 +619,7 @@ fn messageGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y:
for (said.detail[0..k], 0..) |*text, i| {
const y = body_y + under_row + 1 + @as(u16, @intCast(i));
s.fill(tx, y, tw, 1, .{ .bg = pane_bg });
- if (gutter + 2 < tw) _ = s.print(tx + gutter + 2, y, tw - gutter - 2, text.slice(), .{ .fg = .{ .rgb = Messages.ink(chrome, said.kind) }, .bg = pane_bg });
+ if (gutter + 2 < tw) _ = s.print(tx + gutter + 2, y, tw - gutter - 2, text.slice(), .{ .fg = .{ .rgb = Messages.inkOn(page, said.kind) }, .bg = pane_bg });
}
}
@@ -682,7 +667,7 @@ fn drawnRow(p: *Pardes, arena: std.mem.Allocator, id: usize, row: usize) !?[]con
/// number (the one a prompt's current place has, Prompt.paintGutter), on
/// each row it wraps onto.
fn paintLanding(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, tx: u16, tw: u16, body_h: u16, line: usize) void {
- const roles = &p.chromeTheme().roles;
+ const c = p.chrome();
const gutter = File.gutterWidth(pane);
const number = gutter -| File.laneCells(pane) -| pane.layers.heat -| 1;
const body_y = p.bodyTop(pane, r);
@@ -693,18 +678,19 @@ fn paintLanding(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, tx: u16, tw: u16,
for (gutter..tw) |x| {
const cell = s.at(tx + @as(u16, @intCast(x)), body_y + vr);
cell.default = false;
- cell.style.bg = .{ .rgb = roles.hit };
+ cell.style.bg = .{ .rgb = c.hit };
}
if (gutter > 0 and w.at == 0) {
var style = s.at(tx + number, body_y + vr).style;
- style.fg = .{ .rgb = roles.key };
+ style.fg = .{ .rgb = c.page.key };
s.set(tx + number, body_y + vr, "▸", style);
}
}
}
-/// The landing line's matched span (a Grep's match at the row's column) on
-/// the current hit's ground, over the places lit on it (UX D7).
+/// The landing line's matched span (a Grep's match at the row's column) as
+/// the current hit, solid in the hue with the page's ink, over the places
+/// lit on it (UX D7, R8).
fn paintLandingSpan(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, f: *panes.File.State, line: usize) void {
if (!pane.places.shows(pane)) return;
const hits = pane.places.hits.items;
@@ -713,7 +699,7 @@ fn paintLandingSpan(p: *Pardes, s: *Surface, pane: *Pane, r: Rect, f: *panes.Fil
var i = panes.Places.firstFrom(hits, ls);
while (i < hits.len and hits[i].start <= caret) : (i += 1) {
if (hits[i].end <= caret) continue;
- File.paintWordSelection(p, s, pane, r, @intCast(line), @intCast(hits[i].start - ls), @intCast(hits[i].end - ls), p.chromeTheme().roles.hit_current);
+ File.paintWordSelection(p, s, pane, r, @intCast(line), @intCast(hits[i].start - ls), @intCast(hits[i].end - ls), p.chrome().hit_current, p.chrome().hit_current_text);
return;
}
}
@@ -768,9 +754,7 @@ fn paintTargets(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
.hi = if (line == last) to - lineStart(f, line) else File.sourceLine(pane, @intCast(line)).len,
.to_edge = line != last,
};
- const th = p.theme();
- const page = th.bg orelse th.tag_bg;
- paintSourceSelection(p, s, pane, r, rows, colors.mix(page, colors.mix(page, th.sel_bg)), null);
+ paintSourceSelection(p, s, pane, r, rows, p.chrome().selection_secondary, null);
return;
}
if (cur.root != .goto and cur.root != .next and cur.root != .prev) return;
@@ -796,7 +780,7 @@ fn paintTargets(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
// row's keys, as many as they hold, right-aligned to its last digit,
// bold in the key ink on the gutter's ground. With no numbers, over
// the line's first cells on the selection's ground. Never a shift.
- const ink = p.chromeTheme().roles.key;
+ const ink = p.chrome().page.key;
const number = File.gutterWidth(pane) -| File.laneCells(pane) -| pane.layers.heat -| 1;
const cells = @min(if (number > 0) number else tw, tw);
for (rows[0..n], 0..) |row, i| {
@@ -811,7 +795,7 @@ fn paintTargets(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
for (rows[i..n], keys[i..n]) |other, key| {
if (other != row) continue;
if (x >= (if (number > 0) cells else shown)) break;
- const bg = if (number > 0) s.at(tx + x, y).style.bg else pardes.Color{ .rgb = p.theme().sel_bg };
+ const bg = if (number > 0) s.at(tx + x, y).style.bg else pardes.Color{ .rgb = p.chrome().page.selection.ground };
s.set(tx + x, y, bindings.keyName(key), .{ .fg = .{ .rgb = ink }, .bg = bg, .bold = true });
x += 1;
}
@@ -844,13 +828,14 @@ fn hoverGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y: u
const from = @as(usize, body_y + dst - k) * s.cols + tx;
@memcpy(s.cells[to..][0..tw], s.cells[from..][0..tw]);
}
- const th = p.theme();
- const style: CellStyle = .{ .fg = .{ .rgb = th.tag_fg }, .bg = .{ .rgb = th.tag_bg } };
+ // On the tag's ground in its ink, as a header.
+ const tag = &p.chrome().tag[0];
+ const style: CellStyle = .{ .fg = .{ .rgb = tag.text }, .bg = .{ .rgb = tag.ground } };
const gutter: u16 = File.gutterWidth(pane);
var lines = std.mem.splitScalar(u8, text, '\n');
for (0..k) |i| {
const y = body_y + at + 1 + @as(u16, @intCast(i));
- s.fill(tx, y, tw, 1, .{ .bg = .{ .rgb = th.tag_bg } });
+ s.fill(tx, y, tw, 1, .{ .bg = .{ .rgb = tag.ground } });
if (gutter + 2 < tw) _ = s.print(tx + gutter + 2, y, tw - gutter - 2, lines.next() orelse "", style);
}
}
@@ -865,9 +850,8 @@ fn renameGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y:
const old = @import("lsp/Ask.zig").renamedWord(pane) orelse return;
const new = p.view().tag_state.field.text();
const tab = p.settings.tab;
- const chrome = p.chromeTheme();
- const th = p.theme();
- const added: CellStyle = .{ .fg = .{ .rgb = chrome.diagnostic_hint }, .bg = if (th.bg) |c| .{ .rgb = c } else .default, .bold = true };
+ const chrome = p.chrome();
+ const added: CellStyle = .{ .fg = .{ .rgb = chrome.page.severity[3] }, .bg = if (chrome.host_page) .default else .{ .rgb = chrome.page.ground }, .bold = true };
const wide: u16 = @intCast(@min(File.displayWidth(tab, new), tw));
const gutter: i32 = File.gutterWidth(pane);
var row: u16 = pane.context_rows;
@@ -894,7 +878,7 @@ fn renameGhosts(p: *Pardes, s: *Surface, pane: *Pane, tx: u16, tw: u16, body_y:
while (c < c1) : (c += 1) {
const cell = s.at(tx + c, y);
cell.style.strikethrough = true;
- cell.style.fg = .{ .rgb = chrome.diagnostic_error };
+ cell.style.fg = .{ .rgb = chrome.page.severity[0] };
}
const x: u16 = @intCast(c1);
if (x + wide < tw) {
@@ -1193,6 +1177,12 @@ test "a build error is said where its cause is: the mark on its file's tag, its
// elsewhere.
try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 2, &buf), "three \u{2717} expected 2 argument(s), found 3") != null);
try std.testing.expect(std.mem.indexOf(u8, rowText(s, body.x, body.y + 3, &buf), "four") != null);
+ // In the error's ink on the page (R9).
+ const mark = for (0..body.w) |i| {
+ const cell = s.at(body.x + @as(u16, @intCast(i)), body.y + 2);
+ if (std.mem.eql(u8, cell.grapheme(), "\u{2717}")) break cell;
+ } else return error.TestUnexpectedResult;
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().page.severity[0] }, mark.style.fg);
// The caret on line 3 and its detail asked for (K, UX D13): under the
// line, the rows below two rows down.
pane.body.cur_row = 2;
@@ -1312,7 +1302,7 @@ test "a motion root's level paints its targets in place of their lines' numbers,
try std.testing.expectEqualStrings("p", Field.of(s, gutter, body.y + 4, number, &buf));
const key = s.at(gutter + number - 1, body.y + 4);
try std.testing.expectEqualStrings("p", key.grapheme());
- try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().roles.key }, key.style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().page.key }, key.style.fg);
try std.testing.expect(key.style.bold);
try std.testing.expect(std.mem.indexOfScalar(u8, Field.of(s, gutter, body.y + 5, number, &buf), 'g') != null);
try std.testing.expect(std.mem.indexOfAny(u8, Field.of(s, gutter, body.y + 5, number, &buf), "0123456789") == null);
@@ -1417,3 +1407,118 @@ test "a message's detail unrolls only on request (UX D13): the caret passing its
p.update(.{ .key = .{ .cp = 'K' } });
try std.testing.expectEqual(pardes.TagState.Kind.prompt, p.view().tag_state.kind);
}
+
+test "the body's selections are one family (R7): the primary on the selection in its ink, another range on its faint half in the text's own ink, its head the selection reversed, a B2 sweep on the chrome's exec sweep" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 20 });
+ defer p.deinit();
+ colors.setThemeIndex(p, colors.themeIndex("orchard").?);
+ const pane = try p.setTestFile("alpha beta\ngamma delta\n");
+ const id = p.view().active;
+ pane.focus = .body;
+ // `e` selects alpha, `C` copies it below: gamma the primary.
+ for ("eC") |c| p.update(.{ .key = .{ .cp = c, .text = &[_]u8{c} } });
+ try std.testing.expectEqual(@as(i32, 1), pane.body.cur_row);
+ try std.testing.expect(pane.body.vsel.active and pane.body.nsel == 1);
+ var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
+ defer frame.deinit();
+ const c = p.chrome();
+ const r = p.view().rects[id];
+ const x = r.x + config.GUTTER + panes.File.gutterWidth(pane);
+ const y = p.bodyTop(pane, r);
+ var s = try p.render(frame.allocator());
+ for (0..5) |i| {
+ const primary = s.at(x + @as(u16, @intCast(i)), y + 1).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.selection.ground }, primary.bg);
+ if (i < 4) try std.testing.expectEqual(pardes.Color{ .rgb = c.page.selection.text }, primary.fg);
+ const other = s.at(x + @as(u16, @intCast(i)), y).style;
+ if (i < 4) {
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.selection_secondary }, other.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.text }, other.fg);
+ } else {
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.selection.text }, other.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.page.selection.ground }, other.fg);
+ }
+ }
+ // B2 swept over beta, not let go: the exec sweep.
+ p.update(.{ .mouse = .{ .button = .middle, .kind = .press, .col = x + 6, .row = y } });
+ p.update(.{ .mouse = .{ .button = .middle, .kind = .drag, .col = x + 9, .row = y } });
+ _ = frame.reset(.retain_capacity);
+ s = try p.render(frame.allocator());
+ for (6..10) |i| {
+ const swept = s.at(x + @as(u16, @intCast(i)), y).style;
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.sweeps[1].ground }, swept.bg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = c.sweeps[1].text }, swept.fg);
+ }
+}
+
+test "the body's surfaces take every colour from the chrome: none reads a theme's own fields or the old views (DESIGN.md B6)" {
+ const sources = [_]struct { []const u8, []const u8 }{
+ .{ "body_layer.zig", @embedFile("body_layer.zig") },
+ .{ "Places.zig", @embedFile("Places.zig") },
+ .{ "Query.zig", @embedFile("Query.zig") },
+ .{ "Output.zig", @embedFile("Output.zig") },
+ .{ "Tables.zig", @embedFile("Tables.zig") },
+ .{ "File.zig", @embedFile("File.zig") },
+ .{ "Prompt.zig", @embedFile("Prompt.zig") },
+ .{ "Pick.zig", @embedFile("Pick.zig") },
+ .{ "jj.zig", @embedFile("jj.zig") },
+ .{ "ansi.zig", @embedFile("ansi.zig") },
+ };
+ var wrong: usize = 0;
+ for (sources) |source| {
+ const name, const text = source;
+ // The code, not its tests.
+ const code = text[0 .. std.mem.indexOf(u8, text, "\ntest \"") orelse text.len];
+ // A theme is read for its name alone.
+ var at: usize = 0;
+ while (std.mem.indexOfPos(u8, code, at, "theme()")) |i| : (at = i + 1) {
+ if (std.mem.startsWith(u8, code[i + "theme()".len ..], ".name")) continue;
+ std.debug.print("{s}: a theme's own colours read at byte {d}\n", .{ name, i });
+ wrong += 1;
+ }
+ for ([_][]const u8{ "chromeTheme()", "bodyChrome", ".roles", "Grounds", "LegacyTheme" }) |old| if (std.mem.indexOf(u8, code, old)) |i| {
+ std.debug.print("{s}: `{s}` at byte {d}\n", .{ name, old, i });
+ wrong += 1;
+ };
+ }
+ try std.testing.expectEqual(@as(usize, 0), wrong);
+}
+
+test "a selection that is the current place is drawn as the current place, its solid chip, not the selection: one meaning, one look (the coordinator's ruling on L2b's open point); the caret still shows, and any other selection is the selection" {
+ const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 80, .rows = 24 });
+ defer p.deinit();
+ colors.setThemeIndex(p, colors.themeIndex("orchard").?);
+ const pane = try p.setTestFile("alpha beta\ngamma alpha\nb\n");
+ const c = p.chrome();
+ var frame: std.heap.ArenaAllocator = .init(std.testing.allocator);
+ defer frame.deinit();
+ const r = p.view().rects[0];
+ const x = r.x + config.GUTTER + panes.File.gutterWidth(pane);
+ const y = p.bodyTop(pane, r);
+ const keys = struct {
+ fn typed(q: *Pardes, text: []const u8) void {
+ for (text) |ch| q.update(.{ .key = .{ .cp = ch, .text = &[_]u8{ch} } });
+ }
+ }.typed;
+ // A live `/`: the first place current, and selected.
+ keys(p, "/alpha");
+ try std.testing.expectEqual(@as(?usize, 0), pane.places.current);
+ var s = try p.render(frame.allocator());
+ for (0..5) |i| {
+ const cell = s.at(x + @as(u16, @intCast(i)), y).style;
+ try std.testing.expectEqual(Color{ .rgb = c.hit_current }, cell.bg);
+ try std.testing.expectEqual(Color{ .rgb = c.hit_current_text }, cell.fg);
+ }
+ // Landed, then `n`: the next one current and selected, the same chip,
+ // and the caret on it.
+ p.update(.{ .key = .{ .cp = pardes.Key.enter } });
+ keys(p, "n");
+ try std.testing.expectEqual(@as(?usize, 1), pane.places.current);
+ s = try p.render(frame.allocator());
+ for (6..11) |i| try std.testing.expectEqual(Color{ .rgb = c.hit_current }, s.at(x + @as(u16, @intCast(i)), y + 1).style.bg);
+ try std.testing.expect(s.cursor != null and s.cursor.?.y == y + 1 and s.cursor.?.x >= x + 6 and s.cursor.?.x <= x + 10);
+ // The line selected, past the place: a selection again.
+ keys(p, "x");
+ s = try p.render(frame.allocator());
+ try std.testing.expectEqual(Color{ .rgb = c.page.selection.ground }, s.at(x + 6, y + 1).style.bg);
+}
diff --git a/core/builtins.zig b/core/builtins.zig
index e9df737f..176cabe0 100644
--- a/core/builtins.zig
+++ b/core/builtins.zig
@@ -2046,13 +2046,27 @@ pub const Forward = struct {
/// Reopen the last picker as it was: its rows, marks, cursor and query.
///
/// In the tag of the pane its Enter lands in from this one: this pane if it
-/// reads, else its reader. `SPC '`.
+/// reads, else its reader. `SPC '`; again after its Esc, nothing typed
+/// between, the one before it; Ctrl-o and Ctrl-i in it, the older and newer.
pub const Resume = struct {
pub fn run(c: Ctx) void {
pardes.Pick.resumeFrom(c.p, c.id);
}
};
+/// Pick from the last pickers kept, newest first: Enter reopens one as it was left.
+///
+/// A row each: its source, query, cursor and marks, where it last landed at
+/// its right. The body previews its current row; beside the rows, its
+/// first rows. `SPC f l`, or `'` in a picker's sources (M-h).
+pub const Lists = struct {
+ pub const scope: Scope = .session;
+ pub fn run(c: Ctx) void {
+ if (c.p.panes[c.id] == null) return c.p.reportFailure(c.id, "Lists: open a pane to pick from");
+ pardes.Pick.open(c.p, c.id, .lists, "", "", "");
+ }
+};
+
/// Keep this pane: a reading pane, which a jump steps, is held from now on.
///
/// Its walk leaves its tag (its places, its owner): the next jump from its
diff --git a/core/colors.zig b/core/colors.zig
index eefb2b67..6c83f5c8 100644
--- a/core/colors.zig
+++ b/core/colors.zig
@@ -3,6 +3,7 @@
//! themes programme's), theme files, and switching themes at runtime.
//! What a theme says is theme_schema.zig's.
const pardes = @import("root.zig");
+const builtin = @import("builtin");
const schema = @import("theme_schema.zig");
pub const Theme = schema.Theme;
pub const LegacyTheme = schema.LegacyTheme;
@@ -85,7 +86,7 @@ pub const separator_floor: f32 = 1.5;
/// the GUI's default ground, and a dark terminal's.
pub const null_page: [3]u8 = .{ 18, 18, 18 };
/// The ink of a theme with none, on a dark page and on a light one.
-const null_text: [3]u8 = .{ 0xcc, 0xcc, 0xcc };
+pub const null_text: [3]u8 = .{ 0xcc, 0xcc, 0xcc };
const null_text_light: [3]u8 = .{ 0x22, 0x22, 0x22 };
fn separatorOf(th: *const LegacyTheme) [3]u8 {
const base = th.border orelse th.scroll_track;
@@ -552,10 +553,13 @@ pub const Chrome = struct {
selection_secondary: [3]u8,
/// The pointer buttons' sweeps: select, exec, look (acme's meanings).
sweeps: [3]Theme.Sweep,
- /// Search: a hit's ground, and the current one's ground and ink.
+ /// Search: a hit's ground, and the current one's ground and ink; a
+ /// search's last places while its field is no regex, dimmed: the page
+ /// halfway toward the hit (as `selection_secondary` is the selection's).
hit: [3]u8,
hit_current: [3]u8,
hit_current_text: [3]u8,
+ hit_faint: [3]u8,
add: Diff,
del: Diff,
/// The Changes layer's lanes, a pin each (`lanes_len` of them), and
@@ -584,8 +588,10 @@ pub const Chrome = struct {
/// user's, a path, `Keep`), word (computed command words: the text
/// toward the ground to 4.5:1, H), dim (hints, meta, forward steps),
/// rule (spines), key (the accent: keys, `▶`, the walked word), match
- /// (a query's letters), the four severities, and a selection rebuilt
- /// on it with its own.
+ /// (a query's letters), kind (a symbol's kind mark in a list, `t`,
+ /// `f`: the keyword's hue, which spells a kind in the text, held on the
+ /// ground and on its selection, a list's cursor row), the four
+ /// severities, and a selection rebuilt on it with its own.
pub const Inks = struct {
ground: [3]u8,
text: [3]u8,
@@ -594,6 +600,7 @@ pub const Chrome = struct {
rule: [3]u8,
key: [3]u8,
match: [3]u8,
+ kind: [3]u8,
severity: [4][3]u8,
selection: Selection,
};
@@ -696,12 +703,17 @@ pub const Chrome = struct {
};
const severity = severitiesOn(page, text, candidates, null);
- // R8: the hits' hue and grounds.
+ // R8: the hits' hue and grounds; a theme's own where it is a ground
+ // you see and the text reads on: 1.5:1 off the page, or, where the
+ // text leaves no room for that (no ground 1.5:1 off keeps it its
+ // floor), 1.1:1 with 0.08 OKLab (R0).
const ink_floor = @min(text_floor, contrast(text, page) * 0.9);
- const own_hit: ?[3]u8 = if (th.hit) |own|
- (if (contrast(own, page) >= hit_floor - 0.01 and contrast(text, own) >= ink_floor - 0.01) own else null)
- else
- null;
+ const own_hit: ?[3]u8 = if (th.hit) |own| own: {
+ const off = contrast(own, page);
+ const no_room = contrast(text, page) < hit_floor * ink_floor;
+ const seen = off >= hit_floor - 0.01 or (no_room and off >= 1.1 and oklabDistance(labOf(own), labOf(page)) >= 0.08);
+ break :own if (seen and contrast(text, own) >= ink_floor - 0.01) own else null;
+ } else null;
var hue = severity[1];
if (own_hit) |own| {
hue = own;
@@ -725,6 +737,7 @@ pub const Chrome = struct {
// ink (vim's IncSearch): room for it in every theme.
c.hit_current = hold(hue, &.{page}, text_floor);
c.hit_current_text = page;
+ c.hit_faint = mixOklab(page, c.hit, 0.5);
// Every ground's inks; on the tags and the status row, the
// tag's selection rebuilt on each where it stands too near it.
@@ -791,6 +804,11 @@ pub const Chrome = struct {
// R10: the lanes (the accents but green and red, hue-sorted) and
// churn's steps from the line numbers' ink to the deleted hue.
c.lanes_len = lanesOf(.{ ansi[3], ansi[4], ansi[5], ansi[6], th.number, th.keyword }, .{ th.deleted orelse ansi[1], th.added orelse ansi[2] }, &c.lanes);
+ // A theme with no accent (a grey one) draws its lanes in one grey.
+ if (c.lanes_len == 0) {
+ c.lanes[0] = c.line_number;
+ c.lanes_len = 1;
+ }
for (&c.heat, 1..) |*h, k| h.* = mixOklab(c.line_number, th.deleted orelse ansi[1], @as(f32, @floatFromInt(k)) / 8);
return c;
}
@@ -971,6 +989,7 @@ fn groundInks(th: *const Theme, ground: [3]u8, text: [3]u8, sel: [3]u8, sel_text
.rule = line.toward(Chrome.rule_ink),
.key = hold(th.accent, &.{ground}, Chrome.text_floor),
.match = hold(hue, &.{ground}, Chrome.text_floor),
+ .kind = hold(th.keyword, &.{ ground, sel }, Chrome.text_floor),
.severity = severity,
.selection = .{
.ground = sel,
@@ -1044,42 +1063,28 @@ fn hsvApart(a: [3]u8, b: [3]u8) f32 {
}
/// The ink a syntax class is drawn in; a byte of none keeps its text's own.
-pub fn synInk(th: *const LegacyTheme, sy: @import("syntax.zig").Syn) ?[3]u8 {
+pub fn synInk(th: *const Theme, sy: @import("syntax.zig").Syn) ?[3]u8 {
return switch (sy) {
.none => null,
- .keyword => th.kw,
- .string => th.str,
- .number => th.num,
+ .keyword => th.keyword,
+ .string => th.string,
+ .number => th.number,
.comment => th.comment,
};
}
/// The grounds a style byte's high bits name (syntax.ground_add and the
-/// rest) in a theme: a row added or removed on a ground a little way from
-/// the page toward the theme's green or red (its own ANSI ones where it has
-/// a palette), a stronger one, a faint one, and the row's marker in that
-/// hue, pushed toward the ink until it reads on the row's ground. Syntax
-/// colours are drawn over a ground unchanged.
+/// rest) in a theme, for the library: its chrome's added and deleted rows
+/// (R10). Syntax colours are drawn over a ground unchanged.
pub const Grounds = struct {
add: Ground,
del: Ground,
- pub const Ground = struct { row: [3]u8, emph: [3]u8, line: [3]u8, ink: [3]u8 };
-
- pub fn of(th: *const LegacyTheme) Grounds {
- const page = th.bg orelse th.tag_bg;
- const ink = th.fg orelse th.tag_fg;
- const green: [3]u8 = if (th.palette) |pal| pal[2] else .{ 0x2e, 0xa0, 0x43 };
- const red: [3]u8 = if (th.palette) |pal| pal[1] else .{ 0xcf, 0x22, 0x2e };
- return .{ .add = ground(page, ink, green), .del = ground(page, ink, red) };
- }
+ pub const Ground = Chrome.Diff;
- fn ground(page: [3]u8, ink: [3]u8, hue: [3]u8) Ground {
- const row = mixOklab(page, hue, 0.18);
- var marker = hue;
- var step: usize = 0;
- while (step < 4 and contrast(marker, row) < 3) : (step += 1) marker = mixOklab(marker, ink, 0.4);
- return .{ .row = row, .emph = mixOklab(page, hue, 0.28), .line = mixOklab(page, hue, 0.07), .ink = marker };
+ pub fn of(th: *const Theme) Grounds {
+ const c = Chrome.of(th);
+ return .{ .add = c.add, .del = c.del };
}
/// The ground of a byte's hue, if it has one.
@@ -1091,27 +1096,37 @@ pub const Grounds = struct {
}
};
-/// One family, its twelve backgrounds a theme each (`curated`).
+/// One family, its eight backgrounds a theme each (`curated`).
const seoul256 = @import("themes/seoul256.zig");
const curated = struct {
+ // DESIGN.md E's groups, the picker's sections (`theme_groups`): pardes's
+ // own, dark first (the host's page, the favourite), orchard the default
+ // (`default_theme`, by name).
+ pub const dark = @import("themes/dark.zig");
+ pub const light = @import("themes/light.zig");
pub const orchard = @import("themes/orchard.zig");
- pub const dusk = @import("themes/dusk.zig");
+ pub const orchard_black = @import("themes/orchard_black.zig");
pub const ink = @import("themes/ink.zig");
+ pub const mono = @import("themes/mono.zig");
+ pub const okabe = @import("themes/okabe.zig");
+ pub const sepia = @import("themes/sepia.zig");
pub const paper = @import("themes/paper.zig");
pub const daybreak = @import("themes/daybreak.zig");
- pub const atelier = @import("themes/atelier.zig");
+ pub const dusk = @import("themes/dusk.zig");
+ pub const lapis = @import("themes/lapis.zig");
+ // Pardes's, after a classic.
pub const forge = @import("themes/forge.zig");
+ pub const forge_black = @import("themes/forge_black.zig");
+ pub const forge_soft = @import("themes/forge_soft.zig");
pub const lagoon = @import("themes/lagoon.zig");
pub const solarium = @import("themes/solarium.zig");
pub const spectrum = @import("themes/spectrum.zig");
pub const harvest = @import("themes/harvest.zig");
pub const clay = @import("themes/clay.zig");
- pub const forge_black = @import("themes/forge_black.zig");
- pub const forge_soft = @import("themes/forge_soft.zig");
- pub const orchard_black = @import("themes/orchard_black.zig");
+ // acme's.
pub const acme = @import("themes/acme.zig");
- pub const lapis = @import("themes/lapis.zig");
+ pub const atelier = @import("themes/atelier.zig");
// Faithful ports of well-known themes, a family at a time (core/themes/
// <name>.zig says where each value came from): `theme_groups`.
pub const dark_plus = @import("themes/dark_plus.zig");
@@ -1145,10 +1160,6 @@ const curated = struct {
pub const seoul256_dark_235 = seoul256.dark(235);
pub const seoul256_dark_236 = seoul256.dark(236);
pub const seoul256_dark_237 = seoul256.dark(237);
- pub const seoul256_dark_238 = seoul256.dark(238);
- pub const seoul256_dark_239 = seoul256.dark(239);
- pub const seoul256_light_252 = seoul256.light(252);
- pub const seoul256_light_253 = seoul256.light(253);
pub const seoul256_light_254 = seoul256.light(254);
pub const seoul256_light_255 = seoul256.light(255);
pub const seoul256_light_256 = seoul256.light(256);
@@ -1177,24 +1188,25 @@ const curated = struct {
pub const ayu_light = @import("themes/ayu_light.zig");
pub const doom_one = @import("themes/doom_one.zig");
pub const doom_one_light = @import("themes/doom_one_light.zig");
- // The legacy pair last.
+ // Captured: an old helix setup, kept (it works).
pub const helix = @import("themes/helix.zig");
- pub const dark = @import("themes/dark.zig");
};
-/// A struct of theme files as themes in the old names: each file's
-/// `theme`, a field it leaves out its default.
-fn fold(comptime C: type) [@typeInfo(C).@"struct".decl_names.len]LegacyTheme {
+/// A struct of theme files as themes: each file's `theme`, a field it
+/// leaves out its default.
+fn fold(comptime C: type) [@typeInfo(C).@"struct".decl_names.len]Theme {
comptime {
@setEvalBranchQuota(400000);
- var out: [@typeInfo(C).@"struct".decl_names.len]LegacyTheme = undefined;
- const theme_info = @typeInfo(LegacyTheme).@"struct";
+ var out: [@typeInfo(C).@"struct".decl_names.len]Theme = undefined;
+ const theme_info = @typeInfo(Theme).@"struct";
for (@typeInfo(C).@"struct".decl_names, 0..) |d, i| {
- var t: LegacyTheme = undefined;
+ var t: Theme = undefined;
const source = @field(C, d).theme;
+ for (@typeInfo(@TypeOf(source)).@"struct".field_names) |name| if (!@hasField(Theme, name))
+ @compileError("theme " ++ d ++ " has no field " ++ name ++ " (core/theme_schema.zig)");
for (theme_info.field_names, theme_info.field_types, theme_info.field_attrs) |name, T, attrs| {
@field(t, name) = if (@hasField(@TypeOf(source), name))
- @field(source, name)
+ as(T, @field(source, name))
else if (attrs.defaultValue(T)) |value|
value
else
@@ -1206,30 +1218,40 @@ fn fold(comptime C: type) [@typeInfo(C).@"struct".decl_names.len]LegacyTheme {
}
}
-/// The ring in the old names: what `Pardes.theme()` hands the surfaces
-/// that still read a theme's own fields, until they read `Chrome` (the
-/// themes programme's L2 lines).
-pub const legacy_themes = fold(curated) ++ fold(@import("generated_themes"));
+/// A theme file's literal as the field's type: a struct field by field
+/// (acme's sweeps), which a literal's own struct type does not coerce to.
+fn as(comptime T: type, comptime value: anytype) T {
+ return switch (@typeInfo(T)) {
+ .optional => |o| if (@TypeOf(value) == @TypeOf(null)) null else as(o.child, value),
+ .array => |a| blk: {
+ var out: T = undefined;
+ for (&out, 0..) |*e, i| e.* = as(a.child, value[i]);
+ break :blk out;
+ },
+ .@"struct" => blk: {
+ var out: T = undefined;
+ for (@typeInfo(T).@"struct".field_names) |name| @field(out, name) = as(@FieldType(T, name), @field(value, name));
+ break :blk out;
+ },
+ else => value,
+ };
+}
+
/// The ring: pardes's own (`native_count` of them), then the imported.
-/// The files still speak the old names: renamed here, at comptime.
-pub const themes: [legacy_themes.len]Theme = blk: {
- @setEvalBranchQuota(400000);
- var out: [legacy_themes.len]Theme = undefined;
- for (&out, legacy_themes) |*t, old| t.* = .fromLegacy(old);
- break :blk out;
-};
+pub const themes = fold(curated) ++ fold(@import("generated_themes"));
/// The first `native_count` of `themes` are pardes's own; the rest imported.
pub const native_count = @typeInfo(curated).@"struct".decl_names.len;
/// The picker's sections (`Themes`), in ring order, each running from
/// the theme it names to the next section's; `NextColor` and `Theme` still
-/// see one flat ring. The current pardes themes, then the faithful ports a
-/// family at a time, then the legacy pair (`helix`, captured from an old
-/// helix setup and the boot default before orchard; `dark`, the host
-/// terminal's own ground), then everything imported.
+/// see one flat ring (DESIGN.md E): pardes's own, those after a classic,
+/// acme's, the faithful ports a family at a time, the captured helix setup;
+/// then the imported, a family at a time (`import_heads`).
pub const ThemeGroup = struct { title: []const u8, first: []const u8 };
const theme_groups = [_]ThemeGroup{
- .{ .title = "Pardes themes", .first = "orchard" },
+ .{ .title = "Pardes", .first = "dark" },
+ .{ .title = "Pardes, after a classic", .first = "forge" },
+ .{ .title = "acme", .first = "acme" },
.{ .title = "Visual Studio Code", .first = "dark_plus" },
.{ .title = "Solarized", .first = "solarized_dark" },
.{ .title = "Dracula", .first = "dracula" },
@@ -1243,9 +1265,77 @@ const theme_groups = [_]ThemeGroup{
.{ .title = "Nord", .first = "nord" },
.{ .title = "Ayu", .first = "ayu_dark" },
.{ .title = "Doom One", .first = "doom_one" },
- .{ .title = "Legacy themes", .first = "helix" },
+ .{ .title = "Captured", .first = "helix" },
+};
+
+/// The theme a session starts in, by name: never a place in the ring.
+pub const default_theme = indexOfTheme("orchard");
+
+/// The themes retired (DESIGN.md E, under the user's ruling of 2026-11-25)
+/// and the kept one each stands for where its name is still read: an init
+/// file's `Theme`, a /ctl write, a dump; null, the default.
+const retired = [_]struct { []const u8, ?[]const u8 }{
+ .{ "seoul256_dark_238", "seoul256_dark_237" },
+ .{ "seoul256_dark_239", "seoul256_dark_237" },
+ .{ "seoul256_light_252", "seoul256_light_254" },
+ .{ "seoul256_light_253", "seoul256_light_254" },
+ .{ "ayu_dark_helix", "ayu_dark" },
+ .{ "ayu_dark_zed", "ayu_dark" },
+ .{ "ayu_light_zed", "ayu_light" },
+ .{ "ayu_mirage_zed", "ayu_mirage" },
+ .{ "base16_default_light", "base16_default_dark" },
+ .{ "base16_terminal", "dark" },
+ .{ "base16_transparent", "base16_default_dark" },
+ .{ "bogster_light", "bogster" },
+ .{ "cyan_light", "jetbrains_cyan_light" },
+ .{ "eldritch_transparent", "eldritch" },
+ .{ "gruvbox_dark_hard_zed", "gruvbox_dark_hard" },
+ .{ "gruvbox_dark_soft_zed", "gruvbox_dark_soft" },
+ .{ "gruvbox_dark_zed", "gruvbox" },
+ .{ "gruvbox_light_hard_zed", "gruvbox_light_hard" },
+ .{ "gruvbox_light_soft_zed", "gruvbox_light_soft" },
+ .{ "gruvbox_light_zed", "gruvbox_light" },
+ .{ "gruvbox_material", "gruvbox_material_dark_medium" },
+ .{ "hex_lavender", "hex_toxic" },
+ .{ "hex_poison", "hex_toxic" },
+ .{ "hex_steel", "hex_toxic" },
+ .{ "ingrid", null },
+ .{ "iroaseta", "ao" },
+ .{ "nord_helix", "nord" },
+ .{ "nord_light", "nord" },
+ .{ "nyxvamp_transparent", "nyxvamp_veil" },
+ .{ "peachpuff", "dark" },
+ .{ "seoul256_dark", "seoul256_dark_235" },
+ .{ "seoul256_dark_hard", "seoul256_dark_233" },
+ .{ "seoul256_dark_soft", "seoul256_dark_237" },
+ .{ "seoul256_light", "seoul256_light_254" },
+ .{ "seoul256_light_hard", "seoul256_light_256" },
+ .{ "seoul256_light_soft", "seoul256_light_254" },
+ .{ "term16_dark", "dark" },
+ .{ "term16_light", "light" },
+ .{ "tokyonight", "tokyonight_night" },
+ .{ "ttox", "dark" },
+ .{ "ttox_soft", "dark" },
+ .{ "vesper_transparent", "vesper" },
+ .{ "zed_onedark", "one_dark_zed" },
+ .{ "zed_onelight", "one_light_zed" },
};
+/// The ring's place for the kept theme a retired `name` stands for,
+/// whatever its case.
+pub fn successorOf(name: []const u8) ?usize {
+ for (retired) |r| if (std.ascii.eqlIgnoreCase(r[0], name)) return if (r[1]) |kept| themeIndex(kept).? else default_theme;
+ return null;
+}
+
+/// The theme a dump naming `name` restores: that one, a retired one's
+/// successor, else the one in effect (`was`) where this build has it, else
+/// the default.
+pub fn restoredIndex(name: []const u8, was: usize) usize {
+ for (themes, 0..) |t, i| if (std.mem.eql(u8, t.name, name)) return i;
+ return successorOf(name) orelse if (was < themes.len) was else default_theme;
+}
+
fn indexOfTheme(comptime name: []const u8) usize {
return comptime blk: {
@setEvalBranchQuota(100000);
@@ -1257,12 +1347,38 @@ fn indexOfTheme(comptime name: []const u8) usize {
/// The heading of the picker section that starts at ring index `index`.
pub fn groupAt(index: usize) ?[]const u8 {
inline for (theme_groups) |g| if (index == comptime indexOfTheme(g.first)) return g.title;
- if (index == native_count) return "Imported themes (helix, zed)";
- return null;
+ return if (index >= native_count) import_heads[index - native_count] else null;
}
-/// Original and classic-inspired Pardes palettes precede retained imports.
-pub const native_theme_count = 15;
+/// A theme's family: its name's first word (gruvbox_dark_hard's gruvbox).
+fn familyOf(name: []const u8) []const u8 {
+ return name[0 .. std.mem.indexOfScalar(u8, name, '_') orelse name.len];
+}
+
+/// The imported themes' headings, a family's at its first (DESIGN.md E: a
+/// heading per family, not one flat run), and one over the lone ones the
+/// generator rings after every family (tools/gen_themes.zig `byFamily`).
+const import_heads: [themes.len - native_count]?[]const u8 = blk: {
+ @setEvalBranchQuota(2_000_000);
+ const imported = themes[native_count..];
+ var out: [imported.len]?[]const u8 = @splat(null);
+ var lone_seen = false;
+ for (imported, 0..) |t, i| {
+ const family = familyOf(t.name);
+ var members: usize = 0;
+ for (imported) |u| {
+ if (std.mem.eql(u8, familyOf(u.name), family)) members += 1;
+ }
+ if (members < 2) {
+ if (!lone_seen) out[i] = "Imported, one of a kind";
+ lone_seen = true;
+ } else if (i == 0 or !std.mem.eql(u8, familyOf(imported[i - 1].name), family)) {
+ if (lone_seen) @compileError("imported family " ++ family ++ " rings after a lone theme (tools/gen_themes.zig byFamily)");
+ out[i] = "Imported: " ++ family;
+ }
+ }
+ break :blk out;
+};
comptime {
if (themes.len > std.math.maxInt(u16) + 1)
@@ -1288,17 +1404,13 @@ pub const ChromeTheme = struct {
border: [3]u8,
empty_col: [3]u8,
search_bg: [3]u8,
- search_fg: [3]u8,
tag_reading_bg: [3]u8,
diagnostic_error: [3]u8,
diagnostic_warning: [3]u8,
- diagnostic_info: [3]u8,
- diagnostic_hint: [3]u8,
box: [3]u8,
box_dim: [3]u8,
column_box: [3]u8,
column_box_dim: [3]u8,
- lineno: [3]u8,
scroll_track: [3]u8,
scroll_thumb: [3]u8,
roles: Roles,
@@ -1307,14 +1419,25 @@ pub const ChromeTheme = struct {
/// the surfaces that still read them until they do (the themes
/// programme's L2 lines), so no frame moves before its surface does.
resolved: Chrome,
+ /// The theme in the old names (`Pardes.theme()`), for what still reads
+ /// a theme's own fields: a ThemeFile in them, itself; any other theme's
+ /// filled from its chrome where the new names derive (`viewOf`).
+ view: LegacyTheme,
/// A theme in the old names' chrome.
pub fn fromTheme(th: *const LegacyTheme) ChromeTheme {
- return .of(&.fromLegacy(th.*), th);
+ return .of(&.fromLegacy(th.*), th, .of(&.fromLegacy(th.*)));
+ }
+
+ /// A theme in the new names' chrome: the ring's, a ThemeFile's.
+ pub fn ofTheme(theme: *const Theme) ChromeTheme {
+ const resolved: Chrome = .of(theme);
+ return .of(theme, &viewOf(theme, &resolved), resolved);
}
- /// A theme's chrome, from the theme and its old names' view.
- pub fn of(theme: *const Theme, th: *const LegacyTheme) ChromeTheme {
+ /// A theme's chrome, from the theme, its old names' view and what B4
+ /// derives of it.
+ fn of(theme: *const Theme, th: *const LegacyTheme, resolved: Chrome) ChromeTheme {
const active_bg = focusTint(th);
const active_fg = th.tag_active_fg orelse th.tag_fg;
// A name is always tinted: a theme that names no tint gets one of
@@ -1336,26 +1459,45 @@ pub const ChromeTheme = struct {
.border = separatorOf(th),
.empty_col = th.empty_col orelse separatorOf(th),
.search_bg = th.search_bg orelse th.sel_bg,
- .search_fg = th.search_fg orelse th.sel_fg,
.tag_reading_bg = reading,
// A theme's error ink, else its palette's red (UX E3).
.diagnostic_error = th.diagnostic_error orelse if (th.palette) |pal| pal[1] else (th.fg orelse th.tag_fg),
.diagnostic_warning = th.diagnostic_warning orelse (th.fg orelse th.tag_fg),
- .diagnostic_info = th.diagnostic_info orelse (th.fg orelse th.tag_fg),
- .diagnostic_hint = th.diagnostic_hint orelse (th.fg orelse th.tag_fg),
- .box = th.box,
+ // The focused grip the chrome's (the accent held 3:1, R6).
+ .box = resolved.grip.focus,
.box_dim = th.box_dim,
.column_box = th.column_box orelse th.num,
.column_box_dim = th.column_box_dim orelse mix(th.column_box orelse th.num, th.tag_bg),
- .lineno = th.lineno,
.scroll_track = th.scroll_track,
.scroll_thumb = th.scroll_thumb,
.roles = .of(th, th.tag_bg, active_bg, reading),
- .resolved = .of(theme),
+ .resolved = resolved,
+ .view = th.*,
};
}
};
+/// A theme in the new names as the old names say it: the fields they
+/// require and the new ones derive, from its chrome. `box_dim`, a resting
+/// grip's fill: the tag's own ground where the theme rings its grips itself
+/// (acme's clean button, R6), else the resting ring. The focused name the
+/// chrome's, unless it lands on the theme's own focused ink, which the old
+/// surfaces draw unheld (ferra's #fecdb2): then the plain tag's.
+fn viewOf(theme: *const Theme, r: *const Chrome) LegacyTheme {
+ const fill = if (theme.grip_ring != null) r.tag[0].ground else r.grip.ring;
+ const own_focus_ink = theme.tag_focus_text orelse theme.tag_text;
+ const focused_name = if (std.mem.eql(u8, &r.name[1], &own_focus_ink)) r.name[0] else r.name[1];
+ return theme.toLegacy(.{
+ .sel_fg = r.page.selection.text,
+ .lineno = r.line_number,
+ .scroll_track = r.rail,
+ .scroll_thumb = r.rail_thumb,
+ .box_dim = fill,
+ .tag_active_name_fg = focused_name,
+ .column_box_dim = r.grip.column_rest,
+ });
+}
+
/// A tag's ground in the walk UI (UX DESIGN.md D4): the plain tag's, the
/// focused one's tint, a reading pane's tint, focused or not (its ink is
/// the focused tag's while it has the keyboard).
@@ -1381,10 +1523,6 @@ pub const Roles = struct {
/// The letters a query matched: an ink, never a ground, 4.5:1 on every
/// tag ground and on the selection.
match: [3]u8,
- /// The body's places and a preview's landing line, and the current
- /// one (its matched span): grounds off the page, its ink on them 4.5:1.
- hit: [3]u8,
- hit_current: [3]u8,
/// A message's ink by its kind (Messages.ink): 4.5:1 on the tags and
/// the page.
err: [3]u8,
@@ -1397,8 +1535,6 @@ pub const Roles = struct {
pub const rule_floor: f32 = 1.8;
pub const rule_ceiling: f32 = 2.5;
pub const ink_floor: f32 = 4.5;
- pub const hit_floor: f32 = 1.5;
- pub const hit_current_floor: f32 = 1.9;
pub const reading_distance: f32 = 0.04;
pub fn on(r: *const Roles, ground: TagGround) *const RoleInks {
@@ -1430,20 +1566,6 @@ pub const Roles = struct {
r.key = pushAway(th.box, &tag_grounds, ink_floor);
r.match = pushAway(matchHue(th), &tag_grounds, ink_floor);
const page = th.bg orelse null_page;
- const body_ink = th.fg orelse th.tag_fg;
- const dark = relativeLuminance(page) < 0.18;
- // The theme's search ground where it stands off the page and the
- // body reads on it; else the page a little way toward its hue (the
- // warm accent's without one). The current one as far past the hit
- // as 32 % is past 18 % (38 past 22 on a light page).
- const hue = th.search_bg orelse th.num;
- const own = th.search_bg != null and contrast(hue, page) >= hit_floor and contrast(body_ink, hue) >= ink_floor;
- const at: f32 = if (own) 1 else if (dark) 0.18 else 0.22;
- r.hit = if (own) hue else hitOf(page, hue, body_ink, at, hit_floor);
- const past: f32 = if (dark) 0.32 / 0.18 else 0.38 / 0.22;
- r.hit_current = hitOf(page, hue, body_ink, at * past, hit_current_floor);
- // Never fainter than the hit, where the ink holds both short.
- if (contrast(r.hit_current, page) < contrast(r.hit, page)) r.hit_current = r.hit;
const message_grounds = [_][3]u8{ plain, focused, reading, page };
const ink = th.fg orelse th.tag_fg;
r.err = pushAway(th.diagnostic_error orelse if (th.palette) |pal| pal[1] else ink, &message_grounds, ink_floor);
@@ -1546,48 +1668,6 @@ fn selectionOf(own: [3]u8, ground: [3]u8, text: [3]u8) [3]u8 {
return best;
}
-/// A ground off `page` toward `hue` at `t` (past 1, beyond the hue, as far
-/// as the gamut goes), held where the body's `ink` reads on it at 4.5:1
-/// (or its own on the page, where that is less); on toward the hue, the
-/// least way that stands off the page at `floor`, where the ink still
-/// reads on it; else moved on toward the ink until it stands off the page
-/// at `floor`, as far as the ink allows.
-fn hitOf(page: [3]u8, hue: [3]u8, ink: [3]u8, t: f32, floor: f32) [3]u8 {
- const a = toOklab(page);
- const b = toOklab(hue);
- const ink_floor = @min(Roles.ink_floor, contrast(ink, page));
- var k = t;
- var c = fromOklab(.{ a[0] + (b[0] - a[0]) * k, a[1] + (b[1] - a[1]) * k, a[2] + (b[2] - a[2]) * k });
- while (contrast(ink, c) < ink_floor and k > 0) {
- k -= t / 50;
- c = fromOklab(.{ a[0] + (b[0] - a[0]) * k, a[1] + (b[1] - a[1]) * k, a[2] + (b[2] - a[2]) * k });
- }
- // Found by halves, seven mixes: the nearer the hue, the further off
- // the page (UX E7 7b: a landing line 1.5:1, its span 1.9:1).
- if (contrast(c, page) < floor and k < 1 and contrast(hue, page) >= floor) {
- var lo = k;
- var hi: f32 = 1;
- var far = hue;
- for (0..7) |_| {
- const mid = (lo + hi) / 2;
- const m = fromOklab(.{ a[0] + (b[0] - a[0]) * mid, a[1] + (b[1] - a[1]) * mid, a[2] + (b[2] - a[2]) * mid });
- if (contrast(m, page) < floor) lo = mid else {
- hi = mid;
- far = m;
- }
- }
- if (contrast(ink, far) >= ink_floor) c = far;
- }
- const start = c;
- var step: f32 = 1;
- while (contrast(c, page) < floor and step <= 50) : (step += 1) {
- const next = mixOklab(start, ink, step / 100);
- if (contrast(ink, next) < ink_floor) break;
- c = next;
- }
- return c;
-}
-
/// A reading pane's tag (UX DESIGN.md D4): the theme's own where it stands
/// off the tag, else the tag shifted toward paper yellow by 0.04 in OKLab
/// and lighter by half that on a dark tag (darker on a light), so it reads
@@ -1765,27 +1845,27 @@ pub fn loadThemeFile(p: *Pardes, generation: u32, bytes: []const u8) bool {
// user's own, an older DumpThemes') is read in them and renamed; its
// old names' view is the file itself.
var theme: Theme = undefined;
- var view: LegacyTheme = undefined;
+ var chrome: ChromeTheme = undefined;
if (inOldNames(source)) {
- view = std.zon.parse.fromSlice(LegacyTheme, options) catch |err| return zonFailed(p, request, err, &diagnostics);
+ const view = std.zon.parse.fromSlice(LegacyTheme, options) catch |err| return zonFailed(p, request, err, &diagnostics);
+ chrome = .fromTheme(&view);
theme = .fromLegacy(view);
} else {
theme = std.zon.parse.fromSlice(Theme, options) catch |err| return zonFailed(p, request, err, &diagnostics);
- const r = Chrome.of(&theme);
- view = theme.toLegacy(.{ .sel_fg = r.page.selection.text, .lineno = r.line_number, .scroll_track = r.rail, .scroll_thumb = r.rail_thumb, .box_dim = r.grip.ring });
+ chrome = .ofTheme(&theme);
}
if (theme.name.len == 0 or theme.name.len > 255) {
themeFileError(p, request, error.InvalidThemeName);
return false;
}
+ var view = chrome.view;
view.name = p.gpa.dupe(u8, theme.name) catch |err| {
themeFileError(p, request, err);
return false;
};
- theme.name = view.name;
+ chrome.view.name = view.name;
- p.theme_chrome = .of(&theme, &view);
- p.body_chrome = .{ .theme = view, .chrome = p.theme_chrome };
+ p.theme_chrome = chrome;
const old = p.custom_theme;
p.custom_theme = view;
if (old) |theme_value| p.gpa.free(theme_value.name);
@@ -1822,13 +1902,9 @@ fn inOldNames(source: [:0]const u8) bool {
}
/// The session's theme's chrome, at its start (Pardes.init, a Restore):
-/// never one the window previews (`previewTheme`); the body's copy of it
-/// (Core.bodyChrome's, keyed by the theme) made with it, not again at the
-/// first frame.
+/// never one the window previews (`previewTheme`).
pub fn finishThemeInitialization(p: *Pardes) void {
- const theme = if (p.custom_theme) |*custom| custom else &legacy_themes[p.settings.theme];
- p.theme_chrome = if (p.custom_theme != null) .fromTheme(theme) else .of(&themes[p.settings.theme], theme);
- p.body_chrome = .{ .theme = theme.*, .chrome = p.theme_chrome };
+ p.theme_chrome = if (p.custom_theme) |*custom| .fromTheme(custom) else .ofTheme(&themes[p.settings.theme]);
}
/// Themes near `name`, a line of them, for a Theme given a name there is
@@ -1908,16 +1984,14 @@ pub fn previewTheme(p: *Pardes, index: ?usize) void {
if (i >= themes.len) return;
if (p.theme_preview) |had| if (had == i) return;
p.theme_preview = @intCast(i);
- p.preview_chrome = .of(&themes[i], &legacy_themes[i]);
- p.body_chrome = .{ .theme = legacy_themes[i], .chrome = p.preview_chrome };
+ p.preview_chrome = .ofTheme(&themes[i]);
}
pub fn setThemeIndex(p: *Pardes, index: usize) void {
if (index >= themes.len or
(p.custom_theme == null and p.theme_file_path.get().len == 0 and
index == @as(usize, p.settings.theme))) return;
- p.theme_chrome = .of(&themes[index], &legacy_themes[index]);
- p.body_chrome = .{ .theme = legacy_themes[index], .chrome = p.theme_chrome };
+ p.theme_chrome = .ofTheme(&themes[index]);
if (p.custom_theme) |theme_value| {
p.custom_theme = null;
p.gpa.free(theme_value.name);
@@ -1932,13 +2006,14 @@ pub fn setThemeIndex(p: *Pardes, index: usize) void {
}
test "every native theme's separators stand off its page, and its focus tint off its tag" {
- for (legacy_themes[0..native_count]) |*theme| {
+ for (themes[0..native_count]) |*ring_theme| {
+ const view = ChromeTheme.ofTheme(ring_theme).view;
+ const theme = &view;
const chrome = ChromeTheme.fromTheme(theme);
const page = theme.bg orelse null_page;
try std.testing.expect(contrast(chrome.border, page) >= separator_floor);
- // A dark page's focused tag is told by its band too, not the grip
- // alone; acme's (light, and acme's own) is told by its button.
- if (relativeLuminance(page) < 0.18) try std.testing.expect(theme.tag_active_bg != null);
+ // A focused tag of its own stands off the plain one (R4 derives the
+ // rest: the ring test's `focus`).
if (theme.tag_active_bg) |own| {
try std.testing.expect(contrast(chrome.tag_active_bg, theme.tag_bg) >= focusTintFloor(theme));
// And its text still reads.
@@ -1949,9 +2024,11 @@ test "every native theme's separators stand off its page, and its focus tint off
}
test "every faithful port meets pardes's chrome floors in its own colours, with nothing left to derive" {
- const first = comptime indexOfTheme("lapis") + 1;
+ const first = comptime indexOfTheme("dark_plus");
const last = comptime indexOfTheme("helix");
- for (legacy_themes[first..last]) |*th| {
+ for (themes[first..last]) |*ring_theme| {
+ const view = ChromeTheme.ofTheme(ring_theme).view;
+ const th = &view;
const chrome = ChromeTheme.fromTheme(th);
const page = th.bg.?;
// Written out already adjusted: the run-time lift and push leave
@@ -1972,11 +2049,8 @@ test "every faithful port meets pardes's chrome floors in its own colours, with
}
test "a derived separator or tint keeps the theme's own when it already stands off" {
- const forge = &legacy_themes[
- for (legacy_themes[0..native_count], 0..) |t, i| {
- if (std.mem.eql(u8, t.name, "forge")) break i;
- } else unreachable
- ];
+ const view = ChromeTheme.ofTheme(&themes[comptime indexOfTheme("forge")]).view;
+ const forge = &view;
const chrome = ChromeTheme.fromTheme(forge);
try std.testing.expectEqual(forge.border.?, chrome.border);
// forge's own tint is 1.23:1 off its tag: pushed on the way it leans.
@@ -2006,22 +2080,34 @@ test "the picker's sections run in ring order and cover it" {
if (n == 0) try std.testing.expectEqual(@as(usize, 0), at) else try std.testing.expect(at > last);
last = at;
}
- try std.testing.expectEqualStrings("Pardes themes", groupAt(0).?);
+ try std.testing.expectEqualStrings("Pardes", groupAt(0).?);
+ try std.testing.expectEqualStrings("dark", themes[0].name);
+ try std.testing.expectEqualStrings("orchard", themes[default_theme].name);
// acme is a current theme, not a legacy one.
try std.testing.expect(indexOfTheme("acme") < indexOfTheme("helix"));
- try std.testing.expect(groupAt(native_count) != null);
+ // The imported a family at a time, each under its heading, the lone
+ // ones last under one.
+ try std.testing.expect(std.mem.startsWith(u8, groupAt(native_count).?, "Imported: "));
+ const gruvbox = for (themes, 0..) |t, i| {
+ if (std.mem.eql(u8, t.name, "gruvbox")) break i;
+ } else unreachable;
+ try std.testing.expectEqualStrings("Imported: gruvbox", groupAt(gruvbox).?);
+ try std.testing.expectEqual(null, groupAt(gruvbox + 1));
+ const lone = for (themes[native_count..], native_count..) |_, i| {
+ if (groupAt(i)) |title| if (std.mem.eql(u8, title, "Imported, one of a kind")) break i;
+ } else unreachable;
+ for (themes[lone + 1 ..], lone + 1..) |_, i| try std.testing.expectEqual(null, groupAt(i));
}
-test "seoul256's twelve backgrounds ring in their order, after Catppuccin and before Zenbones" {
+test "seoul256's eight backgrounds ring in their order, after Catppuccin and before Zenbones" {
const names = [_][]const u8{
- "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",
+ "seoul256_dark_233", "seoul256_dark_234", "seoul256_dark_235", "seoul256_dark_236",
+ "seoul256_dark_237", "seoul256_light_254", "seoul256_light_255", "seoul256_light_256",
};
const first = indexOfTheme("seoul256_dark_233");
- for (names, legacy_themes[first..][0..names.len]) |name, t| try std.testing.expectEqualStrings(name, t.name);
- try std.testing.expectEqualStrings("catppuccin_mocha", legacy_themes[first - 1].name);
- try std.testing.expectEqualStrings("zenbones_light", legacy_themes[first + names.len].name);
+ for (names, themes[first..][0..names.len]) |name, t| try std.testing.expectEqualStrings(name, t.name);
+ try std.testing.expectEqualStrings("catppuccin_mocha", themes[first - 1].name);
+ try std.testing.expectEqualStrings("zenbones_light", themes[first + names.len].name);
}
test "a theme hint drops whole names to fit, never cutting one" {
@@ -2087,7 +2173,7 @@ test "ThemeFile parses ZON atomically and Theme returns to the compiled ring" {
return error.MissingThemeFileRequest;
try std.testing.expectEqualStrings("/tmp/pardes-config/themes/mine.zon", request.path);
- var custom = themes[0];
+ var custom = themes[default_theme];
custom.name = "mine";
custom.page = .{ 1, 2, 3 };
custom.tag = .{ 4, 5, 6 };
@@ -2107,8 +2193,8 @@ test "ThemeFile parses ZON atomically and Theme returns to the compiled ring" {
try std.testing.expectEqualStrings("mine", p.theme().name);
try std.testing.expectEqual(@as(?[3]u8, .{ 1, 2, 3 }), p.theme().bg);
- setThemeIndex(p, 0);
- try std.testing.expectEqualStrings(legacy_themes[0].name, p.theme().name);
+ setThemeIndex(p, default_theme);
+ try std.testing.expectEqualStrings(themes[default_theme].name, p.theme().name);
try std.testing.expect(themeFileRequest(p, request_effect.generation) == null);
const stop = while (p.nextEffect()) |effect| switch (effect) {
.theme_file => |theme_file| break theme_file,
@@ -2118,16 +2204,13 @@ test "ThemeFile parses ZON atomically and Theme returns to the compiled ring" {
}
test "native themes keep text and UI roles readable on their own surfaces" {
- const names = [_][]const u8{ "orchard", "dusk", "ink", "paper", "daybreak", "atelier", "forge", "lagoon", "solarium", "spectrum", "harvest", "clay", "forge_black", "forge_soft", "orchard_black" };
- try std.testing.expectEqual(names.len, native_theme_count);
- for (legacy_themes[0..names.len], names) |th, name| {
- try std.testing.expectEqualStrings(name, th.name);
+ for (designed) |name| {
+ const th = ChromeTheme.ofTheme(&themes[themeIndex(name).?]).view;
const chrome = ChromeTheme.fromTheme(&th);
const minimum: f32 = if (std.mem.eql(u8, name, "ink") or std.mem.eql(u8, name, "daybreak")) 7 else 4.5;
const text_colors = [_][3]u8{
- th.fg.?, th.kw, th.str, th.num, th.comment,
- chrome.diagnostic_error, chrome.diagnostic_warning, chrome.diagnostic_info, chrome.diagnostic_hint,
- };
+ th.fg.?, th.kw, th.str, th.num, th.comment,
+ } ++ chrome.resolved.page.severity;
for (text_colors) |fg| try std.testing.expect(contrast(fg, th.bg.?) >= minimum);
// Gutters are orientation aids, not source text: stay visible without
// competing with comments or pulling attention away from the body.
@@ -2147,20 +2230,25 @@ test "native themes keep text and UI roles readable on their own surfaces" {
try std.testing.expect(contrast(chrome.tag_active_bg, th.tag_bg) <= 1.6);
try std.testing.expect(contrast(chrome.tag_active_fg, th.tag_fg) <= 1.6);
try std.testing.expect(contrast(th.sel_fg, th.sel_bg) >= minimum);
- try std.testing.expect(contrast(chrome.search_fg, chrome.search_bg) >= minimum);
+ try std.testing.expect(contrast(chrome.resolved.hit_current_text, chrome.resolved.hit_current) >= Chrome.text_floor);
// ANSI black can intentionally match the page (for backgrounds). All
// other ANSI foregrounds, including bright black, remain legible.
for (th.palette.?[1..]) |fg| try std.testing.expect(contrast(fg, th.bg.?) >= minimum);
}
}
+/// The natives written before the colour system (DESIGN.md B), each with a
+/// name tint and a column grip of its own: what the tests of their own
+/// values below hold (the ring test holds every theme to B4's floors).
+const designed = [_][]const u8{ "orchard", "dusk", "ink", "paper", "daybreak", "atelier", "forge", "lagoon", "solarium", "spectrum", "harvest", "clay", "forge_black", "forge_soft", "orchard_black" };
+
test "native filename tints change hue without changing perceived lightness" {
- for (legacy_themes[0..native_theme_count]) |th| {
- try std.testing.expect(th.tag_name_fg != null and th.tag_active_name_fg != null);
- const chrome = ChromeTheme.fromTheme(&th);
- const pairs = [2][2][3]u8{
- .{ chrome.tag_fg, chrome.tag_name_fg },
- .{ chrome.tag_active_fg, chrome.tag_active_name_fg },
+ for (designed) |native| {
+ const th = &themes[themeIndex(native).?];
+ // The theme's own tint at its tag ink's lightness (the focused one
+ // Chrome.of's, R13).
+ const pairs = [1][2][3]u8{
+ .{ th.tag_text, th.tag_name.? },
};
for (pairs) |pair| {
const base = toOklab(pair[0]);
@@ -2180,7 +2268,8 @@ test "native filename tints change hue without changing perceived lightness" {
}
test "native dark palettes choose near-black or deliberately soft contrast" {
- for (legacy_themes[0..native_theme_count]) |th| {
+ for (designed) |name| {
+ const th = ChromeTheme.ofTheme(&themes[themeIndex(name).?]).view;
if (contrast(th.bg.?, .{ 0, 0, 0 }) > 10) continue; // light paper
const soft = std.mem.eql(u8, th.name, "dusk") or std.mem.eql(u8, th.name, "lagoon") or
std.mem.eql(u8, th.name, "solarium") or std.mem.eql(u8, th.name, "forge_soft");
@@ -2193,12 +2282,12 @@ test "native dark palettes choose near-black or deliberately soft contrast" {
}
}
const forge = curated.forge.theme;
- try std.testing.expectEqual(forge.bg[0], forge.bg[1]);
+ try std.testing.expectEqual(forge.page[0], forge.page[1]);
// Forge chrome is cool-neutral, never the old green-over-blue mint cast.
- for ([_][3]u8{ forge.tag_bg, forge.tag_active_bg, forge.box, forge.border }) |rgb|
+ for ([_][3]u8{ forge.tag, forge.tag_focus, forge.accent, forge.rule }) |rgb|
try std.testing.expect(rgb[2] >= rgb[1]);
- try std.testing.expectEqual([3]u8{ 0, 0, 0 }, @as([3]u8, curated.forge_black.theme.bg));
- try std.testing.expectEqual([3]u8{ 0, 0, 0 }, @as([3]u8, curated.orchard_black.theme.bg));
+ try std.testing.expectEqual([3]u8{ 0, 0, 0 }, @as([3]u8, curated.forge_black.theme.page));
+ try std.testing.expectEqual([3]u8{ 0, 0, 0 }, @as([3]u8, curated.orchard_black.theme.page));
}
test "line numbers stay quiet without a current-line tag background" {
@@ -2208,11 +2297,12 @@ test "line numbers stay quiet without a current-line tag background" {
const pane = try p.setTestFile("first\nsecond\n");
pane.body.cur_pinned = true;
pane.body.cur_row = 0;
- var custom = legacy_themes[0];
+ var custom = ChromeTheme.ofTheme(&themes[default_theme]).view;
custom.name = try gpa.dupe(u8, "quiet-gutter");
custom.lineno = .{ 70, 70, 70 };
custom.lineno_active = .{ 95, 95, 95 };
p.custom_theme = custom;
+ finishThemeInitialization(p);
p.sync();
const x = p.view().rects[0].x + config.GUTTER;
const y = p.view().rects[0].y + BOX_H;
@@ -2222,10 +2312,13 @@ test "line numbers stay quiet without a current-line tag background" {
try std.testing.expectEqual(Color{ .rgb = custom.bg.? }, surface.at(x, y).style.bg);
try std.testing.expect(surface.at(x, y).style.bold);
try std.testing.expect(!surface.at(x, y + 1).style.bold);
- // Old ThemeFile palettes need no new field, and do not regain the block.
+ // Old ThemeFile palettes need no new field: the current number is the
+ // text toward the page to 4.5:1 (R12), and the block not regained.
p.custom_theme.?.lineno_active = null;
+ finishThemeInitialization(p);
const fallback = try p.render(p.scratch.allocator());
- try std.testing.expectEqual(Color{ .rgb = .{ 70, 70, 70 } }, fallback.at(x, y).style.fg);
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().line_number_current }, fallback.at(x, y).style.fg);
+ try std.testing.expect(contrast(p.chrome().line_number_current, custom.bg.?) >= Chrome.text_floor - 0.05);
try std.testing.expectEqual(Color{ .rgb = custom.bg.? }, fallback.at(x, y).style.bg);
try std.testing.expect(fallback.at(x, y).style.bold);
// Moving the caret clears the previous cue; editing the tag parks it.
@@ -2242,14 +2335,16 @@ test "legacy ThemeFile documents inherit Pardes UI roles without new fields" {
@setEvalBranchQuota(10000);
var encoded: std.Io.Writer.Allocating = .init(std.testing.allocator);
defer encoded.deinit();
- try std.zon.stringify.serialize(curated.helix.theme, .{ .whitespace = false }, &encoded.writer);
- // helix without the focused tag's pair it has since gained: a document
- // written before those fields existed.
+ try std.zon.stringify.serialize(ChromeTheme.ofTheme(&themes[comptime indexOfTheme("helix")]).view, .{ .whitespace = false }, &encoded.writer);
+ // helix without the focused tag's pair it has since gained, and the
+ // names' and column grip's dim fills: a document written before those
+ // fields existed.
var legacy: std.ArrayList(u8) = .empty;
defer legacy.deinit(std.testing.allocator);
var rest: []const u8 = encoded.written();
while (true) {
- const at = @min(std.mem.indexOf(u8, rest, ".tag_active_bg") orelse rest.len, std.mem.indexOf(u8, rest, ".tag_active_fg") orelse rest.len);
+ var at = rest.len;
+ for ([_][]const u8{ ".tag_active_bg", ".tag_active_fg", ".tag_active_name_fg", ".column_box_dim" }) |field| at = @min(at, std.mem.indexOf(u8, rest, field) orelse rest.len);
try legacy.appendSlice(std.testing.allocator, rest[0..at]);
if (at == rest.len) break;
rest = rest[at + std.mem.indexOfScalar(u8, rest[at..], '}').? + 1 ..];
@@ -2279,12 +2374,11 @@ test "legacy ThemeFile documents inherit Pardes UI roles without new fields" {
}
test "column grip colors remain distinct from pane grips across native themes" {
- for (legacy_themes[0..native_theme_count]) |th| {
- try std.testing.expect(th.column_box != null and th.column_box_dim != null);
- const chrome = ChromeTheme.fromTheme(&th);
+ for (designed) |name| {
+ const th = &themes[themeIndex(name).?];
+ // The theme's own (their rest and grabbed inks Chrome.of's, R6, H).
for ([_][2][3]u8{
- .{ chrome.box, chrome.column_box },
- .{ chrome.box_dim, chrome.column_box_dim },
+ .{ th.accent, th.column_grip.? },
}) |pair| {
var distance: u32 = 0;
for (pair[0], pair[1]) |a, b| {
@@ -2294,7 +2388,7 @@ test "column grip colors remain distinct from pane grips across native themes" {
try std.testing.expect(distance >= 30 * 30);
}
}
- var custom = legacy_themes[0];
+ var custom = ChromeTheme.ofTheme(&themes[default_theme]).view;
custom.column_box = .{ 90, 130, 170 };
custom.column_box_dim = null;
var chrome = ChromeTheme.fromTheme(&custom);
@@ -2306,7 +2400,7 @@ test "column grip colors remain distinct from pane grips across native themes" {
}
test "custom filename tints preserve optional active fallback precedence" {
- var theme = legacy_themes[0];
+ var theme = ChromeTheme.ofTheme(&themes[default_theme]).view;
theme.tag_name_fg = null;
theme.tag_active_name_fg = null;
var chrome = ChromeTheme.fromTheme(&theme);
@@ -2328,14 +2422,18 @@ test "custom filename tints preserve optional active fallback precedence" {
}
test "every theme tints its names off the tag's ink, and they read on both grounds" {
- for (&legacy_themes) |*th| {
- const chrome = ChromeTheme.fromTheme(th);
+ for (&themes) |*th| {
+ const c = Chrome.of(th);
const pairs = [2][3][3]u8{
- .{ chrome.tag_fg, chrome.tag_name_fg, chrome.tag_bg },
- .{ chrome.tag_active_fg, chrome.tag_active_name_fg, chrome.tag_active_bg },
+ .{ c.tag[0].text, c.name[0], c.tag[0].ground },
+ .{ c.tag[1].text, c.name[1], c.tag[1].ground },
};
for (pairs) |pair| {
const ink, const name, const ground = pair;
+ // An ink held to the end of the gamut (white or black, H's 7:1
+ // on a mid-grey tag: ao's, modus_vivendi's) has no hue at its
+ // lightness: the name is the ink.
+ if (std.mem.eql(u8, &name, &ink) and (std.mem.eql(u8, &ink, &@as([3]u8, @splat(255))) or std.mem.eql(u8, &ink, &@as([3]u8, @splat(0))))) continue;
const apart = oklabDistance(toOklab(ink), toOklab(name));
const floor = nameTintFloor(ink, ground);
if (apart < name_tint_distance or contrast(name, ground) < floor - 0.01)
@@ -2363,12 +2461,13 @@ test "every theme's walk UI roles meet their floors on every ground they are dra
var checks: std.ArrayList(Check) = .empty;
defer checks.deinit(a);
var failed: usize = 0;
- for (&legacy_themes) |*th| {
+ for (&themes) |*ring_theme| {
+ const view = ChromeTheme.ofTheme(ring_theme).view;
+ const th = &view;
checks.clearRetainingCapacity();
const chrome = ChromeTheme.fromTheme(th);
const r = &chrome.roles;
const page = th.bg orelse null_page;
- const body_ink = th.fg orelse th.tag_fg;
const tags = [_][3]u8{ r.tag[0].ground, r.tag[1].ground, r.tag[2].ground, r.selected[0].ground, r.selected[1].ground, r.selected[2].ground, r.selected[3].ground };
const messages = [_][3]u8{ r.tag[0].ground, r.tag[1].ground, r.tag[2].ground, page };
for (r.tag ++ r.selected ++ [1]RoleInks{r.notice}) |inks| {
@@ -2395,15 +2494,6 @@ test "every theme's walk UI roles meet their floors on every ground they are dra
try checks.append(a, .{ .what = "reading", .got = oklabDistance(toOklab(chrome.tag_reading_bg), toOklab(th.tag_bg)), .floor = Roles.reading_distance });
for ([_][3]u8{ th.tag_fg, th.tag_active_fg orelse th.tag_fg }) |ink|
try checks.append(a, .{ .what = "text on reading", .got = contrast(ink, chrome.tag_reading_bg), .floor = @min(7, contrast(ink, th.tag_bg)) - 0.02 });
- const ink_floor = @min(Roles.ink_floor, contrast(body_ink, page));
- // A preview's landing line 1.5:1 off the page, its matched span (the
- // current hit) a step stronger, 1.9:1 (UX E7 7b: 1.29 read as faint).
- for ([_][3]u8{ r.hit, r.hit_current }, [_]f32{ 1.5, 1.9 }) |ground, floor| {
- const on = contrast(body_ink, ground);
- try checks.append(a, .{ .what = "hit", .got = contrast(ground, page), .floor = if (on < ink_floor + 0.3) 0 else floor });
- try checks.append(a, .{ .what = "ink on hit", .got = on, .floor = ink_floor - 0.01 });
- }
- try checks.append(a, .{ .what = "current over hit", .got = contrast(r.hit_current, page) - contrast(r.hit, page), .floor = 0 });
for (checks.items) |c| if (c.got < c.floor - 0.005) {
failed += 1;
std.debug.print("{s}: {s} {d:.2} under {d:.2}\n", .{ th.name, c.what, c.got, c.floor });
@@ -2417,12 +2507,14 @@ test "neonotte84's and acme's inks on the plain tag, their reading mark and thei
const wants = [_]Want{
// Text, dim, rule and key as D4 derived them; the match the hits'
// amber held on this ground alone (D4's pushed neonotte84's number
- // over all seven grounds at once: #f1a271); the reading mark sky
+ // over all seven grounds at once: #f1a271; L1's #e29e47 the warning
+ // pardes derived, its own palette's since B7, #e59d3c, the current
+ // hit's too); the reading mark sky
// on the grip, 3:1 on both tags (D4 tinted the whole tag #29271e);
// the hit an amber ground 1.5:1 off the page (D4's mixed the
// number in: #47322e) and the current one that amber itself, solid
// (D4's a 1.9:1 ground, #5f3f33).
- .{ .name = "neonotte84", .text = .{ 0xb5, 0xbf, 0xe3 }, .dim = .{ 0x70, 0x76, 0x8f }, .rule = .{ 0x4c, 0x50, 0x63 }, .key = .{ 0xf8, 0xde, 0xd9 }, .match = .{ 0xe2, 0x9e, 0x47 }, .mode = .{ 0x2b, 0x92, 0xbc }, .hit = .{ 0x4c, 0x30, 0x1a }, .hit_current = .{ 0xe2, 0x9e, 0x47 } },
+ .{ .name = "neonotte84", .text = .{ 0xb5, 0xbf, 0xe3 }, .dim = .{ 0x70, 0x76, 0x8f }, .rule = .{ 0x4c, 0x50, 0x63 }, .key = .{ 0xf8, 0xde, 0xd9 }, .match = .{ 0xe5, 0x9d, 0x3c }, .mode = .{ 0x2b, 0x92, 0xbc }, .hit = .{ 0x4c, 0x30, 0x1a }, .hit_current = .{ 0xe5, 0x9d, 0x3c } },
// acme's key and match on its plain tag alone, never held to its
// #9eeeee selection and its reading ground at once (D4's #555583,
// #8f4800): its #8888cc darkened to 4.5:1, its number as it is; the
@@ -2515,7 +2607,7 @@ const RingCheck = enum {
};
/// The checks `th`'s chrome fails.
-fn ringFailures(th: *const Theme, c: *const Chrome) std.EnumSet(RingCheck) {
+fn ringFailures(th: *const Theme, c: *const Chrome, designed_here: bool) std.EnumSet(RingCheck) {
var f: std.EnumSet(RingCheck) = .empty;
const de = struct {
fn of(a: [3]u8, b: [3]u8) f32 {
@@ -2602,7 +2694,15 @@ fn ringFailures(th: *const Theme, c: *const Chrome) std.EnumSet(RingCheck) {
f.setPresent(.severities4, apart4 < Chrome.severity_apart);
const err = lch(c.page.severity[0]);
f.setPresent(.error_red, !(err[1] >= 0.08 and (err[2] <= 50 or err[2] >= 330)));
- f.setPresent(.diff, @min(contrast(c.add.row, page), contrast(c.del.row, page)) < 1.1 or de(c.add.row, c.del.row) < 0.05);
+ // R10: each diff row 1.15:1 off the page, and the two 0.05 apart; a
+ // port's or an import's nearer where its own text holds it (never
+ // under its floor there: tokyonight_day's text, 4.9:1, leaves 1.11:1);
+ // pardes's own themes always (the coordinator's ruling).
+ const diff_floor = @min(4.5, text * 0.9);
+ for ([2][3]u8{ c.add.row, c.del.row }) |row| {
+ if (contrast(row, page) < Chrome.row_step - 0.005 and (designed_here or contrast(ink, row) > diff_floor + 0.05)) f.insert(.diff);
+ }
+ if (de(c.add.row, c.del.row) < 0.05) f.insert(.diff);
var ansi_least: f32 = 21;
for (c.ansi[1..], 1..) |a, i| {
ansi_least = @min(ansi_least, contrast(a, page));
@@ -2620,54 +2720,30 @@ fn ringFailures(th: *const Theme, c: *const Chrome) std.EnumSet(RingCheck) {
const t = contrast(g.text, g.ground);
var low = (n > 0 and t < @min(4.5, reach(g.ground))) or contrast(g.dim, g.ground) < @min(3, t) - 0.01;
for ([2][3]u8{ g.key, g.match } ++ g.severity) |i| low = low or contrast(i, g.ground) < @min(4.5, reach(g.ground));
+ // The kind mark on the ground and on its selection, a list's
+ // cursor row: one ink for both, 4.5:1 where the keyword's hue
+ // reaches it there (held to the end of light, a hue keeps a trace
+ // of itself: #000100 on solarized_dark's grey tag reads 4.49).
+ const both = [2][3]u8{ g.ground, g.selection.ground };
+ const most = leastContrast(hold(th.keyword, &both, 21), &both);
+ low = low or leastContrast(g.kind, &both) < @min(4.5, most) - 0.01;
low = low or contrast(g.selection.text, g.selection.ground) < @min(4.5, reach(g.selection.ground));
if (low) f.insert(.inks);
}
return f;
}
-/// The themes that fail a check they are held to until the line that fixes
-/// them lands (DESIGN.md E1, F): the list shrinks as each does, and a theme
-/// on it that passes fails the test, so it is taken off.
-const ring_expected = [_]struct { []const u8, []const u8 }{
- // L3 (core/themes): the overrides DESIGN.md E1 names.
- .{ "acme", "L3: its own sixteen where pardes's picks read under 3:1 (ANSI 10, 14)" },
- .{ "solarized_dark", "L3: `hit` and `added`/`deleted` of its own" },
- .{ "solarized_light", "L3: `hit` of its own" },
- .{ "seoul256_light_254", "L3: `hit` of its own" },
- .{ "seoul256_light_255", "L3: `hit` of its own" },
- // L4 (tools/gen_themes.zig): B7's mapping, or an import's override.
- .{ "everforest_light", "L4: `hit` of its own" },
- .{ "github_dark_dimmed", "L4: its text from helix's `variable`" },
- .{ "gruvbox_material_light_hard", "L4: `info`/`hint` from its own scopes" },
- .{ "gruvbox_material_light_medium", "L4: `info`/`hint` from its own scopes" },
- .{ "gruvbox_material_light_soft", "L4: `info`/`hint` from its own scopes" },
- .{ "hex_toxic", "L4: `hit` and `added`/`deleted` of its own" },
- // L5: dark's own sixteen (its derived ANSI 8 is 3:1, under the pro 4.5).
- .{ "dark", "L5: its designed ANSI (DESIGN.md C)" },
- // L7: retired.
- .{ "seoul256_dark_238", "L7: retired" },
- .{ "seoul256_dark_239", "L7: retired" },
- .{ "seoul256_light_252", "L7: retired" },
- .{ "seoul256_light_253", "L7: retired" },
- .{ "hex_lavender", "L7: retired" },
- .{ "hex_poison", "L7: retired" },
- .{ "hex_steel", "L7: retired" },
- .{ "ingrid", "L7: retired" },
- // No line: the soft natives' text is 4.5-7:1 by design (the native
- // test below), under the professional 7:1. C1's ruling.
- .{ "dusk", "soft by design: text under the pro 7:1" },
- .{ "lagoon", "soft by design: text under the pro 7:1" },
- .{ "solarium", "soft by design: text under the pro 7:1" },
- .{ "forge_soft", "soft by design: text under the pro 7:1" },
-};
+/// The soft natives: their text 4.5-7:1 by design, held at AA, never the
+/// professional 7:1, and never retuned (the coordinator's ruling; solarium
+/// is the user's).
+const soft_themes = [_][]const u8{ "dusk", "lagoon", "solarium", "forge_soft" };
test "every theme in the ring meets every floor pardes owns (DESIGN.md B4), natives and dark the professional ones too; the original's own colours never moved" {
- const lapis = comptime indexOfTheme("lapis");
- const dark = comptime indexOfTheme("dark");
+ // pardes's own: every theme before the first faithful port (dark and
+ // the new ones among them), and the captured helix's originals.
+ const ports = comptime indexOfTheme("dark_plus");
const helix = comptime indexOfTheme("helix");
var passing: usize = 0;
- var wrong: usize = 0;
for (&themes, 0..) |*th, i| {
const c = Chrome.of(th);
// The original's own (B1.5): never moved.
@@ -2676,58 +2752,110 @@ test "every theme in the ring meets every floor pardes owns (DESIGN.md B4), nati
if (th.page) |own| try std.testing.expectEqual(own, c.page.ground);
if (th.ansi) |own| try std.testing.expectEqual(own, c.ansi);
if (th.line_number) |own| try std.testing.expectEqual(own, c.line_number);
- const ours = i <= lapis or i == dark or i == helix;
- const failures = ringFailures(th, &c);
+ const ours = i < ports or i == helix;
+ const soft = for (soft_themes) |name| {
+ if (std.mem.eql(u8, name, th.name)) break true;
+ } else false;
+ const failures = ringFailures(th, &c, i < ports);
var held: std.EnumSet(RingCheck) = .empty;
var it = failures.iterator();
while (it.next()) |check| {
- if (check.pro() and !(i <= lapis or i == dark)) continue;
+ if (check.pro() and i >= ports) continue;
+ // A soft theme's text is held at AA, 4.5:1, never the pro 7:1.
+ if (soft and (check == .text7 or check == .tag_text7)) continue;
if (check.original() and !ours and !(std.mem.startsWith(u8, @tagName(check), "ansi") and th.ansi == null)) continue;
held.insert(check);
}
- const expected = for (ring_expected) |e| {
- if (std.mem.eql(u8, e[0], th.name)) break true;
- } else false;
- if (held.count() == 0) passing += 1;
- if (held.count() > 0 and !expected) {
- wrong += 1;
- std.debug.print("{s} fails:", .{th.name});
- var failed = held.iterator();
- while (failed.next()) |check| std.debug.print(" {s}", .{@tagName(check)});
- std.debug.print("\n", .{});
- }
- if (held.count() == 0 and expected) {
- wrong += 1;
- std.debug.print("{s} passes now: take it off ring_expected\n", .{th.name});
+ if (held.count() == 0) {
+ passing += 1;
+ continue;
}
+ std.debug.print("{s} fails:", .{th.name});
+ var failed = held.iterator();
+ while (failed.next()) |check| std.debug.print(" {s}", .{@tagName(check)});
+ std.debug.print("\n", .{});
+ }
+ std.debug.print("ring floors: {d} of {d} themes pass\n", .{ passing, themes.len });
+ try std.testing.expectEqual(themes.len, passing);
+}
+
+/// A faithful port's own colours pardes moves where they miss a floor: its
+/// indicators and grounds (B1.6, G4: only that colour, and its file says
+/// so); its text, syntax, comments and sixteen never move (the ring test).
+/// Each with the ground it is held on, for the words its file says.
+fn portMoves(th: *const Theme, c: *const Chrome) [12]struct { role: []const u8, own: ?[3]u8, got: [3]u8, on: [3]u8 } {
+ const page = c.page.ground;
+ return .{
+ .{ .role = "tag ground", .own = th.tag, .got = c.tag[0].ground, .on = page },
+ .{ .role = "focused tag ground", .own = th.tag_focus, .got = c.tag[1].ground, .on = c.tag[0].ground },
+ .{ .role = "focused grip", .own = th.accent, .got = c.grip.focus, .on = c.tag[1].ground },
+ .{ .role = "grip ring", .own = th.grip_ring, .got = c.grip.ring, .on = c.tag[0].ground },
+ .{ .role = "unsaved grip", .own = th.dirty, .got = c.grip.dirty, .on = c.tag[0].ground },
+ .{ .role = "selection", .own = th.selection, .got = c.page.selection.ground, .on = page },
+ .{ .role = "selection text", .own = th.selection_text, .got = c.page.selection.text, .on = c.page.selection.ground },
+ .{ .role = "search hit", .own = th.hit, .got = c.hit, .on = page },
+ .{ .role = "error", .own = th.@"error", .got = c.page.severity[0], .on = page },
+ .{ .role = "warning", .own = th.warning, .got = c.page.severity[1], .on = page },
+ .{ .role = "info", .own = th.info, .got = c.page.severity[2], .on = page },
+ .{ .role = "hint", .own = th.hint, .got = c.page.severity[3], .on = page },
+ };
+}
+
+test "every faithful port's file says each of its own colours pardes moves to meet a floor (DESIGN.md G4)" {
+ const first = comptime indexOfTheme("dark_plus");
+ const last = comptime indexOfTheme("doom_one_light");
+ var unsaid: usize = 0;
+ inline for (@typeInfo(curated).@"struct".decl_names[first .. last + 1], first..) |d, i| {
+ const file = comptime if (std.mem.startsWith(u8, d, "seoul256_")) "seoul256" else d;
+ const source = @embedFile("themes/" ++ file ++ ".zig");
+ const c = Chrome.of(&themes[i]);
+ for (portMoves(&themes[i], &c)) |m| if (m.own) |own| if (!std.mem.eql(u8, &own, &m.got)) {
+ var buf: [64]u8 = undefined;
+ const said = try std.fmt.bufPrint(&buf, "{s} #{x:0>2}{x:0>2}{x:0>2} -> #{x:0>2}{x:0>2}{x:0>2}", .{ m.role, own[0], own[1], own[2], m.got[0], m.got[1], m.got[2] });
+ if (std.mem.indexOf(u8, source, said) == null) {
+ unsaid += 1;
+ std.debug.print("unsaid\t{s}\t{s}\t{s}\t{d:.2}\t{d:.2}\n", .{ themes[i].name, file, said, contrast(own, m.on), contrast(m.got, m.on) });
+ }
+ };
}
- std.debug.print("ring floors: {d} of {d} themes pass; {d} on the expected list\n", .{ passing, themes.len, ring_expected.len });
- try std.testing.expectEqual(0, wrong);
+ try std.testing.expectEqual(0, unsaid);
}
-test "the whole ring resolves in 150 ms of CPU, no theme in over 0.5 ms (Debug)" {
- const io = std.testing.io;
- var total: i96 = 0;
- var worst: i96 = 0;
+/// B9's budget, about 0.5 ms a theme and the ring in 150 ms on an idle
+/// machine (Debug), in user-space instructions, which a loaded machine does
+/// not move: Chrome.of retires about 7 a nanosecond here (the ring's 304 M
+/// in 42 ms of an idle CPU, 2026-11-26).
+const theme_instructions: u64 = 3_500_000;
+const ring_instructions: u64 = 1_050_000_000;
+
+test "the whole ring resolves within B9's budget, about 0.5 ms a theme and 150 ms in all on an idle machine, counted in instructions (Debug)" {
+ if (builtin.os.tag != .linux) return error.SkipZigTest;
+ const linux = std.os.linux;
+ var attr: linux.perf_event_attr = .{ .type = .HARDWARE, .config = @intFromEnum(linux.PERF.COUNT.HW.INSTRUCTIONS), .flags = .{ .exclude_kernel = true, .exclude_hv = true } };
+ const rc = linux.perf_event_open(&attr, 0, -1, -1, 0);
+ // No counter here (a container, perf_event_paranoid 3): nothing to count.
+ if (linux.errno(rc) != .SUCCESS) return error.SkipZigTest;
+ const fd: i32 = @intCast(rc);
+ defer _ = linux.close(fd);
+ var total: u64 = 0;
+ var worst: u64 = 0;
var worst_at: usize = 0;
for (&themes, 0..) |*th, i| {
- // The least of five: a theme's own cost, not a page fault's.
- var least: i96 = std.math.maxInt(i96);
- for (0..5) |_| {
- const start = std.Io.Clock.cpu_thread.now(io);
- var c = Chrome.of(th);
- std.mem.doNotOptimizeAway(&c);
- least = @min(least, start.durationTo(std.Io.Clock.cpu_thread.now(io)).toNanoseconds());
- }
- total += least;
- if (least > worst) {
- worst = least;
+ var before: u64 = 0;
+ var after: u64 = 0;
+ _ = linux.read(fd, std.mem.asBytes(&before), 8);
+ var c = Chrome.of(th);
+ std.mem.doNotOptimizeAway(&c);
+ _ = linux.read(fd, std.mem.asBytes(&after), 8);
+ total += after - before;
+ if (after - before > worst) {
+ worst = after - before;
worst_at = i;
}
}
- std.debug.print("ring resolved in {d} us, the slowest {s} in {d} us\n", .{ @divTrunc(total, 1000), themes[worst_at].name, @divTrunc(worst, 1000) });
- try std.testing.expect(total < 150 * std.time.ns_per_ms);
- try std.testing.expect(worst <= std.time.ns_per_ms / 2);
+ std.debug.print("ring resolved in {d} instructions, the most {s}'s {d}\n", .{ total, themes[worst_at].name, worst });
+ try std.testing.expect(total < ring_instructions);
+ try std.testing.expect(worst <= theme_instructions);
}
test "a theme file in the old names, a user's own or an older DumpThemes', and DumpThemes' now in the new names, load to the same Chrome" {
@@ -2797,3 +2925,51 @@ test "a theme file in the old names, a user's own or an older DumpThemes', and D
try std.testing.expect(!loadThemeFile(p, p.theme_file_generation, ".{ .name = \"x\", .page = null, .txet = null }"));
try std.testing.expectEqualStrings("one_dark_zed", p.theme().name);
}
+
+test "a retired theme's name stands for its successor in an init file and a dump, said once; an unknown one leaves the default, in today's words (DESIGN.md E)" {
+ const gpa = std.testing.allocator;
+ const Said = struct {
+ fn count(p: *const Pardes, needle: []const u8) usize {
+ var n: usize = 0;
+ for (p.messages.log[0..p.messages.len]) |m| {
+ if (std.mem.indexOf(u8, m.text[0..m.len], needle) != null) n += 1;
+ }
+ return n;
+ }
+ };
+ for ([_][3][]const u8{
+ .{ "gruvbox_dark_zed", "gruvbox", "Theme gruvbox_dark_zed was retired: gruvbox instead" },
+ .{ "TTOX", "dark", "Theme TTOX was retired: dark instead" },
+ // a retired one with no kept twin: the default
+ .{ "ingrid", "orchard", "Theme ingrid was retired: orchard instead" },
+ .{ "no-such-theme", "orchard", "Theme: no theme \"no-such-theme\"; like it: " },
+ }) |case| {
+ const line = try std.fmt.allocPrint(gpa, "Theme {s}\n", .{case[0]});
+ defer gpa.free(line);
+ const p = try Pardes.init(gpa, .{ .tty_only = true, .startup_config = line });
+ defer p.deinit();
+ try std.testing.expectEqualStrings(case[1], p.theme().name);
+ try std.testing.expectEqual(1, Said.count(p, case[2]));
+ }
+ // A dump naming one (this build writes none: a dump of an older one,
+ // its theme's name put in): its successor.
+ const source = try Pardes.init(gpa, .{ .tty_only = true, .startup_config = "Theme acme\n" });
+ defer source.deinit();
+ try @import("dump.zig").dumpState(source);
+ const bytes = try gpa.dupe(u8, source.dump_out.?);
+ defer gpa.free(bytes);
+ const at = std.mem.indexOf(u8, bytes, "acme").?;
+ try std.testing.expect(std.mem.indexOfPos(u8, bytes, at + 4, "acme") == null);
+ @memcpy(bytes[at..][0..4], "ttox");
+ const restored = try @import("dump.zig").initFromDump(gpa, .{ .tty_only = true }, bytes);
+ defer restored.deinit();
+ try std.testing.expectEqualStrings("dark", restored.theme().name);
+}
+
+test "every retired theme's successor is in the ring, and no retired name is" {
+ for (retired) |r| {
+ try std.testing.expectEqual(null, themeIndex(r[0]));
+ if (r[1]) |kept| try std.testing.expect(themeIndex(kept) != null);
+ }
+ try std.testing.expectEqual(44, retired.len);
+}
diff --git a/core/config.zig b/core/config.zig
index cc4edd18..d500cdcb 100644
--- a/core/config.zig
+++ b/core/config.zig
@@ -148,6 +148,7 @@ pub const leader_path = paths: {
.Forward = "ji",
.Keep = "jk",
.Resume = "'",
+ .Lists = "fl",
.Last = "jj",
.Jumplist = "jl",
.History = "fh",
@@ -625,7 +626,7 @@ pub const kill_to_line_start: []const Chord = &.{.{ .cp = 'u', .ctrl = true }};
pub const kill_to_line_end: []const Chord = &.{.{ .cp = 'k', .ctrl = true }};
pub const Settings = struct {
- theme: usize = 0,
+ theme: usize = pardes.colors.default_theme,
wrap: bool = true,
debug: bool = false,
/// The workspace tag row. Native shells with their own chrome (the macOS
diff --git a/core/draw.zig b/core/draw.zig
index c156352f..42396aa1 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -336,11 +336,14 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
s.placements.clearRetainingCapacity();
@memset(&s.gpu_frames, null);
const chrome = p.chromeTheme();
+ // The window's rules and grips from the chrome (the themes programme's
+ // L2e; DESIGN.md R6, R11, G1').
+ const resolved = p.chrome();
s.chrome = .{
.page = p.theme().bg,
.fg = p.theme().fg,
- .border = chrome.border,
- .topbar_rule = config.gui_topbar_pane_border_rgb orelse chrome.border,
+ .border = resolved.rule,
+ .topbar_rule = config.gui_topbar_pane_border_rgb orelse resolved.rule,
.tag_bg = chrome.tag_bg,
.tagline_bg = chrome.tagline_bg,
.tag_focus_bg = chrome.tag_active_bg,
@@ -350,12 +353,14 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
.scroll_thumb = chrome.scroll_thumb,
.match_tick = chrome.search_bg,
.match_current = p.theme().fg orelse chrome.tag_fg,
- .rule_px = p.theme().rule_px orelse 2,
- .grip_border = boxBorder(p),
- .grip_focus_ring = chrome.box,
- .grip_dirty = boxDirty(p),
- .tag_rule = p.theme().tag_rule,
- .rail_px = @intCast(@min(255, @as(u32, p.theme().rail_px orelse 12) * p.settings.grip_width / 100)),
+ .rule_px = resolved.rule_px,
+ .grip_border = resolved.grip.ring,
+ .grip_focus_ring = resolved.grip.focus,
+ .grip_dirty = resolved.grip.dirty,
+ .grip_mode = resolved.grip.mode,
+ .grip_ink = resolved.grip.ink,
+ .tag_rule = resolved.tag_rule,
+ .rail_px = @intCast(@min(255, @as(u32, resolved.rail_px) * p.settings.grip_width / 100)),
};
place(p, s);
// Separators have their own role; a scrollbar need not frame the page.
@@ -539,7 +544,14 @@ fn renderPane(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r:
// painted out. Text gets the overlay; a kind's pane gives up the rows.
const shown = pane.notices.span();
const body_h = (r.h -| pane.tag_rows) -| shown;
- pardes.Kind.draw(p, s, arena, pane, id, tx, body_y + shown, tw, body_h);
+ // A picker's preview through a kind (Pick.showKind): its file named
+ // until its kind has drawn it.
+ if (!pardes.Kind.draw(p, s, arena, pane, id, tx, body_y + shown, tw, body_h) and body_h > 0 and pardes.Pick.previewing(p, id)) {
+ const k = pane.addon.?;
+ if (pardes.Pick.nameLine(arena, k.path, k.nameOf(), k.size, "")) |line| {
+ _ = s.print(tx, body_y + shown, tw, line, .{ .fg = if (th.fg) |c| .{ .rgb = c } else .default, .bg = pane_bg });
+ } else |_| {}
+ }
// The same one column as the real scrollbar below, running past
// the notice bands so the gutter has no notch in it; its thumb
// where this frame's paint said its window is in its whole (a
@@ -849,8 +861,8 @@ fn renderHeaderLayer(p: *Pardes, layer: *pardes.Layer, kind: TagKind, id: u16, v
var col = panes.File.rawDisplayCol(p.settings.tab, shown, @max(swept.lo, start) - start) -| scroll;
const stop = panes.File.rawDisplayCol(p.settings.tab, shown, @min(swept.hi, end) - start) -| scroll;
while (col < stop and col < columns) : (col += 1) {
- surface.at(@intCast(col), 0).style.bg = .{ .rgb = body_layer.buttonTints(p.theme())[button] };
- surface.at(@intCast(col), 0).style.fg = .{ .rgb = body_layer.buttonInks(p.theme())[button] };
+ surface.at(@intCast(col), 0).style.bg = .{ .rgb = p.chrome().sweeps[button].ground };
+ surface.at(@intCast(col), 0).style.fg = .{ .rgb = p.chrome().sweeps[button].text };
}
}
} else |_| {};
@@ -933,6 +945,9 @@ fn joinBand(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: R
const ground = groundOf(p, pane, active);
const inks = chrome.roles.on(ground);
const selected = chrome.roles.selectedOn(ground);
+ // A symbol's kind mark (colors.Chrome.Inks.kind): held on this tag's
+ // ground and on its cursor row's selection.
+ const kind = p.chrome().on(if (active) .focus else .plain).kind;
const bg = inks.ground;
const fg = inks.text;
const storage = try arena.alloc(Cell, @as(usize, columns) * rows);
@@ -977,6 +992,7 @@ fn joinBand(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: R
if (b < part.row.chord) style.fg = .{ .rgb = chrome.roles.key };
if (b < part.row.pre) style.fg = .{ .rgb = if (active) chrome.tag_active_name_fg else chrome.tag_name_fg };
if (part.row.dim or (b >= part.row.pre and b < part.row.pre + part.row.faint) or (b >= part.row.quiet[0] and b < part.row.quiet[1])) style.fg = .{ .rgb = on.dim };
+ if (b < part.row.kind) style.fg = .{ .rgb = kind };
for (part.row.keys) |k| if (k == b) {
style.fg = .{ .rgb = chrome.roles.key };
style.bold = true;
@@ -1134,11 +1150,11 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
if (pane.file != null and pane.trail.n > 0 and !pardes.Trail.outOfRest(p, pane)) {
const kept = tagline.folded(p, pane).whole;
const t = &pane.trail;
- const first: usize = @intFromBool(t.steps[0] == .owner);
- if (t.isFolded(first, kept)) {
- const fold = t.spanOf(first, kept);
+ // Each run of folded places' `+N` (UX L'1: words never fold).
+ for (0..t.backs()) |i| if (t.isFolded(i, kept) and !(i > 0 and t.isFolded(i - 1, kept))) {
+ const fold = t.spanOf(i, kept);
inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, fold[0], @min(fold[1], first_line.len), inks.dim, false);
- }
+ };
if (t.walked()) |i| if (!t.isFolded(i, kept)) {
const word = t.spanOf(i, kept);
inkTag(p, s, shown, lines[0..rows], top, tx, tag_y, tw, word[0], @min(word[1], first_line.len), chrome.roles.key, true);
@@ -1228,12 +1244,11 @@ fn paintPaneTag(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane,
body_layer.paintPointerSelection(p, s, pane, r, sel, 0, preview_bg, null);
};
}
- const sel_btn = body_layer.buttonTints(th);
- const sel_ink = body_layer.buttonInks(th);
+ const sweeps = &p.chrome().sweeps;
for (pane.sel, 0..) |selection, button| {
if (selection.state == .none or (selection.state == .done and button != 0)) continue;
if (button == pardes.sel_slot or @min(selection.r0, selection.r1) >= rows) continue;
- body_layer.paintPointerSelection(p, s, pane, r, selection, 0, sel_btn[button], sel_ink[button]);
+ body_layer.paintPointerSelection(p, s, pane, r, selection, 0, sweeps[button].ground, sweeps[button].text);
}
}
diff --git a/core/dump.zig b/core/dump.zig
index ad436ac5..0cefa157 100644
--- a/core/dump.zig
+++ b/core/dump.zig
@@ -422,10 +422,8 @@ fn loadKnowing(gpa: std.mem.Allocator, opts: Options, bytes: []const u8, notes:
const was = try l.get(OnDisk);
if (on_disk) |out| out.* = was;
const theme = try l.get([]const u8);
- // This build's place for that theme; one it has not, its first.
- p.settings.theme = for (colors.themes, 0..) |t, i| {
- if (std.mem.eql(u8, t.name, theme)) break i;
- } else if (p.settings.theme < colors.themes.len) p.settings.theme else 0;
+ // This build's place for that theme, a retired one's successor's.
+ p.settings.theme = colors.restoredIndex(theme, p.settings.theme);
// A mount this process was started with stands; one of the same name
// to elsewhere is refused, never silently put over it.
for (mounts) |m| {
@@ -515,9 +513,7 @@ fn loadImage(gpa: std.mem.Allocator, opts: Options, bytes: []const u8, notes: ?*
if (on_disk) |out| out.* = was;
const theme: []const u8 = if (try walk.Get.member(root, "theme")) |c| try l.get([]const u8, c) else "";
defer gpa.free(theme);
- p.settings.theme = for (colors.themes, 0..) |t, i| {
- if (std.mem.eql(u8, t.name, theme)) break i;
- } else if (p.settings.theme < colors.themes.len) p.settings.theme else 0;
+ p.settings.theme = colors.restoredIndex(theme, p.settings.theme);
for (mounts) |m| {
const existing = for (p.fs.mounts.items) |e| {
if (std.mem.eql(u8, e.name, m.name)) break e;
@@ -749,8 +745,9 @@ fn reviveSession(p: *Pardes, previous: ?*Pardes, resumed: bool) !void {
}
/// A loaded pane given to this host: a terminal a new shell in its old
-/// one's directory under its history, a file watched again (one changed on
-/// disk since comes back as it is now, one unsaved is marked changed), a
+/// one's directory under its history, a file watched again and its
+/// language's server started (one changed on disk since comes back as it
+/// is now, one unsaved is marked changed), a
/// kind's pane opened again (a PDF a build before the pdf addon dumped, as
/// the addon's).
fn revivePane(p: *Pardes, id: usize, pane: *pardes.panes.Pane, was_on_disk: bool) void {
@@ -793,6 +790,7 @@ fn revivePane(p: *Pardes, id: usize, pane: *pardes.panes.Pane, was_on_disk: bool
} else |_| {}
}
p.emit(.{ .watch = .{ .pane = .at(id), .on = true } });
+ p.emit(.{ .lsp_open = .{ .pane = .at(id) } });
// Its file gone from disk since the dump: its text is nowhere else, so
// it is said deleted, and Del, Exit and Restore ask first. One never on
// disk (a name not yet saved) comes back as it was.
@@ -1410,7 +1408,7 @@ test "restored syntax context caches are rebuilt from the text rather than loade
const f = &pane.file.?;
const declarations = try p.tree_sitter_gpa.alloc(pardes.syntax.ContextDeclaration, 1);
@memset(std.mem.sliceAsBytes(declarations), 0);
- f.context.replace(p.tree_sitter_gpa, declarations, f.revision);
+ f.context.replace(p.tree_sitter_gpa, .{ .declarations = declarations }, f.revision);
// Older builds persisted these two fields; the schema reader must skip them too.
const OldFile = struct {
path: []const u8,
@@ -1436,13 +1434,14 @@ test "restored syntax context caches are rebuilt from the text rather than loade
defer gpa.free(bytes);
const q = try load(gpa, opts, bytes, null);
defer q.deinit();
- // This build's: the revision kept, the declarations parsed again from
- // the text, with the syntax allocator.
- const want = try pardes.syntax.contextDeclarations(syntax_gpa.allocator(), f.path, f.content);
- defer syntax_gpa.allocator().free(want);
+ // This build's: the revision kept, the declarations and the symbols
+ // parsed again from the text, with the syntax allocator.
+ var want = try pardes.syntax.context(syntax_gpa.allocator(), f.path, f.content);
+ defer want.deinit(syntax_gpa.allocator());
for (q.panes) |slot| if (slot) |restored| if (restored.file) |file| {
try std.testing.expectEqual(f.context.revision, file.context.revision);
- try std.testing.expectEqualSlices(pardes.syntax.ContextDeclaration, want, file.context.declarations);
+ try std.testing.expectEqualSlices(pardes.syntax.ContextDeclaration, want.declarations, file.context.declarations);
+ try std.testing.expectEqualSlices(pardes.syntax.Symbol, want.symbols, file.context.symbols);
};
}
diff --git a/core/exec.zig b/core/exec.zig
index a56c17f9..44cfea64 100644
--- a/core/exec.zig
+++ b/core/exec.zig
@@ -1008,6 +1008,13 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Settings.Setting, arg: ?[
.theme => {
const want = std.mem.trim(u8, arg orelse return, " \t\r\n");
if (colors.themeIndex(want)) |i| return colors.setThemeIndex(p, i);
+ // A retired theme's name (DESIGN.md E): its successor, said.
+ if (colors.successorOf(want)) |i| {
+ colors.setThemeIndex(p, i);
+ var said: pardes.Kind.Buf(128) = .{};
+ _ = pardes.Messages.say(p, .notice, v.active, said.print("Theme {s} was retired: {s} instead", .{ want[0..@min(want.len, 40)], colors.themes[i].name }));
+ return;
+ }
// A failure is said, the init file's too (applyStartupConfig
// logs it with its line): never silent.
// All of it within the 128 bytes a 9P error carries, so a write
diff --git a/core/fs.zig b/core/fs.zig
index 594c89cf..c5eb432d 100644
--- a/core/fs.zig
+++ b/core/fs.zig
@@ -868,7 +868,7 @@ pub const Namespace = struct {
.authority = .{
"socket_path", "tcp_address", "mounts", "node_name", "os_paths", "out",
"listeners", "origin", "no_prompt", "session_write", "unlogged", "capturing",
- "serving", "typed", "refused", "failure", "failure_len", "no_pane_slot", "no_pane_slot_len",
+ "serving", "refused", "failure", "failure_len", "no_pane_slot", "no_pane_slot_len",
"said", "said_len", "said_at", "late_failure", "late_failure_len",
"lsp_answer_at", "edit_started", "edit_hold", "edit_said", "lsp_result", "write_room",
"write_waits", "log_full_hash", "pages", "closed_lines", "ran_at", "refilled",
@@ -908,12 +908,10 @@ pub const Namespace = struct {
/// which also refuses prompts, which a click may open).
capturing: bool = false,
/// A 9P request is being served (Pardes.serveFs): a prompt it opens is
- /// a question for the log (`ask`), answered with `answer`.
+ /// a question for the log (`ask`), answered with `answer`. Not while
+ /// the keys or the mouse written to `kbdin` or `mousein` run: they are
+ /// the user's own (ninep/ctl.zig writeKbdin).
serving: bool = false,
- /// The request is keys or a mouse written to `kbdin` or `mousein`:
- /// the user's own, so a builtin they reach routes as typed
- /// (Pick.asked), though their write is served as any other.
- typed: bool = false,
refused: bool = false,
failure: [256]u8 = undefined,
failure_len: u16 = 0,
diff --git a/core/jj.zig b/core/jj.zig
index 08c31e5c..618f363e 100644
--- a/core/jj.zig
+++ b/core/jj.zig
@@ -157,7 +157,7 @@ pub fn open(p: *Pardes, near: usize, path: []const u8, rev: []const u8, at: look
if (replace) p.removePane(near, free) catch |err| p.reportError(.at(free), "At", err);
layout.compute(p);
// Sized for its place before it is centred there.
- p.sync();
+ p.layOut();
look.focusPaneLine(p, free, at, .center);
return free;
}
@@ -1942,9 +1942,9 @@ fn ghostLanes(ch: *const Changes, ghosts: []const Ghost, gi: usize, first_row: b
/// a changed line's old text grey, the words that went red; a
/// description's id and title in its lane's colour `lane`, or with one
/// change pinned (no one colour a lane) its id in the theme's keyword ink,
-/// its author and age grey.
+/// its author and age grey. All of them the chrome's (Chrome.add, .del).
fn inkGhost(p: *Pardes, s: *pardes.Surface, pane: *const Pane, g: Ghost, row: i32, from: usize, to: usize, pad: i32, marks: []const [2]u32, lane: ?[3]u8, x: u16, y: u16, w: u16) void {
- const th = p.theme();
+ const chrome = p.chrome();
const tab = p.settings.tab;
const said = File.sourceLine(pane, row);
const Ink = struct {
@@ -1975,13 +1975,13 @@ fn inkGhost(p: *Pardes, s: *pardes.Surface, pane: *const Pane, g: Ghost, row: i3
const ink: Ink = .{ .q = p, .s = s, .pane = pane, .row = row, .from = from, .to = to, .pad = pad, .x = x, .y = y, .w = w };
_ = tab;
switch (g.kind) {
- .deleted => s.tint(x, y, w, pardes.colors.Grounds.of(th).del.row, th.lineno),
- .added => s.tint(x, y, w, pardes.colors.Grounds.of(th).add.row, null),
+ .deleted => s.tint(x, y, w, chrome.del.row, chrome.line_number),
+ .added => s.tint(x, y, w, chrome.add.row, null),
.changed => {
- ink.fg(0, said.len, th.lineno);
+ ink.fg(0, said.len, chrome.line_number);
for (marks[g.marks..][0..g.nmarks]) |m| {
const c = ink.cells(m[0], m[1]);
- if (c[0] < c[1]) s.tint(x + c[0], y, c[1] - c[0], pardes.colors.Grounds.of(th).del.emph, null);
+ if (c[0] < c[1]) s.tint(x + c[0], y, c[1] - c[0], chrome.del.emph, null);
}
},
.description => {
@@ -1989,8 +1989,8 @@ fn inkGhost(p: *Pardes, s: *pardes.Surface, pane: *const Pane, g: Ghost, row: i3
// title) in the lane's colour, the author and the age grey.
const id_end = std.mem.indexOfScalar(u8, said, ' ') orelse said.len;
const author = @min(g.author, said.len);
- ink.fg(0, if (lane != null) author else id_end, lane orelse th.kw);
- ink.fg(author, said.len, th.lineno);
+ ink.fg(0, if (lane != null) author else id_end, lane orelse chrome.syntax[@intFromEnum(syntax.Syn.keyword)]);
+ ink.fg(author, said.len, chrome.line_number);
},
}
}
@@ -2010,7 +2010,7 @@ fn inkCame(p: *Pardes, s: *pardes.Surface, pane: *Pane, marks: []const [2]u32, r
if (lo >= hi) continue;
const from = here.pad + File.displayOffset(tab, pane, row, @intCast(first), @intCast(lo));
const to = @min(@as(i32, w), here.pad + File.displayOffset(tab, pane, row, @intCast(first), @intCast(hi)));
- if (from >= 0 and from < to) s.tint(x + @as(u16, @intCast(from)), y, @intCast(to - from), pardes.colors.Grounds.of(p.theme()).add.emph, null);
+ if (from >= 0 and from < to) s.tint(x + @as(u16, @intCast(from)), y, @intCast(to - from), p.chrome().add.emph, null);
}
}
@@ -2245,82 +2245,6 @@ fn nest(lines: []Line, npins: usize) void {
}
}
-/// A diff's two inks (one change pinned, `paintLanes`): its lane's colour
-/// says the kind of the row it stands beside (the user's rulings of
-/// 2026-11-23), `added` beside a row it wrote (a line added whole, a changed
-/// line's new text), `taken` beside a row it took away (a line taken away, a
-/// changed line's old text).
-pub const Inks = struct { added: [3]u8, taken: [3]u8 };
-
-/// The diff's own two colours: the theme's green and its red (the grounds'
-/// and the changed words' hues), each pushed toward the ink until it reads
-/// 3:1 on the page (or nearly as the ink does, where the ink reads less).
-pub fn laneInks(th: *const pardes.LegacyTheme) Inks {
- var inks: [2][3]u8 = .{ if (th.palette) |c| c[2] else .{ 0x2e, 0xa0, 0x43 }, themeRed(th) };
- const page = th.bg orelse th.tag_bg;
- for (&inks) |*ink| {
- var step: usize = 0;
- while (step < 8 and pardes.colors.contrast(ink.*, page) < 3) : (step += 1) ink.* = pardes.colors.mixOklab(ink.*, th.fg orelse th.tag_fg, 0.4);
- }
- return .{ .added = inks[0], .taken = inks[1] };
-}
-
-/// The lanes' colours, a pin's the `pin % len`th, oldest first: the
-/// theme's accents but the two that mean written and taken away (its green
-/// and red), in hue order from the top, each a hue `hue_apart` or more from
-/// the one kept before it (doom one: magenta, blue, yellow; cyan and
-/// orange go). Distinct colours, never one between two.
-pub fn laneColours(th: *const pardes.LegacyTheme, buf: *[8][3]u8) []const [3]u8 {
- const pal = th.palette;
- const grounds = [2][3]u8{ themeRed(th), if (pal) |c| c[2] else .{ 0x2e, 0xa0, 0x43 } };
- const accents: [6][3]u8 = if (pal) |c| .{ c[3], c[4], c[5], c[6], th.num, th.kw } else .{ th.kw, th.num, th.str, th.box, th.column_box orelse th.box, th.comment };
- var sorted: [6][3]u8 = undefined;
- var n: usize = 0;
- for (accents) |c| {
- // A grey is no accent; one near written or taken away means that.
- if (chroma(c) < 48 or hueApart(c, grounds[0]) < hue_apart or hueApart(c, grounds[1]) < hue_apart) continue;
- sorted[n] = c;
- n += 1;
- }
- std.sort.insertion([3]u8, sorted[0..n], {}, struct {
- fn above(_: void, a: [3]u8, b: [3]u8) bool {
- return hue(a) > hue(b);
- }
- }.above);
- var kept: usize = 0;
- for (sorted[0..n]) |c| {
- if (kept > 0 and hueApart(c, buf[kept - 1]) < hue_apart) continue;
- buf[kept] = c;
- kept += 1;
- }
- return buf[0..kept];
-}
-
-/// Two hues closer than this are one colour to a lane (doom one's cyan is
-/// 12 degrees from its blue, its orange 11 from its yellow).
-const hue_apart = 15;
-
-fn chroma(c: [3]u8) u8 {
- return @max(c[0], c[1], c[2]) - @min(c[0], c[1], c[2]);
-}
-
-/// HSV's hue, in degrees.
-fn hue(c: [3]u8) f32 {
- const r: f32 = @floatFromInt(c[0]);
- const g: f32 = @floatFromInt(c[1]);
- const b: f32 = @floatFromInt(c[2]);
- const hi = @max(r, g, b);
- const d = hi - @min(r, g, b);
- if (d == 0) return 0;
- const h = if (hi == r) @mod((g - b) / d, 6) else if (hi == g) (b - r) / d + 2 else (r - g) / d + 4;
- return 60 * h;
-}
-
-fn hueApart(a: [3]u8, b: [3]u8) f32 {
- const d = @abs(hue(a) - hue(b));
- return @min(d, 360 - d);
-}
-
/// The pane's pinned changes as a view shows them, on its body's rows (body_layer.zig, while
/// File.Layers.lanes is set): in the gutter's lane cells after the number a
/// lane each pin whose block runs down the row, at its level, a glyph in a
@@ -2333,18 +2257,13 @@ pub fn paint(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u1
if (pane.layers.lanes > 0) paintLanes(p, s, pane, r, tx, tw, body_h);
}
-/// The theme's red: what a change took away; churn's top.
-pub fn themeRed(th: *const pardes.LegacyTheme) [3]u8 {
- return if (th.palette) |c| c[1] else .{ 0xcf, 0x22, 0x2e };
-}
-
-/// A count's colour on churn's gradient: smooth from the line numbers'
-/// grey to the theme's red, on a log scale of the count against the
-/// hottest; null for none.
-fn heatColour(th: *const pardes.LegacyTheme, count: u16, hottest: u16) ?[3]u8 {
+/// A count's colour on churn's eight steps from the line numbers' grey to
+/// the deleted hue (Chrome.heat, worked out with the theme), on a log scale
+/// of the count against the hottest; null for none.
+fn heatColour(c: *const pardes.colors.Chrome, count: u16, hottest: u16) ?[3]u8 {
if (count == 0 or hottest == 0) return null;
const t = @log(@as(f32, @floatFromInt(count)) + 1) / @log(@as(f32, @floatFromInt(hottest)) + 1);
- return pardes.colors.mixOklab(th.lineno, themeRed(th), t);
+ return c.heat[@min(c.heat.len, @as(usize, @intFromFloat(@ceil(t * c.heat.len)))) -| 1];
}
/// The heat lane: a cell after the line number (before the changes'
@@ -2362,7 +2281,7 @@ fn paintHeat(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u1
if (row < 0 or File.readOnlyRow(f, @intCast(row)) != null) continue;
const line = File.fileRow(f, @intCast(row));
if (line >= heat.lines.len) continue;
- const rgb = heatColour(p.theme(), heat.lines[line], heat.hottest) orelse continue;
+ const rgb = heatColour(p.chrome(), heat.lines[line], heat.hottest) orelse continue;
var style = s.at(x, body_y + vr).style;
style.fg = .{ .rgb = rgb };
s.set(x, body_y + vr, "\u{258c}", style);
@@ -2380,7 +2299,7 @@ pub fn railHeat(p: *Pardes, s: *pardes.Surface, pane: *Pane, id: usize, rail: pa
for (0..rail.h) |row| {
const lo = row * total / rail.h;
const hi = @max(lo + 1, (row + 1) * total / rail.h);
- const rgb = heatColour(p.theme(), std.mem.max(u16, heat.lines[lo..@min(hi, total)]), heat.hottest) orelse continue;
+ const rgb = heatColour(p.chrome(), std.mem.max(u16, heat.lines[lo..@min(hi, total)]), heat.hottest) orelse continue;
if (p.view().frontend.windowed)
s.heat.append(p.gpa, .{ .owner = @intCast(id), .row = @intCast(row), .rgb = rgb }) catch {}
else
@@ -2393,18 +2312,18 @@ fn paintLanes(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u
const ch = answered(p, f.layer.owner) orelse return;
if (ch.lines.len == 0) return;
const tab = p.settings.tab;
- var buf: [8][3]u8 = undefined;
- const colours = laneColours(p.theme(), &buf);
- if (colours.len == 0) return;
- // One change pinned is a diff: its lane in the diff's own two colours,
- // by the row's kind; several, a colour a change, to tell them apart.
- const one: ?Inks = if (ch.pins.len == 1) laneInks(p.theme()) else null;
+ const chrome = p.chrome();
+ const colours = chrome.lanes[0..chrome.lanes_len];
+ // One change pinned is a diff: its lane in the diff's own two markers
+ // (the user's rulings of 2026-11-23: added beside a row it wrote, deleted
+ // beside one it took away); several, a colour a change, to tell them
+ // apart.
+ const one = ch.pins.len == 1;
const gutter = File.gutterWidth(pane);
const cells = File.laneCells(pane);
if (gutter >= tw or cells == 0) return;
const first = tx + gutter - cells;
const windowed = p.view().frontend.windowed;
- const ground = pardes.colors.Grounds.of(p.theme()).add.row;
const body_y = p.bodyTop(pane, r);
const nrows = File.lineCount(f.content);
var vr: u16 = pane.context_rows;
@@ -2424,7 +2343,7 @@ fn paintLanes(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u
const next = pane.wrapAt(tab, @as(i32, vr) + 1);
const to: usize = if (next.line == w.line) @intCast(next.at) else File.sourceLine(pane, w.line).len;
const first_row = w.at <= 0;
- inkGhost(p, s, pane, g, w.line, @intCast(@max(0, w.at)), to, w.pad, ch.marks, if (one == null) colours[g.pin % colours.len] else null, tx + gutter, y, tw - gutter);
+ inkGhost(p, s, pane, g, w.line, @intCast(@max(0, w.at)), to, w.pad, ch.marks, if (one) null else colours[g.pin % colours.len], tx + gutter, y, tw - gutter);
if (g.kind == .description and first_row) points = @enumFromInt(g.pin);
taken = g.kind == .deleted or g.kind == .changed or (g.kind == .description and takenAbove(ch.ghosts, gi));
break :ghost ghostLanes(ch, ch.ghosts, gi, first_row);
@@ -2432,9 +2351,9 @@ fn paintLanes(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u
const at = File.fileRow(f, row);
if (at >= ch.lines.len) continue;
const line = ch.lines[at];
- if (line.whole and line.pin != .none) s.tint(tx + gutter, y, tw - gutter, ground, null);
+ if (line.whole and line.pin != .none) s.tint(tx + gutter, y, tw - gutter, chrome.add.row, null);
// Going: a pin ahead takes it away.
- if (line.going != .none) s.tint(tx + gutter, y, tw - gutter, pardes.colors.Grounds.of(p.theme()).del.row, null);
+ if (line.going != .none) s.tint(tx + gutter, y, tw - gutter, chrome.del.row, null);
taken = line.going != .none;
if (!line.whole and line.nmarks > 0) inkCame(p, s, pane, ch.marks[line.marks..][0..line.nmarks], w.line, vr, tx + gutter, y, tw - gutter);
break :line line.lanes;
@@ -2442,7 +2361,7 @@ fn paintLanes(p: *Pardes, s: *pardes.Surface, pane: *Pane, r: pardes.Rect, tx: u
for (lanes, 0..) |lane, level| {
if (lane == .none) break;
const arrow = lane == points;
- const rgb = if (one) |d| (if (taken) d.taken else d.added) else colours[@intFromEnum(lane) % colours.len];
+ const rgb = if (one) (if (taken) chrome.del.ink else chrome.add.ink) else colours[@intFromEnum(lane) % colours.len];
if (windowed) {
// A body a pixel shell draws as a layer is painted on a
// temporary surface first: its lanes are not drawn yet.
@@ -2877,10 +2796,10 @@ test "Changes draws a lane a pinned change after the line number, nested ones a
const s = try p.render(arena.allocator());
const body = s.region(.body, id).?.rect;
const first = body.x + before;
- var buf: [8][3]u8 = undefined;
- const colours = laneColours(p.theme(), &buf);
+ const c = p.chrome();
+ const colours = c.lanes[0..c.lanes_len];
try testing.expect(colours.len >= 3);
- const ground = pardes.colors.Grounds.of(p.theme()).add.row;
+ const ground = c.add.row;
// Lines 1-10, each on the row the view draws it at (ghost rows
// stand between): `fn`'s spine on all; `mid` on 3-6; `shift` on 4.
const want = [_][]const u8{ "0", "0", "01", "012", "01", "01", "0", "0", "0", "0" };
@@ -2917,16 +2836,15 @@ test "Changes draws a lane a pinned change after the line number, nested ones a
}
}
-test "a diff's two lane inks in every theme: its green and its red, never one colour, each read on the page" {
- for (&pardes.colors.legacy_themes) |*th| {
- const inks = laneInks(th);
- errdefer std.debug.print("{s}: added {any} taken {any}\n", .{ th.name, inks.added, inks.taken });
- try testing.expect(!std.meta.eql(inks.added, inks.taken));
- const page = th.bg orelse th.tag_bg;
- // 3:1, or as near the theme's own ink's as it reads (hex_poison's).
- const floor = @min(3, pardes.colors.contrast(th.fg orelse th.tag_fg, page)) - 0.1;
- try testing.expect(pardes.colors.contrast(inks.added, page) >= floor);
- try testing.expect(pardes.colors.contrast(inks.taken, page) >= floor);
+test "a diff's two lane inks in every theme are its added and deleted markers (DESIGN.md R10): never one colour, each 4.5:1 on its rows, as near as the theme reaches" {
+ for (&pardes.colors.themes) |*th| {
+ const c: pardes.colors.Chrome = .of(th);
+ errdefer std.debug.print("{s}: added {any} deleted {any}\n", .{ th.name, c.add, c.del });
+ try testing.expect(!std.meta.eql(c.add.ink, c.del.ink));
+ for ([2]pardes.colors.Chrome.Diff{ c.add, c.del }) |d| for ([2][3]u8{ d.row, d.emph }) |ground| {
+ const reach = @max(pardes.colors.contrast(@splat(255), ground), pardes.colors.contrast(@splat(0), ground));
+ try testing.expect(pardes.colors.contrast(d.ink, ground) >= @min(4.5, reach) - 0.01);
+ };
}
}
@@ -3003,9 +2921,8 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
const s = try p.render(arena.allocator());
const body = s.region(.body, id).?.rect;
const first = body.x + File.gutterWidth(pane) - File.laneCells(pane);
- var cbuf: [8][3]u8 = undefined;
- const colours = laneColours(p.theme(), &cbuf);
- const grounds = pardes.colors.Grounds.of(p.theme());
+ const grounds = p.chrome();
+ const colours = grounds.lanes[0..grounds.lanes_len];
const lanes = [_][]const u8{ "0", "0", "02", "02", "02", "02", "01", "01", "01", "0", "0", "0" };
const Ground = enum { none, add, del };
const ground = [_]Ground{ .add, .add, .none, .none, .add, .none, .del, .del, .none, .add, .add, .none };
@@ -3048,7 +2965,7 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
try testing.expectEqual(pardes.Color{ .rgb = colours[pin] }, s.at(body.x + File.gutterWidth(pane), body.y + row).style.fg);
try testing.expectEqual(pardes.Color{ .rgb = colours[pin] }, s.at(body.x + File.gutterWidth(pane) + 5, body.y + row).style.fg);
}
- try testing.expectEqual(pardes.Color{ .rgb = p.theme().lineno }, s.at(body.x + File.gutterWidth(pane) + 4, body.y + 6).style.fg);
+ try testing.expectEqual(pardes.Color{ .rgb = grounds.line_number }, s.at(body.x + File.gutterWidth(pane) + 4, body.y + 6).style.fg);
// The changed line: on its old text the word that went (`b`) red,
// on it the word that came (`b2`) green; the rest of each neither.
const text_x = body.x + File.gutterWidth(pane);
@@ -3071,10 +2988,9 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
const s1 = try p.render(arena.allocator());
const top = s1.region(.body, id).?.rect.y;
const at = body.x + File.gutterWidth(pane) - File.laneCells(pane);
- const inks = laneInks(p.theme());
- try testing.expect(!std.meta.eql(inks.added, inks.taken));
+ try testing.expect(!std.meta.eql(grounds.add.ink, grounds.del.ink));
for ([_]u16{ 2, 3, 4, 5 }, [_]bool{ true, false, false, false }) |row, red| {
- const ink = if (red) inks.taken else inks.added;
+ const ink = if (red) grounds.del.ink else grounds.add.ink;
if (windowed) {
var n: usize = 0;
for (s1.lanes.items) |lane| if (lane.y == top + row) {
@@ -3084,8 +3000,9 @@ test "Changes draws what the text has not where it stood, as ghost rows: a line
try testing.expectEqual(@as(usize, 1), n);
} else try testing.expectEqual(pardes.Color{ .rgb = ink }, s1.at(at, top + row).style.fg);
}
- try testing.expectEqual(pardes.Color{ .rgb = p.theme().kw }, s1.at(text_x, top + 5).style.fg);
- try testing.expect(!std.meta.eql(pardes.Color{ .rgb = p.theme().kw }, s1.at(text_x + 5, top + 5).style.fg));
+ const keyword = grounds.syntax[@intFromEnum(syntax.Syn.keyword)];
+ try testing.expectEqual(pardes.Color{ .rgb = keyword }, s1.at(text_x, top + 5).style.fg);
+ try testing.expect(!std.meta.eql(pardes.Color{ .rgb = keyword }, s1.at(text_x + 5, top + 5).style.fg));
}
}
@@ -3299,12 +3216,12 @@ test "a description is whole, its title and its author never cut: in a pane narr
const s = try p.render(arena.allocator());
const body = s.region(.body, id).?.rect;
const x = body.x + File.gutterWidth(pane);
- try testing.expectEqual(pardes.Color{ .rgb = p.theme().kw }, s.at(x, body.y + 3).style.fg);
+ try testing.expectEqual(pardes.Color{ .rgb = p.chrome().syntax[@intFromEnum(syntax.Syn.keyword)] }, s.at(x, body.y + 3).style.fg);
const last: u16 = body.y + 3 + @as(u16, @intCast(n - 1));
const end = x + @as(u16, @intCast(File.displayWidth(p.settings.tab, Ghosts.text(pane, got[3 + n - 1])))) - 1;
try testing.expectEqualStrings("w", s.at(end, last).grapheme());
- try testing.expectEqual(pardes.Color{ .rgb = p.theme().lineno }, s.at(end, last).style.fg);
- try testing.expectEqual(pardes.Color{ .rgb = p.theme().lineno }, s.at(end - 4, last).style.fg);
+ try testing.expectEqual(pardes.Color{ .rgb = p.chrome().line_number }, s.at(end, last).style.fg);
+ try testing.expectEqual(pardes.Color{ .rgb = p.chrome().line_number }, s.at(end - 4, last).style.fg);
const first = x - File.laneCells(pane);
for (0..n) |k| {
const y = body.y + 3 + @as(u16, @intCast(k));
@@ -4068,7 +3985,7 @@ test "from the middle: in a revision's pane a pin behind it shows the lines it t
const s = try p.render(arena.allocator());
const body = s.region(.body, id).?.rect;
const x = body.x + File.gutterWidth(pane) + 1;
- const grounds = pardes.colors.Grounds.of(p.theme());
+ const grounds = p.chrome();
for ([_]u16{ 1, 8 }) |row| try testing.expectEqual(pardes.Color{ .rgb = grounds.add.row }, s.at(x, body.y + row).style.bg);
for ([_]u16{ 7, 11 }) |row| try testing.expectEqual(pardes.Color{ .rgb = grounds.del.row }, s.at(x, body.y + row).style.bg);
}
@@ -4255,8 +4172,10 @@ test "Churn counts the changes that touched each declaration and draws them afte
const s = try p.render(arena.allocator());
const body = s.region(.body, id).?.rect;
const x = body.x + File.gutterWidth(pane) - 1;
- const red = themeRed(p.theme());
- const warm = pardes.colors.mixOklab(p.theme().lineno, red, @log(3.0) / @log(4.0));
+ // Churn's steps (Chrome.heat): the hottest the last, f's 3 of 4's
+ // log, the seventh.
+ const red = p.chrome().heat[7];
+ const warm = p.chrome().heat[6];
for (0..7) |row| {
const cell = s.at(x, body.y + @as(u16, @intCast(row)));
if (row == 3) {
@@ -4465,8 +4384,7 @@ test "Compare pins the whole difference between each two points as one change: t
const s = try p.render(arena.allocator());
const body = s.region(.body, id).?.rect;
const first = body.x + File.gutterWidth(pane) - File.laneCells(pane);
- var cbuf: [8][3]u8 = undefined;
- const colours = laneColours(p.theme(), &cbuf);
+ const colours = p.chrome().lanes[0..p.chrome().lanes_len];
for ([_]u16{ 3, 7, 8 }, [_]usize{ 0, 1, 1 }) |row, pin| {
if (windowed) {
var n: usize = 0;
diff --git a/core/keys.zig b/core/keys.zig
index 5baed695..05349d59 100644
--- a/core/keys.zig
+++ b/core/keys.zig
@@ -232,6 +232,7 @@ pub fn handleKey(p: *Pardes, key: Key) void {
// A tag in a typing state takes every key (TagState: Help, describe-key).
if (p.view().tag_state.kind != .rest) return tagStateKey(p, key);
Prompt.keyAtRest(p, key);
+ @import("Pick.zig").keyAtRest(p, key);
// Esc takes a hover's ghost lines away (SPEC §3.5) before anything else
// it does.
if (p.lsp_ask.hover != null and hit(key, config.escape)) {
@@ -585,6 +586,7 @@ fn tagStateKey(p: *Pardes, key: Key) void {
const v = p.view();
const s = &v.tag_state;
if (s.kind == .prompt) return Prompt.key(p, key);
+ if (s.kind == .pick and hit(key, config.escape) and @import("Pick.zig").closeHistory(p)) return;
if (TagState.hostOf(p) == null or hit(key, config.escape)) return TagState.toRest(p);
switch (s.kind) {
.rest, .prompt => unreachable,
diff --git a/core/layout.zig b/core/layout.zig
index b72d6ec5..c8fb91f9 100644
--- a/core/layout.zig
+++ b/core/layout.zig
@@ -402,7 +402,7 @@ pub fn givePaneRows(p: *Pardes, id: usize, wanted: u16, context: usize) void {
if (missing == 0) break;
}
setColumnWeights(p, at.col, &heights);
- p.sync();
+ p.layOut();
}
pub fn applyRowSplit(p: *Pardes, cc: usize, k: usize, cur_y: u16) void {
diff --git a/core/lib_syntax.zig b/core/lib_syntax.zig
index fa6812ee..448ac7f3 100644
--- a/core/lib_syntax.zig
+++ b/core/lib_syntax.zig
@@ -102,21 +102,22 @@ pub const NodeWalk = syntax.NodeWalk;
pub const Span = syntax.Span;
pub const walkNodes = syntax.walkNodes;
-pub const Theme = colors.LegacyTheme;
-/// Every theme: pardes's own, then those imported from helix and zed. The
-/// first is the default.
-pub const themes: []const Theme = &colors.legacy_themes;
+pub const Theme = colors.Theme;
+/// Every theme: pardes's own, then those imported from helix and zed.
+pub const themes: []const Theme = &colors.themes;
+/// The one a session starts in (`orchard`), its place in `themes`.
+pub const default_theme = colors.default_theme;
/// The theme named `name`, whatever its case.
pub fn theme(name: []const u8) ?*const Theme {
- return &colors.legacy_themes[colors.themeIndex(name) orelse return null];
+ return &colors.themes[colors.themeIndex(name) orelse return null];
}
/// A theme's page and its text's ink as a file pane has them: its own, or
/// its tag's for the one theme with none (`dark`, a terminal's own).
pub fn page(th: *const Theme) [3]u8 {
- return th.bg orelse th.tag_bg;
+ return th.page orelse th.tag;
}
pub fn ink(th: *const Theme) [3]u8 {
- return th.fg orelse th.tag_fg;
+ return th.text orelse th.tag_text;
}
pub const synInk = colors.synInk;
diff --git a/core/look.zig b/core/look.zig
index 41c59cf3..3ce1e48c 100644
--- a/core/look.zig
+++ b/core/look.zig
@@ -1522,6 +1522,9 @@ pub const Landed = union(enum) { none, shown, opened: usize };
/// `Jumps new-pane` as before the walk: a pane showing the file focused,
/// else a new one.
pub fn open(p: *Pardes, from: usize, path: []const u8, at: Spot, how: How) Landed {
+ // A file a kind takes (an addon's: a picture, a PDF) is its kind's
+ // pane, as a Look of it opens (resolve), never its bytes as a text.
+ if (p.kinds.forPath(path)) |k| return openKind(p, from, path, k, at);
if (how == .replace and p.settings.jumps == .walk and path.len <= Trail.max_text and p.panes[from] != null) return walk(p, from, path, at);
if (how == .replace and focusPaneByPath(p, path, at)) return .shown;
return if (openNew(p, from, path, at, .doc)) |free| .{ .opened = free } else .none;
@@ -1557,6 +1560,38 @@ fn walk(p: *Pardes, from: usize, path: []const u8, at: Spot) Landed {
return .shown;
}
+/// The file at `path`, of kind `kind`, looked at from pane `id`: the pane
+/// of it there is focused, else one of its kind opened as a document is
+/// placed (layout.placeNew), at `at` when it says a place.
+fn openKind(p: *Pardes, id: usize, path: []const u8, kind: u8, at: Spot) Landed {
+ var place: [41]u8 = undefined;
+ if (focusPaneByPath(p, path, .{})) {
+ if (at.line > 0) lookKind(p, id, p.view().active, spotText(at, &place), false);
+ return .shown;
+ }
+ const free = p.freeSlot() orelse {
+ p.reportError(.at(id), "look", error.NoPaneSlots);
+ return .none;
+ };
+ const made = Kind.openFile(p, free, kind, path) catch |err| {
+ lookOpenFailed(p, id, path, err);
+ return .none;
+ };
+ // One its kind refuses (an image corrupt, truncated, not what its name
+ // says) is said, a failure, rather than shown blank.
+ if (made.addon.?.refused.len > 0) {
+ made.vweight = 0;
+ p.unplaced.set(free);
+ var said: Kind.Buf(miss_path_cap + 160) = .{};
+ var cut: [miss_path_cap + "…".len]u8 = undefined;
+ p.reportFailure(id, said.print("look: {s}: {s}", .{ missText(path, &cut), made.addon.?.refused.slice() }));
+ return .none;
+ }
+ layout.placeNew(p, id, id, free, .doc);
+ if (at.line > 0) lookKind(p, id, free, spotText(at, &place), true);
+ return .{ .opened = free };
+}
+
/// `path` opened at `at` in a new pane placed as `kind` places one from
/// `from`, its line half its body's rows down; null when it is not
/// (refused, said).
@@ -1808,24 +1843,7 @@ pub fn lookAt(p: *Pardes, id: usize, operand_raw: []const u8) void {
};
return missed(p, id, "{s}: the pane its list is of is gone", .{target.path});
}
- if (focusPaneByPath(p, target.path, .{})) {
- if (target.at.line > 0) lookKind(p, id, v.active, spotText(target.at, &place), false);
- return;
- }
- const free = p.freeSlot() orelse return p.reportError(.at(id), "look", error.NoPaneSlots);
- const made = Kind.openFile(p, free, target.kind, target.path) catch |err|
- return lookOpenFailed(p, id, target.path, err);
- // One its kind refuses (an image corrupt, truncated, not what
- // its name says) is said, a failure, rather than shown blank.
- if (made.addon.?.refused.len > 0) {
- made.vweight = 0;
- p.unplaced.set(free);
- var said: Kind.Buf(miss_path_cap + 160) = .{};
- var cut: [miss_path_cap + "…".len]u8 = undefined;
- return p.reportFailure(id, said.print("look: {s}: {s}", .{ missText(target.path, &cut), made.addon.?.refused.slice() }));
- }
- layout.placeNew(p, id, id, free, .doc);
- if (target.at.line > 0) lookKind(p, id, free, spotText(target.at, &place), true);
+ _ = openKind(p, id, target.path, target.kind, target.at);
},
}
}
@@ -2134,8 +2152,9 @@ test "Look hover waits without mutating the pane and input cancels it" {
_ = frame.reset(.retain_capacity);
const surface = try p.render(frame.allocator());
+ // On the selection's faint half (R7); a tag's (below) is the tags' own.
+ try std.testing.expectEqual(Color{ .rgb = p.chrome().selection_secondary }, surface.at(word_x, body_y).style.bg);
const expected_bg = colors.mix(p.theme().bg orelse p.theme().tag_bg, colors.mix(p.theme().bg orelse p.theme().tag_bg, p.theme().sel_bg));
- try std.testing.expectEqual(Color{ .rgb = expected_bg }, surface.at(word_x, body_y).style.bg);
// Background traffic in another pane does not change the text or geometry
// under this pointer and must not strand a stationary hover unarmed.
diff --git a/core/lsp/lsp.zig b/core/lsp/lsp.zig
index 7a636f72..00ffc98b 100644
--- a/core/lsp/lsp.zig
+++ b/core/lsp/lsp.zig
@@ -96,6 +96,12 @@ pub fn query(io: std.Io, arena: std.mem.Allocator, req: Req, out: *std.Io.Writer
return client.query(io, arena, req, out);
}
+/// A file opened in a pane: its language's server started and told of it
+/// (lsp_client.open), on a host's worker.
+pub fn open(io: std.Io, arena: std.mem.Allocator, req: Req) !void {
+ return client.open(io, arena, req);
+}
+
/// The one line the client answers with when it cannot answer at all, and
/// why: the core says it rather than "nothing found".
pub fn none(out: *std.Io.Writer, comptime fmt: []const u8, args: anytype) std.Io.Writer.Error!void {
diff --git a/core/mouse.zig b/core/mouse.zig
index 568470c7..04bbaeb4 100644
--- a/core/mouse.zig
+++ b/core/mouse.zig
@@ -235,7 +235,8 @@ fn kindMouse(p: *Pardes, m: Mouse) bool {
for (p.panes, 0..) |slot, id| {
const pane = slot orelse continue;
const k = pane.addon orelse continue;
- if (!pardes.Kind.takesMouse(p, k) or pane.collapsed) continue;
+ // A picker's preview through a kind is shown, not handled.
+ if (!pardes.Kind.takesMouse(p, k) or pane.collapsed or pardes.Pick.previewing(p, id)) continue;
const r = v.rects[id];
const top = p.bodyTop(pane, r) + pane.notices.span();
const x0 = r.x + config.GUTTER;
diff --git a/core/ninep/ctl.zig b/core/ninep/ctl.zig
index 2411b20f..6d78bc44 100644
--- a/core/ninep/ctl.zig
+++ b/core/ninep/ctl.zig
@@ -555,7 +555,7 @@ fn checkBuiltin(p: *Pardes, req: Req, line: []const u8, scope: builtins.Scope) ?
if (arg.len == 0 and builtins.registry.requiresArg(b)) return refuse(p, req, "wrong #args in control message", line);
const setting = config.Settings.find(word) orelse return null;
const takes = switch (setting.action) {
- .theme => if (pardes.colors.themeIndex(arg) != null) true else {
+ .theme => if (pardes.colors.themeIndex(arg) != null or pardes.colors.successorOf(arg) != null) true else {
// `refuse` quotes the line after it, all in the 128 bytes an
// Rerror carries: the names get what is left.
const head = "bad value in control message; like it: ";
@@ -882,7 +882,10 @@ const e_no_pane = "no such pane";
/// rio's kbdin (windows/rio/xfid.c:515): each rune written is a key typed
/// at the pane with the keyboard, the user's own, each done before the next
-/// and all before the write is answered. Control runes are Ctrl and a
+/// and all before the write is answered. They run as the keyboard's, not as
+/// a script's write: what they start on a worker (a picker's listing or
+/// search, a parse, a language server's answer) comes after the answer, as
+/// a keyboard's comes a frame later. Control runes are Ctrl and a
/// letter, but for Plan 9's keys (include/ALL/keyboard.h): \n or \r Enter,
/// \t Tab, \b Backspace, 0x7f Delete, 0x1b Esc, and the arrows, Home, End,
/// Page Up and Down, Insert and F1-F12 at its private-use runes. Its
@@ -890,8 +893,11 @@ const e_no_pane = "no such pane";
/// or Ctrl to the key after them.
pub fn writeKbdin(p: *Pardes, req: Req) Reply {
const view = std.unicode.Utf8View.init(req.data) catch return tree.failText(req.tag, E.INVAL, "invalid UTF-8");
- p.fs.typed = true;
- defer p.fs.typed = false;
+ // The keyboard's path, not a script's write's: nothing waits on the
+ // loop for a picker's source or an answer (Pick.asked, Stream.step).
+ const serving = p.fs.serving;
+ p.fs.serving = false;
+ defer p.fs.serving = serving;
var it = view.iterator();
var mods: pardes.Key = .{ .cp = 0 };
while (it.nextCodepointSlice()) |rune| {
@@ -946,8 +952,10 @@ fn kbdKey(rune: []const u8) pardes.Key {
/// changed since the last line is pressed or released there, in that order
/// of buttons; a move with one held drags, with none moves.
pub fn writeMousein(p: *Pardes, req: Req) Reply {
- p.fs.typed = true;
- defer p.fs.typed = false;
+ // The mouse's path, as kbdin's keys take the keyboard's.
+ const serving = p.fs.serving;
+ p.fs.serving = false;
+ defer p.fs.serving = serving;
var lines = std.mem.tokenizeScalar(u8, req.data, '\n');
while (lines.next()) |line| {
var words = std.mem.tokenizeAny(u8, line, " \t\r");
diff --git a/core/ninep/pty.zig b/core/ninep/pty.zig
index 2dd7f7f3..2671467f 100644
--- a/core/ninep/pty.zig
+++ b/core/ninep/pty.zig
@@ -597,6 +597,7 @@ test "every pty/ctl verb, and every refusal" {
try testing.expectEqual(@as(u64, "winsize 132 44\n".len), call(p, .{ .tag = 1, .op = .getattr, .node = ctl }).reply.attr.size);
try testing.expect(std.mem.startsWith(u8, rd(p, Node.of(serialOf(p), .pty_status), 0, 64).bytes, " 132 44 "));
p.update(.{ .resize = .{ .cols = 76, .rows = 24 } });
+ p.settle(); // the step's end: the pty takes its pane's size (Pardes.sizeTerminals)
try testing.expect(pane.cols != 132);
try testing.expectEqualStrings(try std.fmt.bufPrint(&said, "winsize {d} {d}\n", .{ pane.cols, pane.rows }), rd(p, ctl, 0, 64).bytes);
diff --git a/core/replica.zig b/core/replica.zig
index ccc29661..6c037cd2 100644
--- a/core/replica.zig
+++ b/core/replica.zig
@@ -7351,6 +7351,8 @@ const may_wait = [_]Wait{
.{ .what = "Save", .on = .any, .stop = "write_file", .why = "a save" },
// A program run, a shell opened or closed: the session's processes.
.{ .what = "Exec *", .on = .any, .stop = "kind", .why = "a program run: its name asked of the disk first" },
+ .{ .what = "Find *", .on = .any, .stop = "kind", .why = "the work tree it lists from, a `.jj` or `.git` above the pane's directory asked of the session's disk (Pick.workTree), as the listing itself is the session's" },
+ .{ .what = "Grep *", .on = .any, .stop = "kind", .why = "the work tree it searches, a `.jj` or `.git` above the pane's directory asked of the session's disk (Pick.workTree), as the search itself is the session's" },
.{ .what = "Exec *", .on = .any, .stop = "tty_taken", .why = "a program run in a shell: whether one has it, the session's" },
.{ .what = "Term", .on = .any, .stop = "kind", .why = "a shell opened: its name asked of the disk first" },
.{ .what = "A-n", .on = .any, .stop = "open a terminal", .why = "a shell opened" },
diff --git a/core/root.zig b/core/root.zig
index 525e796a..1b107d59 100644
--- a/core/root.zig
+++ b/core/root.zig
@@ -480,6 +480,7 @@ test {
_ = @import("FrameStats.zig");
_ = @import("Query.zig");
_ = @import("Names.zig");
+ _ = @import("syntax.zig"); // without it a -Dtest-filter run compiles none of its tests (a whole run has them)
_ = @import("Stream.zig");
_ = @import("Tables.zig");
_ = @import("Handover.zig");
@@ -783,11 +784,11 @@ test "what core/ asks of the machine is where the list says, with why: a new lin
/// state did not make it diverged a client: Pane.notices, then Tables'
/// reading, 2026-11-19). A file, its names, the reason.
const kept_out = [_]struct { []const u8, []const u8, []const u8 }{
- .{ "Core.zig", "surface facts frames own_frames theme_chrome frame_arena scratch echo undrawn", "the frame's own and the views drawn here: written by frames (and chrome by a theme's step), read by frames and the runner; no step reads them" },
+ .{ "Core.zig", "surface facts frames own_frames theme_chrome frame_arena scratch echo undrawn", "the frame's own and the views drawn here: written by frames (and chrome by a theme's step), read by frames and the runner, and the chrome by a query's rows for colours only (out of their digest, locations.Row.digest); no step's outcome reads them" },
.{ "Core.zig", "needs_frame", "whether to draw: steps set it, the loop reads it; no step's outcome reads it" },
.{ "Core.zig", "effects effects_head effects_len in_q in_head in_len opts dump_out dump_export tape", "this process's queues, options and tape, drained or set by its host" },
.{ "Core.zig", "shell_rows", "a terminal's rows as read here, swept at every update; the terminal's own digest covers its active area, not its history (Term.zig `calls`)" },
- .{ "Core.zig", "diff_output locations_cache tty_filter_palette body_chrome", "caches of pure functions of their key (a text, a theme): a step finds what it would make; a query row's colours from them are out of its digest (locations.Row.digest), and what a step asks a worker to paint is never decided by them (Stream.paintRows)" },
+ .{ "Core.zig", "diff_output locations_cache tty_filter_palette", "caches of pure functions of their key (a text, a theme): a step finds what it would make; a query row's colours from them are out of its digest (locations.Row.digest), and what a step asks a worker to paint is never decided by them (Stream.paintRows)" },
.{ "Core.zig", "retired_panes", "panes torn down this step, freed at its end" },
.{ "Core.zig", "theme_preview preview_chrome", "a themes picker's preview (colors.previewTheme): made from the live picker's cursor, in the digest with it, after every step (Pick.produceAll) and gone at its roll-up; a step reading a theme meanwhile reads the one its own state previews" },
.{ "Core.zig", "multi_first multi_stop multi_index multi_count exec_depth exec_column", "a step's own: set by a key's replay across the ranges (normal.replaySels) and a word's run (exec.zig), each put back before the step ends; between steps what `init` makes, so a load takes them as it makes them (a dump's said 2^30 ranges once: a yank sized its register by it)" },
@@ -810,6 +811,7 @@ const kept_out = [_]struct { []const u8, []const u8, []const u8 }{
.{ "Text.zig", "room", "a buffer's capacity" },
.{ "Kind.zig", "ops st gpa arena plain file opened reloads jobs record", "the kind's code and memory here: a plain kind's block is in the copy, and its state hash is checked at every call (Kind.Call.end)" },
.{ "Kind.zig", "thumb_at thumb_span pointer painted over used", "a frame's: written by a paint; `painted` is read by a tick of a kind that is not plain, whose calls are the authority's alone" },
+ .{ "Kind.zig", "drawn_from size", "a picker's preview through a kind (Pick.showKind): this process's draw count when the slot was made, which drops the answers of draws made before it, and the file's size for the line naming it until its kind draws; both read by a frame alone" },
.{ "Places.zig", "ticks ticks_gen re", "the rail's ticks, made again when the places move (`gen`), and the compiled pattern, of the pattern" },
.{ "Plumb.zig", "parsed parsed_arena", "the rules parsed, of their text" },
.{ "Stream.zig", "parse_ns paint paint_retired paint_count ahead ahead_for painted_ahead painted_on_loop ahead_seen ahead_ask", "the workers' paints and timings: how a text looks, and numbers" },
diff --git a/core/surface.zig b/core/surface.zig
index b78b58de..ce8898ad 100644
--- a/core/surface.zig
+++ b/core/surface.zig
@@ -206,9 +206,12 @@ pub const Chrome = struct {
grip_focus_ring: [3]u8 = .{ 0, 0, 0 },
/// A dirty pane's button fill.
grip_dirty: [3]u8 = .{ 0, 0, 0 },
- /// The rule between a pane's tag and its body; null is halfway between
- /// the tag's ground and the page the shell actually draws.
- tag_rule: ?[3]u8 = null,
+ /// A reading pane's ring (DESIGN.md G1'), and the ink on a filled
+ /// button.
+ grip_mode: [3]u8 = .{ 0, 0, 0 },
+ grip_ink: [3]u8 = .{ 0, 0, 0 },
+ /// The rule between a pane's tag and its body.
+ tag_rule: [3]u8 = .{ 0, 0, 0 },
/// The scroll column's width, button and scrollbar alike, in pixels at
/// a 17px tagline (acme's 12 at its font); a pixel shell scales it.
rail_px: u8 = 12,
diff --git a/core/syntax.zig b/core/syntax.zig
index 5c05300e..9fbad3cf 100644
--- a/core/syntax.zig
+++ b/core/syntax.zig
@@ -621,7 +621,7 @@ pub fn analyzeSource(gpa: std.mem.Allocator, path: []const u8, content: []const
defer tree.destroy();
var result: SourceAnalysis = .{};
errdefer result.deinit(gpa);
- if (want_declarations) result.declarations = try declarationsFromTree(gpa, content, tree, null);
+ if (want_declarations) result.declarations = (try contextFromTree(gpa, content, tree, null, &.{})).declarations;
if (want_colors) {
result.colors = try gpa.alloc(u8, content.len);
@memset(result.colors, 0);
@@ -635,23 +635,52 @@ pub fn contextDeclarations(gpa: std.mem.Allocator, path: []const u8, content: []
return analysis.declarations;
}
-/// The declarations of `content` (its path's language), on a worker
-/// (`parseApart`). `halt` ends the parse and the walk early
-/// (error.Canceled): a 1.2 MB file is seconds in a Debug build.
-pub fn declarationsApart(gpa: std.mem.Allocator, path: []const u8, content: []const u8, halt: *const std.atomic.Value(bool)) ![]ContextDeclaration {
- if (content.len == 0) return &.{};
+/// A text's context, from one parse: its declarations (the sticky
+/// headers', Locations') and its symbols (the Symbols picker's, UX DESIGN
+/// N), both of the same allocator.
+pub const Context = struct {
+ declarations: []ContextDeclaration = &.{},
+ symbols: []Symbol = &.{},
+
+ pub fn deinit(c: *Context, gpa: std.mem.Allocator) void {
+ gpa.free(c.declarations);
+ gpa.free(c.symbols);
+ c.* = .{};
+ }
+};
+
+/// `content`'s context (its path's language), parsed here: a sticky
+/// header's (File.refreshContext), a loaded text's.
+pub fn context(gpa: std.mem.Allocator, path: []const u8, content: []const u8) !Context {
+ if (content.len == 0) return .{};
+ const spec = byExt(std.Io.Dir.path.extension(path)) orelse return .{};
+ const selected = try ensure(spec);
+ const tree = selected.parser.parseString(content, null) orelse return .{};
+ defer tree.destroy();
+ return contextFromTree(gpa, content, tree, null, rulesOf(spec.name));
+}
+
+/// `content`'s context, on a worker (`parseApart`). `halt` ends the parse
+/// and the walk early (error.Canceled): a 1.2 MB file is seconds in a
+/// Debug build.
+pub fn contextApart(gpa: std.mem.Allocator, path: []const u8, content: []const u8, halt: *const std.atomic.Value(bool)) !Context {
+ if (content.len == 0) return .{};
const ext = std.Io.Dir.path.extension(path);
const spec = specs: for (&specs) |*spec| {
for (spec.exts) |choice| if (std.ascii.eqlIgnoreCase(ext, choice)) break :specs spec;
- } else return &.{};
+ } else return .{};
const tree = try parseApart(langOf(spec), content, halt);
defer tree.destroy();
- return declarationsFromTree(gpa, content, tree, halt);
+ return contextFromTree(gpa, content, tree, halt, rulesOf(spec.name));
}
-fn declarationsFromTree(gpa: std.mem.Allocator, content: []const u8, tree: *ts.Tree, halt: ?*const std.atomic.Value(bool)) ![]ContextDeclaration {
+/// The declarations and, by `rules` (none: no symbols), the symbols of a
+/// parse, in one walk of its nodes.
+fn contextFromTree(gpa: std.mem.Allocator, content: []const u8, tree: *ts.Tree, halt: ?*const std.atomic.Value(bool), rules: []const Rule) !Context {
var result: std.ArrayList(ContextDeclaration) = .empty;
errdefer result.deinit(gpa);
+ var symbols: SymbolWalk = .{ .gpa = gpa, .rules = rules, .source = content };
+ errdefer symbols.out.deinit(gpa);
// The cursor retains its ancestor stack: sibling visits do not repeatedly
// reconstruct parents in broad syntax trees. Preorder preserves source order.
var cursor = tree.rootNode().walk();
@@ -661,14 +690,21 @@ fn declarationsFromTree(gpa: std.mem.Allocator, content: []const u8, tree: *ts.T
visited += 1;
if (halt) |flag| if (visited % 4096 == 0 and flag.load(.monotonic)) return error.Canceled;
const node = cursor.node();
- if (node.isNamed()) if (contextSpan(node, content)) |span| {
- if (result.items.len == 0 or result.items[result.items.len - 1].start_line != span.start_line or
- result.items[result.items.len - 1].end_line != span.end_line)
- try result.append(gpa, span);
- };
+ if (node.isNamed()) {
+ if (contextSpan(node, content)) |span| {
+ if (result.items.len == 0 or result.items[result.items.len - 1].start_line != span.start_line or
+ result.items[result.items.len - 1].end_line != span.end_line)
+ try result.append(gpa, span);
+ }
+ if (rules.len > 0) try symbols.visit(node);
+ }
if (cursor.gotoFirstChild()) continue;
while (!cursor.gotoNextSibling()) {
- if (!cursor.gotoParent()) return result.toOwnedSlice(gpa);
+ if (!cursor.gotoParent()) {
+ const declarations = try result.toOwnedSlice(gpa);
+ errdefer gpa.free(declarations);
+ return .{ .declarations = declarations, .symbols = try symbols.out.toOwnedSlice(gpa) };
+ }
}
}
}
@@ -761,6 +797,543 @@ fn contextSpan(node: ts.Node, source: []const u8) ?ContextDeclaration {
};
}
+// ---- symbols: the Symbols picker's (UX DESIGN N) ----
+
+/// What a symbol is, in the Symbols picker's order (UX DESIGN N2): types,
+/// functions, fields, then the rest (consts, vars, modules, other) as one
+/// group. A `scope` is listed nowhere: it names its members (Rust's
+/// `impl S`: `S.new`).
+pub const SymbolKind = enum(u8) {
+ type,
+ function,
+ field,
+ constant,
+ variable,
+ module,
+ other,
+ scope,
+
+ /// Its mark in a row (UX DESIGN N4): one letter, `·` for the other.
+ pub fn mark(k: SymbolKind) []const u8 {
+ return switch (k) {
+ .type => "t",
+ .function => "f",
+ .field => "m",
+ .constant => "c",
+ .variable => "v",
+ .module => "n",
+ .other, .scope => "·",
+ };
+ }
+
+ /// Its group in the picker: 0 types, 1 functions, 2 fields, 3 the rest.
+ pub fn group(k: SymbolKind) u8 {
+ return @min(@intFromEnum(k), 3);
+ }
+};
+
+/// A declaration the Symbols picker lists: its kind, the line and bytes of
+/// its name, and the symbol it is declared in.
+pub const Symbol = struct {
+ kind: SymbolKind,
+ /// The line its name is on, from 0.
+ line: u32,
+ name_start: u32,
+ name_end: u32,
+ /// Where what its row says after its name ends (a function's
+ /// signature): its body's start, else its own end. Its row cuts it at
+ /// its name's line's end.
+ end: u32,
+ /// The symbol it is declared in, by its index + 1 (0: none): its name
+ /// qualifies this one's (`Counts.lines`).
+ parent: u32 = 0,
+};
+
+/// How a node of a grammar is a symbol (UX DESIGN N2: one table a language).
+const Rule = struct {
+ node: []const u8,
+ kind: SymbolKind,
+ how: How = .plain,
+ /// The field naming it; without it, its declarator's name (C's) or the
+ /// first name under it (`nameOf`). "": none (an anonymous scope).
+ name: []const u8 = "name",
+ /// A form's first words and the kinds they declare (`.head`).
+ heads: []const struct { []const u8, SymbolKind } = &.{},
+ /// Not one under a node of this kind (Pascal's declProc heading the
+ /// defProc that is the symbol).
+ unless_in: []const u8 = "",
+};
+
+const How = enum {
+ /// Its kind as given.
+ plain,
+ /// Only with a body (C's `struct s { ... }`; `struct s x;` names the
+ /// type, declares none); unnamed, a scope (an anonymous struct's fields
+ /// are its owner's).
+ body,
+ /// C's declaration: a function where a declarator on the way to its
+ /// name is one's; else a const where `const` says so (its kind a var).
+ declarator,
+ /// A binding whose value tells: a type, a function, a module (Zig's
+ /// `const S = struct`, `@import`, JavaScript's arrow function); else a
+ /// const or a var by its keyword.
+ value,
+ /// A binding that is a field in a type (a Python class's attribute,
+ /// Kotlin's property); else a const or a var by its keyword. Named
+ /// by a name, never a pattern (`self.x = ...`).
+ binding,
+ /// A form whose first word says what it declares (Elixir's `def f`,
+ /// Clojure's `(defn f ...)`), named by its second.
+ head,
+ /// No row: a scope its members are named in, by its own name (Rust's
+ /// `impl S`) or its owner's (an anonymous struct).
+ scope,
+};
+
+const c_rules = [_]Rule{
+ .{ .node = "function_definition", .kind = .function },
+ .{ .node = "declaration", .kind = .variable, .how = .declarator },
+ .{ .node = "field_declaration", .kind = .field, .how = .declarator },
+ .{ .node = "struct_specifier", .kind = .type, .how = .body },
+ .{ .node = "union_specifier", .kind = .type, .how = .body },
+ .{ .node = "enum_specifier", .kind = .type, .how = .body },
+ .{ .node = "enumerator", .kind = .field },
+ .{ .node = "type_definition", .kind = .type },
+ .{ .node = "preproc_def", .kind = .other },
+ .{ .node = "preproc_function_def", .kind = .other },
+};
+
+/// The kind tables, by grammar (grammar_manifest.zig): a grammar with none
+/// (JSON, CSS, HTML, Markdown, Typst) lists no symbols.
+const symbol_rules = [_]struct { []const u8, []const Rule }{
+ .{ "zig", &.{
+ // Named by its FnProto's `function` (symbolOf).
+ .{ .node = "Decl", .kind = .function, .name = "" },
+ .{ .node = "VarDecl", .kind = .variable, .how = .value, .name = "variable_type_function" },
+ .{ .node = "ContainerField", .kind = .field },
+ .{ .node = "TestDecl", .kind = .other, .name = "" },
+ .{ .node = "ContainerDecl", .kind = .type, .how = .scope, .name = "" },
+ } },
+ .{ "c", &c_rules },
+ .{ "cpp", &(c_rules ++ [_]Rule{
+ .{ .node = "class_specifier", .kind = .type, .how = .body },
+ .{ .node = "namespace_definition", .kind = .module },
+ .{ .node = "alias_declaration", .kind = .type },
+ }) },
+ .{ "rust", &.{
+ .{ .node = "function_item", .kind = .function },
+ .{ .node = "function_signature_item", .kind = .function },
+ .{ .node = "struct_item", .kind = .type },
+ .{ .node = "enum_item", .kind = .type },
+ .{ .node = "union_item", .kind = .type },
+ .{ .node = "trait_item", .kind = .type },
+ .{ .node = "type_item", .kind = .type },
+ .{ .node = "impl_item", .kind = .type, .how = .scope, .name = "type" },
+ .{ .node = "field_declaration", .kind = .field },
+ .{ .node = "enum_variant", .kind = .field },
+ .{ .node = "const_item", .kind = .constant },
+ .{ .node = "static_item", .kind = .variable },
+ .{ .node = "mod_item", .kind = .module },
+ .{ .node = "macro_definition", .kind = .other },
+ } },
+ .{ "go", &.{
+ .{ .node = "function_declaration", .kind = .function },
+ .{ .node = "method_declaration", .kind = .function },
+ .{ .node = "method_elem", .kind = .function },
+ .{ .node = "type_spec", .kind = .type },
+ .{ .node = "type_alias", .kind = .type },
+ .{ .node = "field_declaration", .kind = .field },
+ .{ .node = "const_spec", .kind = .constant },
+ .{ .node = "var_spec", .kind = .variable },
+ } },
+ .{ "python", &.{
+ .{ .node = "class_definition", .kind = .type },
+ .{ .node = "function_definition", .kind = .function },
+ .{ .node = "assignment", .kind = .variable, .how = .binding, .name = "left" },
+ } },
+ .{ "javascript", &.{
+ .{ .node = "function_declaration", .kind = .function },
+ .{ .node = "generator_function_declaration", .kind = .function },
+ .{ .node = "class_declaration", .kind = .type },
+ .{ .node = "method_definition", .kind = .function },
+ .{ .node = "field_definition", .kind = .field, .name = "property" },
+ .{ .node = "variable_declarator", .kind = .variable, .how = .value },
+ } },
+ .{ "java", &.{
+ .{ .node = "class_declaration", .kind = .type },
+ .{ .node = "interface_declaration", .kind = .type },
+ .{ .node = "enum_declaration", .kind = .type },
+ .{ .node = "record_declaration", .kind = .type },
+ .{ .node = "annotation_type_declaration", .kind = .type },
+ .{ .node = "method_declaration", .kind = .function },
+ .{ .node = "constructor_declaration", .kind = .function },
+ .{ .node = "field_declaration", .kind = .field },
+ .{ .node = "enum_constant", .kind = .field },
+ .{ .node = "constant_declaration", .kind = .constant },
+ } },
+ .{ "c_sharp", &.{
+ .{ .node = "class_declaration", .kind = .type },
+ .{ .node = "struct_declaration", .kind = .type },
+ .{ .node = "interface_declaration", .kind = .type },
+ .{ .node = "enum_declaration", .kind = .type },
+ .{ .node = "record_declaration", .kind = .type },
+ .{ .node = "delegate_declaration", .kind = .type },
+ .{ .node = "namespace_declaration", .kind = .module },
+ .{ .node = "file_scoped_namespace_declaration", .kind = .module },
+ .{ .node = "method_declaration", .kind = .function },
+ .{ .node = "constructor_declaration", .kind = .function },
+ .{ .node = "destructor_declaration", .kind = .function },
+ .{ .node = "field_declaration", .kind = .field },
+ .{ .node = "property_declaration", .kind = .field },
+ .{ .node = "event_field_declaration", .kind = .field },
+ .{ .node = "enum_member_declaration", .kind = .field },
+ } },
+ .{ "kotlin", &.{
+ .{ .node = "class_declaration", .kind = .type },
+ .{ .node = "object_declaration", .kind = .type },
+ .{ .node = "companion_object", .kind = .type, .how = .scope, .name = "" },
+ .{ .node = "function_declaration", .kind = .function },
+ .{ .node = "property_declaration", .kind = .variable, .how = .binding },
+ .{ .node = "type_alias", .kind = .type },
+ .{ .node = "enum_entry", .kind = .field },
+ } },
+ .{ "scala", &.{
+ .{ .node = "class_definition", .kind = .type },
+ .{ .node = "object_definition", .kind = .type },
+ .{ .node = "trait_definition", .kind = .type },
+ .{ .node = "enum_definition", .kind = .type },
+ .{ .node = "type_definition", .kind = .type },
+ .{ .node = "function_definition", .kind = .function },
+ .{ .node = "function_declaration", .kind = .function },
+ .{ .node = "val_definition", .kind = .constant, .how = .binding, .name = "pattern" },
+ .{ .node = "var_definition", .kind = .variable, .how = .binding, .name = "pattern" },
+ .{ .node = "simple_enum_case", .kind = .field },
+ .{ .node = "full_enum_case", .kind = .field },
+ } },
+ .{ "ruby", &.{
+ .{ .node = "class", .kind = .type },
+ .{ .node = "singleton_class", .kind = .type, .how = .scope, .name = "" },
+ .{ .node = "module", .kind = .module },
+ .{ .node = "method", .kind = .function },
+ .{ .node = "singleton_method", .kind = .function },
+ } },
+ .{ "php", &.{
+ .{ .node = "class_declaration", .kind = .type },
+ .{ .node = "interface_declaration", .kind = .type },
+ .{ .node = "trait_declaration", .kind = .type },
+ .{ .node = "enum_declaration", .kind = .type },
+ .{ .node = "function_definition", .kind = .function },
+ .{ .node = "method_declaration", .kind = .function },
+ .{ .node = "property_declaration", .kind = .field },
+ .{ .node = "enum_case", .kind = .field },
+ .{ .node = "const_declaration", .kind = .constant },
+ .{ .node = "namespace_definition", .kind = .module },
+ } },
+ .{ "bash", &.{
+ .{ .node = "function_definition", .kind = .function },
+ .{ .node = "variable_assignment", .kind = .variable, .how = .binding },
+ } },
+ .{ "haskell", &.{
+ .{ .node = "data_type", .kind = .type },
+ .{ .node = "newtype", .kind = .type },
+ .{ .node = "type_synomym", .kind = .type },
+ .{ .node = "class", .kind = .type },
+ .{ .node = "instance", .kind = .type, .how = .scope },
+ .{ .node = "function", .kind = .function },
+ .{ .node = "bind", .kind = .constant },
+ .{ .node = "data_constructor", .kind = .field },
+ } },
+ .{ "ocaml", &.{
+ .{ .node = "type_binding", .kind = .type },
+ .{ .node = "module_binding", .kind = .module },
+ .{ .node = "module_type_definition", .kind = .type },
+ .{ .node = "class_binding", .kind = .type },
+ .{ .node = "method_definition", .kind = .function },
+ .{ .node = "let_binding", .kind = .constant, .how = .value, .name = "pattern" },
+ .{ .node = "field_declaration", .kind = .field },
+ .{ .node = "constructor_declaration", .kind = .field },
+ } },
+ .{ "erlang", &.{
+ .{ .node = "fun_decl", .kind = .function },
+ .{ .node = "record_decl", .kind = .type },
+ .{ .node = "record_field", .kind = .field },
+ .{ .node = "type_alias", .kind = .type },
+ .{ .node = "pp_define", .kind = .other },
+ .{ .node = "module_attribute", .kind = .module },
+ } },
+ .{ "elixir", &.{
+ .{ .node = "call", .kind = .other, .how = .head, .heads = &.{
+ .{ "defmodule", .module }, .{ "defprotocol", .type }, .{ "def", .function },
+ .{ "defp", .function }, .{ "defdelegate", .function }, .{ "defguard", .function },
+ .{ "defguardp", .function }, .{ "defmacro", .other }, .{ "defmacrop", .other },
+ } },
+ } },
+ .{ "clojure", &.{
+ .{ .node = "list_lit", .kind = .other, .how = .head, .heads = &.{
+ .{ "ns", .module }, .{ "def", .constant }, .{ "defonce", .constant }, .{ "defn", .function },
+ .{ "defn-", .function }, .{ "defmulti", .function }, .{ "defmethod", .function }, .{ "defmacro", .other },
+ .{ "defrecord", .type }, .{ "deftype", .type }, .{ "defprotocol", .type }, .{ "definterface", .type },
+ .{ "defstruct", .type },
+ } },
+ } },
+ .{ "fortran", &.{
+ .{ .node = "module", .kind = .module },
+ .{ .node = "program", .kind = .module },
+ .{ .node = "subroutine", .kind = .function },
+ .{ .node = "function", .kind = .function },
+ .{ .node = "derived_type_definition", .kind = .type },
+ .{ .node = "variable_declaration", .kind = .variable, .how = .binding },
+ } },
+ .{ "ada", &.{
+ .{ .node = "package_declaration", .kind = .module },
+ .{ .node = "package_body", .kind = .module },
+ .{ .node = "full_type_declaration", .kind = .type },
+ .{ .node = "subprogram_declaration", .kind = .function },
+ .{ .node = "subprogram_body", .kind = .function },
+ .{ .node = "object_declaration", .kind = .variable, .how = .binding },
+ .{ .node = "component_declaration", .kind = .field },
+ } },
+ .{ "pascal", &.{
+ .{ .node = "declType", .kind = .type },
+ .{ .node = "declProc", .kind = .function, .unless_in = "defProc" },
+ .{ .node = "defProc", .kind = .function },
+ .{ .node = "declConst", .kind = .constant },
+ .{ .node = "declVar", .kind = .variable, .how = .binding },
+ .{ .node = "declField", .kind = .field },
+ } },
+ .{ "powershell", &.{
+ .{ .node = "function_statement", .kind = .function },
+ .{ .node = "class_statement", .kind = .type },
+ .{ .node = "class_method_definition", .kind = .function },
+ .{ .node = "class_property_definition", .kind = .field },
+ .{ .node = "enum_statement", .kind = .type },
+ .{ .node = "enum_member", .kind = .field },
+ } },
+};
+
+fn rulesOf(grammar: []const u8) []const Rule {
+ for (symbol_rules) |entry| if (std.mem.eql(u8, entry[0], grammar)) return entry[1];
+ return &.{};
+}
+
+/// A walk's symbols, node by node in preorder (`contextFromTree`).
+const SymbolWalk = struct {
+ gpa: std.mem.Allocator,
+ rules: []const Rule,
+ source: []const u8,
+ out: std.ArrayList(Symbol) = .empty,
+ /// The scopes the node is in, the innermost last.
+ scopes: [max_scopes]Scope = undefined,
+ depth: u8 = 0,
+
+ /// Where a scope ends, its kind, and the symbol its members are named
+ /// in (an index + 1, 0 none).
+ const Scope = struct { end: u32, kind: SymbolKind, symbol: u32 };
+ /// Deeper scopes are their parent's.
+ const max_scopes = 32;
+
+ fn visit(w: *SymbolWalk, node: ts.Node) !void {
+ while (w.depth > 0 and w.scopes[w.depth - 1].end <= node.startByte()) w.depth -= 1;
+ const in: Scope = if (w.depth > 0) w.scopes[w.depth - 1] else .{ .end = 0, .kind = .module, .symbol = 0 };
+ // A test's body (a macro's) lists nothing: its types are its
+ // locals' (a test's `const Find = struct`).
+ if (in.kind == .other) return;
+ const kind_name = node.kind();
+ const rule = for (w.rules) |r| {
+ if (std.mem.eql(u8, r.node, kind_name)) break r;
+ } else return;
+ const found = symbolOf(rule, node, w.source, in.kind) orelse return;
+ // A body's consts and vars are its locals, none of them listed.
+ const local = in.kind != .type and in.kind != .module and in.kind != .scope;
+ if (local and (found.kind == .constant or found.kind == .variable)) return;
+ var named = in.symbol;
+ if (found.name) |name| {
+ // A longer name is cut (a test's sentence), on a character.
+ var end = name.endByte();
+ if (end - name.startByte() > max_name) {
+ end = name.startByte() + max_name;
+ while (end > name.startByte() and w.source[end] & 0xc0 == 0x80) end -= 1;
+ }
+ try w.out.append(w.gpa, .{
+ .kind = found.kind,
+ .line = name.startPoint().row,
+ .name_start = name.startByte(),
+ .name_end = end,
+ .end = found.end,
+ .parent = in.symbol,
+ });
+ // A const's or a field's members are not named in it.
+ if (found.kind == .type or found.kind == .function or found.kind == .module or found.kind == .scope) named = @intCast(w.out.items.len);
+ }
+ if (w.depth == max_scopes) return;
+ w.scopes[w.depth] = .{ .end = node.endByte(), .kind = if (found.kind == .scope) rule.kind else found.kind, .symbol = named };
+ w.depth += 1;
+ }
+};
+
+/// What node `node` declares by `rule`, in a scope of kind `in`: its kind,
+/// its name (null: an anonymous scope) and where its row's words end.
+fn symbolOf(rule: Rule, node: ts.Node, source: []const u8, in: SymbolKind) ?struct { kind: SymbolKind, name: ?ts.Node, end: u32 } {
+ if (rule.unless_in.len > 0) if (node.parent()) |up| if (std.mem.eql(u8, up.kind(), rule.unless_in)) return null;
+ var kind = rule.kind;
+ var name: ?ts.Node = null;
+ var end = if (node.childByFieldName("body")) |body| body.startByte() else node.endByte();
+ switch (rule.how) {
+ .plain => name = nameOf(node, rule.name),
+ .scope => {
+ name = nameOf(node, rule.name);
+ kind = .scope;
+ },
+ .body => {
+ if (node.childByFieldName("body") == null) return null;
+ name = nameOf(node, rule.name);
+ if (name == null) kind = .scope;
+ },
+ .declarator => {
+ var d = node;
+ while (d.childByFieldName("declarator")) |next| {
+ if (std.mem.eql(u8, next.kind(), "function_declarator")) kind = .function;
+ d = next;
+ }
+ name = nameOf(node, rule.name);
+ if (kind == .variable and constant(source, node.startByte(), name orelse return null)) kind = .constant;
+ },
+ .value => {
+ // Named by a name, never a pattern (`const { a, b } = ...`,
+ // OCaml's `let () = ...`).
+ name = nameOf(node, rule.name);
+ if (name) |n| if (!nameLike(n.kind())) return null;
+ kind = valueKind(node, source) orelse kind;
+ // JavaScript's keyword is its declaration's (`const a = 1, b`).
+ const from = if (std.mem.eql(u8, rule.node, "variable_declarator")) (node.parent() orelse node).startByte() else node.startByte();
+ if (kind == .variable and constant(source, from, name orelse return null)) kind = .constant;
+ },
+ .binding => {
+ const n = node.childByFieldName(rule.name) orelse nameOf(node, rule.name) orelse return null;
+ if (!nameLike(n.kind())) return null;
+ name = n;
+ if (in == .type) kind = .field else if (kind == .variable and constant(source, node.startByte(), n)) kind = .constant;
+ },
+ .head => {
+ const elixir = std.mem.eql(u8, rule.node, "call");
+ const first = (if (elixir) node.childByFieldName("target") else node.namedChild(0)) orelse return null;
+ const word = source[first.startByte()..first.endByte()];
+ kind = for (rule.heads) |h| {
+ if (std.mem.eql(u8, h[0], word)) break h[1];
+ } else return null;
+ var second = (if (elixir) childOfKind(node, "arguments") else node.namedChild(1)) orelse return null;
+ if (elixir) second = second.namedChild(0) orelse return null;
+ if (second.childByFieldName("target")) |target| second = target;
+ name = if (nameLike(second.kind())) second else nameOf(second, "name");
+ },
+ }
+ // Zig's: a function's name is its prototype's, its body a Block; a
+ // test's its string.
+ if (std.mem.eql(u8, rule.node, "Decl")) {
+ const proto = childOfKind(node, "FnProto") orelse return null;
+ name = proto.childByFieldName("function");
+ if (childOfKind(node, "Block")) |block| end = block.startByte();
+ } else if (std.mem.eql(u8, rule.node, "TestDecl")) {
+ const first = node.namedChild(0) orelse return null;
+ if (std.mem.eql(u8, first.kind(), "Block")) return null;
+ name = first;
+ if (childOfKind(node, "Block")) |block| end = block.startByte();
+ }
+ if (name == null and kind != .scope) return null;
+ if (name) |n| if (n.endByte() <= n.startByte()) return null;
+ return .{ .kind = kind, .name = name, .end = end };
+}
+
+/// The longest name a symbol has: a longer one is cut.
+const max_name = 200;
+
+/// The node naming `node`: its field `field`, whole on its line (C++'s
+/// `namespace v8::internal`, Rust's `impl Vec<T>`); without one, its
+/// declarator's (C's `int *f(void)`: `f`); else the first name under it,
+/// past its type, value, body and parameters (Kotlin's, Fortran's).
+fn nameOf(node: ts.Node, field: []const u8) ?ts.Node {
+ if (field.len == 0) return null;
+ var n = node;
+ if (node.childByFieldName(field)) |f| {
+ if (f.startPoint().row == f.endPoint().row) return f;
+ n = f;
+ } else while (n.childByFieldName("declarator")) |d| n = d;
+ if (nameLike(n.kind())) return n;
+ if (n.childByFieldName("name")) |f| if (nameLike(f.kind())) return f;
+ return firstName(n, 3);
+}
+
+fn firstName(node: ts.Node, depth: u8) ?ts.Node {
+ if (depth == 0) return null;
+ const skipped = [_][]const u8{ "type", "value", "body", "parameters", "return_type", "returns", "result", "superclass", "arguments", "default", "trait" };
+ var i: u32 = 0;
+ while (i < node.childCount()) : (i += 1) {
+ const child = node.child(i) orelse continue;
+ if (!child.isNamed()) continue;
+ const field = node.fieldNameForChild(i) orelse "";
+ if (for (skipped) |s| {
+ if (std.mem.eql(u8, s, field)) break true;
+ } else false) continue;
+ const kind = child.kind();
+ if (std.mem.indexOf(u8, kind, "modifier") != null or std.mem.indexOf(u8, kind, "annotation") != null or
+ std.mem.indexOf(u8, kind, "parameter") != null or std.mem.indexOf(u8, kind, "attribute") != null or
+ std.mem.indexOf(u8, kind, "decorator") != null or std.mem.indexOf(u8, kind, "comment") != null or
+ std.mem.indexOf(u8, kind, "literal") != null) continue;
+ if (nameLike(kind)) return child;
+ if (firstName(child, depth - 1)) |found| return found;
+ }
+ return null;
+}
+
+/// A node kind that is a name: an identifier, a `*_name`, a word.
+fn nameLike(kind: []const u8) bool {
+ if (std.ascii.endsWithIgnoreCase(kind, "identifier") or std.mem.endsWith(u8, kind, "name")) return true;
+ for ([_][]const u8{ "word", "constant", "atom", "variable", "constructor", "type_constructor", "alias" }) |k| {
+ if (std.mem.eql(u8, kind, k)) return true;
+ }
+ return false;
+}
+
+/// What a binding's value makes it, where it says (else null): Zig's
+/// `struct {...}`, `error{...}`, `@This()`, `@Type(...)` a type and
+/// `@import(...)` a module; JavaScript's function a function and class a
+/// type; OCaml's `let f x = ...` (a parameter) a function.
+fn valueKind(node: ts.Node, source: []const u8) ?SymbolKind {
+ if (node.childByFieldName("value")) |value| {
+ const kind = value.kind();
+ for ([_][]const u8{ "arrow_function", "function_expression", "generator_function" }) |k| if (std.mem.eql(u8, kind, k)) return .function;
+ if (std.mem.eql(u8, kind, "class")) return .type;
+ return null;
+ }
+ if (childOfKind(node, "parameter") != null) return .function;
+ // Zig's value: the last of the VarDecl, under its ErrorUnionExpr.
+ var v = node.namedChild(node.namedChildCount() -| 1) orelse return null;
+ while (std.mem.eql(u8, v.kind(), "ErrorUnionExpr")) v = v.namedChild(0) orelse return null;
+ if (!std.mem.eql(u8, v.kind(), "SuffixExpr")) return null;
+ const first = v.namedChild(0) orelse return null;
+ const kind = first.kind();
+ if (std.mem.eql(u8, kind, "ContainerDecl") or std.mem.eql(u8, kind, "ErrorSetDecl")) return .type;
+ if (!std.mem.eql(u8, kind, "BUILTINIDENTIFIER")) return null;
+ const builtin = source[first.startByte()..first.endByte()];
+ if (std.mem.eql(u8, builtin, "@This") or std.mem.eql(u8, builtin, "@Type")) return .type;
+ if ((std.mem.eql(u8, builtin, "@import") or std.mem.eql(u8, builtin, "@cImport")) and v.namedChildCount() == 2) return .module;
+ return null;
+}
+
+/// Whether a binding is a const: a keyword says so between `from` and its
+/// name, or after the name before its value (Ada's `K : constant`).
+fn constant(source: []const u8, from: usize, name: ts.Node) bool {
+ const after = source[name.endByte()..];
+ const before_value = std.mem.indexOfAny(u8, after, "=\n") orelse after.len;
+ for ([_][]const u8{ source[@min(from, name.startByte())..name.startByte()], after[0..before_value] }) |text| {
+ var words = std.mem.tokenizeAny(u8, text, " \t\r\n,:()*&");
+ while (words.next()) |word| for ([_][]const u8{ "const", "constexpr", "val", "final", "readonly", "parameter", "constant" }) |k| {
+ if (std.mem.eql(u8, word, k)) return true;
+ };
+ }
+ return false;
+}
+
fn paint(styles: []u8, source: []const u8, selected: Selected) void {
const tree = selected.parser.parseString(source, null) orelse return;
defer tree.destroy();
@@ -2180,3 +2753,131 @@ test "syntax: a grammar handed in at run time colours and walks as the one compi
forgetLanguages();
try std.testing.expect(!supportsPath("x.mine"));
}
+
+/// Each of `source`'s symbols as `mark qualified name`, in the walk's order.
+fn symbolLines(gpa: std.mem.Allocator, path: []const u8, source: []const u8) ![]const u8 {
+ var made = try context(gpa, path, source);
+ defer made.deinit(gpa);
+ var out: std.Io.Writer.Allocating = .init(gpa);
+ defer out.deinit();
+ for (made.symbols) |sym| {
+ if (sym.kind == .scope) continue;
+ try out.writer.print("{s} ", .{sym.kind.mark()});
+ var chain: [8]u32 = undefined;
+ var n: usize = 0;
+ var up = sym.parent;
+ while (up != 0 and n < chain.len) : (up = made.symbols[up - 1].parent) {
+ chain[n] = up;
+ n += 1;
+ }
+ while (n > 0) {
+ n -= 1;
+ const s = made.symbols[chain[n] - 1];
+ try out.writer.print("{s}.", .{source[s.name_start..s.name_end]});
+ }
+ try out.writer.print("{s}\n", .{source[sym.name_start..sym.name_end]});
+ }
+ return out.toOwnedSlice();
+}
+
+test "syntax symbols: a Zig file's types, functions, fields and the rest by their declarations and values, each named in the containers it is in; a function's locals and an unnamed test none of them (UX DESIGN N2)" {
+ if (comptime !minimal_grammars) return error.SkipZigTest;
+ const gpa = std.testing.allocator;
+ start(gpa);
+ defer stop();
+ const source =
+ \\const std = @import("std");
+ \\pub const Counts = struct {
+ \\ lines: usize = 0,
+ \\ pub const zero: Counts = .{};
+ \\ pub fn add(c: *Counts) void {
+ \\ const local = 1;
+ \\ c.lines += local;
+ \\ }
+ \\};
+ \\const Mode = enum { fast, slow };
+ \\const Failure = error{ Late, Lost };
+ \\const Self = @This();
+ \\var hits: u32 = 0;
+ \\fn List(comptime T: type) type {
+ \\ return struct { items: []T };
+ \\}
+ \\test "count" {
+ \\ const Local = struct {
+ \\ fn helper() void {}
+ \\ };
+ \\ _ = Local;
+ \\}
+ \\test {}
+ \\extern fn tick() void;
+ \\
+ ;
+ // A test's name longer than a row's room is cut, its body still none.
+ const xs: [250]u8 = @splat('x');
+ const long = "test \"" ++ xs ++ "\" {\n const Inner = struct {};\n _ = Inner;\n}\n";
+ const lines = try symbolLines(gpa, "a.zig", source ++ long);
+ defer gpa.free(lines);
+ try std.testing.expectEqualStrings(
+ \\n std
+ \\t Counts
+ \\m Counts.lines
+ \\c Counts.zero
+ \\f Counts.add
+ \\t Mode
+ \\m Mode.fast
+ \\m Mode.slow
+ \\t Failure
+ \\t Self
+ \\v hits
+ \\f List
+ \\m List.items
+ \\· "count"
+ \\f tick
+ \\
+ ++ "· \"" ++ xs[0 .. max_name - 1].* ++ "\n", lines);
+}
+
+test "syntax symbols: C, C++, Rust, Go, Python and JavaScript by their kind tables, members named in their types, an impl's in its type, locals none" {
+ if (!full_grammars) return error.SkipZigTest;
+ const gpa = std.testing.allocator;
+ start(gpa);
+ defer stop();
+ const cases = [_]struct { path: []const u8, source: []const u8, want: []const u8 }{
+ .{ .path = "a.c", .source = "#define LIMIT 4\nstruct point { int x; int *y; };\ntypedef struct { int a; } pair;\nenum color { RED };\nstatic int counter = 0;\nconst int limit = 4;\nint add(int a) { int local = a; return local; }\nint later(void);\nstruct point p;\n", .want = "· LIMIT\nt point\nm point.x\nm point.y\nt pair\nm pair.a\nt color\nm color.RED\nv counter\nc limit\nf add\nf later\nv p\n" },
+ .{ .path = "a.cc", .source = "namespace torque {\nclass Parser : public Base {\n public:\n Parser();\n int Parse(int depth) const { return depth; }\n int depth_;\n};\nint Parser::Run(int n) { int local = n; return local; }\nusing Alias = int;\n}\nnamespace v8::internal {\nint flags;\n}\n", .want = "n torque\nt torque.Parser\nf torque.Parser.Parser\nf torque.Parser.Parse\nm torque.Parser.depth_\nf torque.Parser::Run\nt torque.Alias\nn v8::internal\nv v8::internal.flags\n" },
+ .{ .path = "a.rs", .source = "mod m {\npub struct S { pub a: u32 }\nenum E { A, B(u32) }\ntrait T { fn f(&self); }\nimpl S { pub fn new() -> Self { let x = 1; S { a: x } } }\nconst C: u32 = 1;\nstatic G: u32 = 2;\nmacro_rules! mac { () => {} }\n}\n", .want = "n m\nt m.S\nm m.S.a\nt m.E\nm m.E.A\nm m.E.B\nt m.T\nf m.T.f\nf m.S.new\nc m.C\nv m.G\n· m.mac\n" },
+ .{ .path = "a.go", .source = "package main\ntype S struct { A int }\ntype I interface { M() }\nconst C = 1\nvar V = 2\nfunc F() { var x = 1; _ = x }\nfunc (s *S) M() {}\n", .want = "t S\nm S.A\nt I\nf I.M\nc C\nv V\nf F\nf M\n" },
+ .{ .path = "a.py", .source = "X = 1\nclass C:\n attr = 2\n def m(self):\n y = 3\n self.z = 4\ndef f():\n pass\n", .want = "v X\nt C\nm C.attr\nf C.m\nf f\n" },
+ .{ .path = "a.js", .source = "const A = 1;\nlet b = 2;\nfunction f() { const local = 1; }\nclass K { field = 1; m() {} }\nconst arrow = () => 1;\nconst Klass = class {};\nconst { x, y } = A;\n", .want = "c A\nv b\nf f\nt K\nm K.field\nf K.m\nf arrow\nt Klass\n" },
+ };
+ for (cases) |case| {
+ const lines = try symbolLines(gpa, case.path, case.source);
+ defer gpa.free(lines);
+ std.testing.expectEqualStrings(case.want, lines) catch |err| {
+ std.debug.print("in {s}\n", .{case.path});
+ return err;
+ };
+ }
+}
+
+test "syntax symbols: every kind table names nodes of its grammar, and a grammar with none (JSON) lists no symbol" {
+ if (!full_grammars) return error.SkipZigTest;
+ const gpa = std.testing.allocator;
+ start(gpa);
+ defer stop();
+ var tables: usize = 0;
+ for (symbol_rules) |entry| {
+ const spec = for (&specs) |*spec| {
+ if (std.mem.eql(u8, spec.name, entry[0])) break spec;
+ } else return error.NoGrammar;
+ for (entry[1]) |rule| std.testing.expect(langOf(spec).idForNodeKind(rule.node, true) != 0) catch |err| {
+ std.debug.print("{s} has no node {s}\n", .{ entry[0], rule.node });
+ return err;
+ };
+ tables += 1;
+ }
+ try std.testing.expectEqual(@as(usize, 23), tables);
+ var made = try context(gpa, "a.json", "{\"a\": 1}\n");
+ defer made.deinit(gpa);
+ try std.testing.expectEqual(@as(usize, 0), made.symbols.len);
+}
diff --git a/core/term/terminal.zig b/core/term/terminal.zig
index 88eb1443..1c2310b1 100644
--- a/core/term/terminal.zig
+++ b/core/term/terminal.zig
@@ -418,10 +418,10 @@ pub const min_contrast: f64 = 1.5;
/// `generate256Color` over the theme's sixteen), made again only when the
/// theme's are not the ones `cache` was made of.
pub fn filterPalette(cache: *FilterPalette, ink: *const Ink) *const [256][3]u8 {
- const wanted: FilterPalette.Key = .{ .bg = ink.bg orelse ink.tag_bg, .fg = ink.fg orelse ink.tag_fg, .base = ink.base };
+ const wanted: FilterPalette.Key = .{ .bg = ink.bg, .fg = ink.fg, .ansi = ink.ansi };
if (cache.key) |old| if (std.meta.eql(old, wanted)) return &cache.colors;
var seed = GColor.default;
- for (ink.base, 0..) |rgb, i| seed[i] = asGhostRgb(rgb);
+ for (ink.ansi, 0..) |rgb, i| seed[i] = asGhostRgb(rgb);
const colors = GColor.generate256Color(seed, .empty, asGhostRgb(wanted.bg), asGhostRgb(wanted.fg), false);
for (&cache.colors, colors) |*dst, src| dst.* = asTriple(src);
cache.key = wanted;
@@ -1333,6 +1333,12 @@ fn cellStyle(ink: *const Ink, ci: ghostty_vt.PageList.Cell, filtered: ?*Filter,
},
else => {},
};
+ // SGR faint on the page's text is the page's dim ink (DESIGN.md R15):
+ // toward the page, so as faint on a light theme as on a dark one.
+ if (cs.dim and std.meta.eql(cs.fg, plain.Color{ .rgb = ink.fg })) {
+ cs.fg = .{ .rgb = ink.dim };
+ cs.dim = false;
+ }
return cs;
}
@@ -1353,8 +1359,8 @@ pub fn filterOf(ink: *const Ink, palette: *FilterPalette, vt: ?*const ghostty_vt
for (&source, 0..) |*rgb, i|
rgb.* = t.colorForXterm(.{ .palette = @intCast(i) }) orelse rgb.*;
}
- var theme_bg = asGhostRgb(ink.bg orelse ink.tag_bg);
- var theme_fg = asGhostRgb(ink.fg orelse ink.tag_fg);
+ var theme_bg = asGhostRgb(ink.bg);
+ var theme_fg = asGhostRgb(ink.fg);
var dynamic_bg = if (vt) |t| t.colorForXterm(.{ .dynamic = .background }) else null;
var dynamic_fg = if (vt) |t| t.colorForXterm(.{ .dynamic = .foreground }) else null;
if (vt != null and vt.?.modes.get(.reverse_colors)) {
@@ -1504,10 +1510,7 @@ fn colorDistance(a: GColor.RGB, b: GColor.RGB) u32 {
fn ghostColor(ink: *const Ink, color: ghostty_vt.Style.Color, is_bg: bool) plain.Color {
return switch (color) {
- .none => blk: {
- const t = if (is_bg) ink.bg else ink.fg;
- break :blk if (t) |c| .{ .rgb = c } else .default;
- },
+ .none => if (ink.host) .default else .{ .rgb = if (is_bg) ink.bg else ink.fg },
.palette => |idx| ink.palColor(idx),
.rgb => |rgb| .{ .rgb = .{ rgb.r, rgb.g, rgb.b } },
};
diff --git a/core/themes/acme.zig b/core/themes/acme.zig
index 34d99805..030874fc 100644
--- a/core/themes/acme.zig
+++ b/core/themes/acme.zig
@@ -1,10 +1,16 @@
//! acme's yellow page — the light theme, and the one that has to resolve
-//! `palette` itself. A theme that only dresses the page can leave a child's
+//! `ansi` itself. A theme that only dresses the page can leave a child's
//! ANSI indices alone and let the host answer them; on #ffffea that is how you
//! get pale yellow `ls` output on pale yellow paper. So the sixteen below are
//! darkened for paper: index 7 (the "white" a shell writes most of its output
//! in) is a mid grey, and 15 (bright white) is BLACK, because a program asking
//! for the brightest color on a light page means "make this stand out".
+//! Each of the sixteen reads 4.5:1 on the page (DESIGN.md E1, the native
+//! floor): 6 #118888 -> #038384, 8 #888888 -> #757575 and 13 #bb44bb ->
+//! #b942b9, each held darker in its hue (R0); 10 #33aa33, 11 #aa7700 and 14
+//! #22aaaa held there land on their normal colour, so they go 0.06 darker
+//! than it in OKLab, #016e08, #785300 and #017070 (R14: a bright one is
+//! darker on a light page, as 15 is black).
//!
//! Every colour below that acme has is acme's own, from plan9port's acme.c
//! iconinit and draw.h: the tag #eaffff and body #ffffea (each 25% of
@@ -24,41 +30,40 @@
//! (draw.h's DMedblue): a navy that reads as ink until you look for it.
pub const theme = .{
.name = "acme",
- .bg = .{ 0xff, 0xff, 0xea },
- .fg = .{ 0x00, 0x00, 0x00 },
- .sel_bg = .{ 0xee, 0xee, 0x9e },
- .sel_fg = .{ 0x00, 0x00, 0x00 },
- .tag_bg = .{ 0xea, 0xff, 0xff },
- .tag_fg = .{ 0x00, 0x00, 0x00 },
- .tag_name_fg = .{ 0x00, 0x00, 0x99 },
- .box = .{ 0x88, 0x88, 0xcc },
- .box_dim = .{ 0xea, 0xff, 0xff },
- .kw = .{ 0x97, 0x0d, 0xae },
- .str = .{ 0x00, 0x77, 0x33 },
- .num = .{ 0xa0, 0x52, 0x00 },
+ .page = .{ 0xff, 0xff, 0xea },
+ .text = .{ 0x00, 0x00, 0x00 },
+ .selection = .{ 0xee, 0xee, 0x9e },
+ .selection_text = .{ 0x00, 0x00, 0x00 },
+ .tag = .{ 0xea, 0xff, 0xff },
+ .tag_text = .{ 0x00, 0x00, 0x00 },
+ .tag_name = .{ 0x00, 0x00, 0x99 },
+ .accent = .{ 0x88, 0x88, 0xcc },
+ .keyword = .{ 0x97, 0x0d, 0xae },
+ .string = .{ 0x00, 0x77, 0x33 },
+ .number = .{ 0xa0, 0x52, 0x00 },
.comment = .{ 0x55, 0x55, 0x55 },
- .lineno = .{ 0x99, 0x99, 0x80 },
- .scroll_track = .{ 0x99, 0x99, 0x4c },
- .scroll_thumb = .{ 0xff, 0xff, 0xea },
+ .line_number = .{ 0x99, 0x99, 0x80 },
+ .rail = .{ 0x99, 0x99, 0x4c },
+ .rail_thumb = .{ 0xff, 0xff, 0xea },
// acme paints a column with no window white (cols.c:187).
- .empty_col = .{ 0xff, 0xff, 0xff },
- .border = .{ 0x00, 0x00, 0x00 },
+ .empty_column = .{ 0xff, 0xff, 0xff },
+ .rule = .{ 0x00, 0x00, 0x00 },
.tag_rule = .{ 0x88, 0x88, 0xcc },
.rule_px = 2,
- .box_border = .{ 0x88, 0x88, 0xcc },
- .box_dirty = .{ 0x00, 0x00, 0x99 },
+ .grip_ring = .{ 0x88, 0x88, 0xcc },
+ .dirty = .{ 0x00, 0x00, 0x99 },
.rail_px = 12,
- .tag_sel_bg = .{ 0x9e, 0xee, 0xee },
- // A reading pane's tag: the page's yellow, a shade down (pick-ui's).
- .tag_reading_bg = .{ 0xf3, 0xf0, 0xcc },
- .sweep_bg = .{ .{ 0xee, 0xee, 0x9e }, .{ 0xaa, 0x00, 0x00 }, .{ 0x00, 0x66, 0x00 } },
- .sweep_fg = .{ .{ 0x00, 0x00, 0x00 }, .{ 0xff, 0xff, 0xff }, .{ 0xff, 0xff, 0xff } },
- .column_box = .{ 0x88, 0x88, 0xcc },
- .column_box_dim = .{ 0x88, 0x88, 0xcc },
- .palette = .{
+ .tag_selection = .{ 0x9e, 0xee, 0xee },
+ .sweeps = .{
+ .{ .ground = .{ 0xee, 0xee, 0x9e }, .text = .{ 0x00, 0x00, 0x00 } },
+ .{ .ground = .{ 0xaa, 0x00, 0x00 }, .text = .{ 0xff, 0xff, 0xff } },
+ .{ .ground = .{ 0x00, 0x66, 0x00 }, .text = .{ 0xff, 0xff, 0xff } },
+ },
+ .column_grip = .{ 0x88, 0x88, 0xcc },
+ .ansi = .{
.{ 0x00, 0x00, 0x00 }, .{ 0xaa, 0x22, 0x22 }, .{ 0x22, 0x80, 0x22 }, .{ 0x88, 0x66, 0x00 },
- .{ 0x22, 0x44, 0xbb }, .{ 0x99, 0x33, 0x99 }, .{ 0x11, 0x88, 0x88 }, .{ 0x55, 0x55, 0x55 },
- .{ 0x88, 0x88, 0x88 }, .{ 0xcc, 0x33, 0x33 }, .{ 0x33, 0xaa, 0x33 }, .{ 0xaa, 0x77, 0x00 },
- .{ 0x33, 0x55, 0xdd }, .{ 0xbb, 0x44, 0xbb }, .{ 0x22, 0xaa, 0xaa }, .{ 0x00, 0x00, 0x00 },
+ .{ 0x22, 0x44, 0xbb }, .{ 0x99, 0x33, 0x99 }, .{ 0x03, 0x83, 0x84 }, .{ 0x55, 0x55, 0x55 },
+ .{ 0x75, 0x75, 0x75 }, .{ 0xcc, 0x33, 0x33 }, .{ 0x01, 0x6e, 0x08 }, .{ 0x78, 0x53, 0x00 },
+ .{ 0x33, 0x55, 0xdd }, .{ 0xb9, 0x42, 0xb9 }, .{ 0x01, 0x70, 0x70 }, .{ 0x00, 0x00, 0x00 },
},
};
diff --git a/core/themes/alucard.zig b/core/themes/alucard.zig
index 1b5695cc..42ed888b 100644
--- a/core/themes/alucard.zig
+++ b/core/themes/alucard.zig
@@ -9,53 +9,53 @@
//! - unfocused tag text #6c664b -> #5d5841: 3.75:1 on #cfcfde, tag text needs 4.5:1 to be read and run
//! Upstream notes: The README gives Alucard only as a palette; roles follow
//! dracula.yml, UI surfaces it lacks are derived.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused tag ground #fffbeb -> #b9b9c8: 1.49:1 off the tag, now 1.26:1 (R4, H: a focus step off the tag, and the loudest)
pub const theme = .{
.name = "alucard",
// ~/05-genizah/dracula-theme/README.md:34 Alucard Background; role as dracula.yml editor.background *BG
- .bg = .{ 0xff, 0xfb, 0xeb },
+ .page = .{ 0xff, 0xfb, 0xeb },
// ~/05-genizah/dracula-theme/README.md:37 Alucard Foreground; role as dracula.yml editor.foreground *FG
- .fg = .{ 0x1f, 0x1f, 0x1f },
+ .text = .{ 0x1f, 0x1f, 0x1f },
// ~/05-genizah/dracula-theme/README.md:36 Alucard Selection; role as dracula.yml editor.selectionBackground *SELECTION
- .sel_bg = .{ 0xcf, 0xcf, 0xde },
+ .selection = .{ 0xcf, 0xcf, 0xde },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x1f, 0x1f, 0x1f },
+ .selection_text = .{ 0x1f, 0x1f, 0x1f },
// ~/05-genizah/dracula-theme/README.md:36 Alucard Selection; role as dracula.yml tab.inactiveBackground (*BGDark: Alucard has no BG variants; Selection derived)
- .tag_bg = .{ 0xcf, 0xcf, 0xde },
+ .tag = .{ 0xcf, 0xcf, 0xde },
// ~/05-genizah/dracula-theme/README.md:38 Alucard Comment; role as dracula.yml tab.inactiveForeground *COMMENT #6c664b, adjusted
- .tag_fg = .{ 0x5d, 0x58, 0x41 },
+ .tag_text = .{ 0x5d, 0x58, 0x41 },
// ~/05-genizah/dracula-theme/README.md:34 Alucard Background; role as dracula.yml tab.activeBackground *BG
- .tag_active_bg = .{ 0xff, 0xfb, 0xeb },
+ .tag_focus = .{ 0xff, 0xfb, 0xeb },
// ~/05-genizah/dracula-theme/README.md:37 Alucard Foreground; role as dracula.yml tab.activeForeground *FG
- .tag_active_fg = .{ 0x1f, 0x1f, 0x1f },
+ .tag_focus_text = .{ 0x1f, 0x1f, 0x1f },
// the focused grip: ~/05-genizah/dracula-theme/README.md:42 Alucard Pink; role as dracula.yml tab.activeBorderTop *PINK
- .box = .{ 0xa3, 0x14, 0x4d },
- // derived: the grip at rest, the accent #a3144d faded toward the unfocused tag #cfcfde as far as 1.6:1 off it (0.30 of the way)
- .box_dim = .{ 0xc2, 0x97, 0xb3 },
+ .accent = .{ 0xa3, 0x14, 0x4d },
// an unsaved grip: the original's warning colour, ~/05-genizah/dracula-theme/README.md:39 Alucard Cyan; role as dracula.yml editorWarning.foreground *CYAN
- .box_dirty = .{ 0x03, 0x6a, 0x96 },
+ .dirty = .{ 0x03, 0x6a, 0x96 },
// derived: the column grip, the original's type colour, ~/05-genizah/dracula-theme/README.md:39 Alucard Cyan; role as dracula.yml *CYAN
- .column_box = .{ 0x03, 0x6a, 0x96 },
+ .column_grip = .{ 0x03, 0x6a, 0x96 },
// ~/05-genizah/dracula-theme/README.md:42 Alucard Pink; role as dracula.yml Keywords *PINK
- .kw = .{ 0xa3, 0x14, 0x4d },
+ .keyword = .{ 0xa3, 0x14, 0x4d },
// ~/05-genizah/dracula-theme/README.md:45 Alucard Yellow; role as dracula.yml Strings *YELLOW
- .str = .{ 0x84, 0x6e, 0x15 },
+ .string = .{ 0x84, 0x6e, 0x15 },
// ~/05-genizah/dracula-theme/README.md:43 Alucard Purple; role as dracula.yml Constants *PURPLE
- .num = .{ 0x64, 0x4a, 0xc9 },
+ .number = .{ 0x64, 0x4a, 0xc9 },
// ~/05-genizah/dracula-theme/README.md:38 Alucard Comment; role as dracula.yml Comments *COMMENT
.comment = .{ 0x6c, 0x66, 0x4b },
// ~/05-genizah/dracula-theme/README.md:38 Alucard Comment; role as dracula.yml editorLineNumber.foreground *COMMENT
- .lineno = .{ 0x6c, 0x66, 0x4b },
+ .line_number = .{ 0x6c, 0x66, 0x4b },
// derived: none in the original; the page
- .scroll_track = .{ 0xff, 0xfb, 0xeb },
+ .rail = .{ 0xff, 0xfb, 0xeb },
// derived: none in the original; line numbers, ~/05-genizah/dracula-theme/README.md:38 Alucard Comment; role as dracula.yml editorLineNumber.foreground *COMMENT
- .scroll_thumb = .{ 0x6c, 0x66, 0x4b },
+ .rail_thumb = .{ 0x6c, 0x66, 0x4b },
// ~/05-genizah/dracula-theme/README.md:43 Alucard Purple; role as dracula.yml editorGroup.border *PURPLE
- .border = .{ 0x64, 0x4a, 0xc9 },
+ .rule = .{ 0x64, 0x4a, 0xc9 },
// ~/05-genizah/dracula-theme/README.md:44 Alucard Red; role as dracula.yml editorError.foreground *RED
- .diagnostic_error = .{ 0xcb, 0x3a, 0x2a },
+ .@"error" = .{ 0xcb, 0x3a, 0x2a },
// ~/05-genizah/dracula-theme/README.md:39 Alucard Cyan; role as dracula.yml editorWarning.foreground *CYAN
- .diagnostic_warning = .{ 0x03, 0x6a, 0x96 },
- .palette = .{
+ .warning = .{ 0x03, 0x6a, 0x96 },
+ .ansi = .{
.{ 0x1f, 0x1f, 0x1f }, // 0: ~/05-genizah/dracula-theme/README.md:37 Alucard Foreground (ANSI 0 derived: Dracula's ansi order with Alucard colours, dark ink as black)
.{ 0xcb, 0x3a, 0x2a }, // 1: ~/05-genizah/dracula-theme/README.md:44 Alucard Red (ANSI 1 derived: Dracula's ansi order with Alucard colours, dark ink as black)
.{ 0x14, 0x71, 0x0a }, // 2: ~/05-genizah/dracula-theme/README.md:40 Alucard Green (ANSI 2 derived: Dracula's ansi order with Alucard colours, dark ink as black)
diff --git a/core/themes/atelier.zig b/core/themes/atelier.zig
index 0ad776fa..a730a35b 100644
--- a/core/themes/atelier.zig
+++ b/core/themes/atelier.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "atelier",
- .bg = .{ 0xff, 0xfd, 0xeb },
- .fg = .{ 0x29, 0x3f, 0x35 },
- .tag_bg = .{ 0xe4, 0xf0, 0xed },
- .tag_fg = .{ 0x3d, 0x60, 0x55 },
- .tag_name_fg = .{ 0x6e, 0x47, 0x74 },
- .tag_active_name_fg = .{ 0x65, 0x3f, 0x6b },
- .tag_active_bg = .{ 0xd3, 0xe7, 0xdf },
- .tag_active_fg = .{ 0x35, 0x58, 0x4d },
- .box = .{ 0x36, 0x82, 0x6b },
- .box_dim = .{ 0x95, 0xba, 0xa2 },
- .column_box = .{ 0x95, 0x58, 0x15 },
- .column_box_dim = .{ 0xbc, 0xa4, 0x81 },
- .kw = .{ 0x7b, 0x44, 0x89 },
- .str = .{ 0x34, 0x74, 0x3d },
- .num = .{ 0x9a, 0x58, 0x10 },
+ .page = .{ 0xff, 0xfd, 0xeb },
+ .text = .{ 0x29, 0x3f, 0x35 },
+ .tag = .{ 0xe4, 0xf0, 0xed },
+ .tag_text = .{ 0x3d, 0x60, 0x55 },
+ .tag_name = .{ 0x6e, 0x47, 0x74 },
+ .tag_focus = .{ 0xd3, 0xe7, 0xdf },
+ .tag_focus_text = .{ 0x35, 0x58, 0x4d },
+ .accent = .{ 0x36, 0x82, 0x6b },
+ .column_grip = .{ 0x95, 0x58, 0x15 },
+ .keyword = .{ 0x7b, 0x44, 0x89 },
+ .string = .{ 0x34, 0x74, 0x3d },
+ .number = .{ 0x9a, 0x58, 0x10 },
.comment = .{ 0x29, 0x7c, 0x30 },
- .lineno = .{ 0x90, 0x98, 0x80 },
- .lineno_active = .{ 0x88, 0x90, 0x78 },
- .scroll_track = .{ 0xee, 0xec, 0xcf },
- .scroll_thumb = .{ 0x9f, 0xae, 0x76 },
- .border = .{ 0xff, 0xff, 0xff },
- .sel_bg = .{ 0xed, 0xf2, 0xa5 },
- .sel_fg = .{ 0x35, 0x49, 0x2d },
- .search_bg = .{ 0xfe, 0xdd, 0x86 },
- .search_fg = .{ 0x61, 0x47, 0x15 },
- .diagnostic_error = .{ 0xb3, 0x2f, 0x27 },
- .diagnostic_warning = .{ 0x89, 0x5c, 0x00 },
- .diagnostic_info = .{ 0x29, 0x6a, 0x82 },
- .diagnostic_hint = .{ 0x51, 0x75, 0x36 },
- .palette = .{
+ .line_number = .{ 0x90, 0x98, 0x80 },
+ .line_number_current = .{ 0x88, 0x90, 0x78 },
+ .rail = .{ 0xee, 0xec, 0xcf },
+ .rail_thumb = .{ 0x9f, 0xae, 0x76 },
+ .rule = .{ 0xff, 0xff, 0xff },
+ .selection = .{ 0xed, 0xf2, 0xa5 },
+ .selection_text = .{ 0x35, 0x49, 0x2d },
+ .hit = .{ 0xfe, 0xdd, 0x86 },
+ .@"error" = .{ 0xb3, 0x2f, 0x27 },
+ .warning = .{ 0x89, 0x5c, 0x00 },
+ .info = .{ 0x29, 0x6a, 0x82 },
+ .hint = .{ 0x51, 0x75, 0x36 },
+ .ansi = .{
.{ 0x29, 0x3f, 0x35 },
.{ 0xa3, 0x3d, 0x37 },
.{ 0x3c, 0x6c, 0x43 },
diff --git a/core/themes/ayu_dark.zig b/core/themes/ayu_dark.zig
index 62fb29ed..a98412ba 100644
--- a/core/themes/ayu_dark.zig
+++ b/core/themes/ayu_dark.zig
@@ -32,59 +32,57 @@
//! 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.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #0d1017 -> #04050b: 1.03:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
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 },
+ .page = .{ 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 },
+ .text = .{ 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 },
+ .selection = .{ 0x19, 0x31, 0x55 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xbf, 0xbd, 0xb6 },
+ .selection_text = .{ 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 },
+ .tag = .{ 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 },
+ .tag_text = .{ 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 },
+ .tag_focus = .{ 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 },
+ .tag_focus_text = .{ 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 },
+ .accent = .{ 0xe6, 0xb4, 0x50 },
// 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 },
+ .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 },
+ .column_grip = .{ 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 },
+ .keyword = .{ 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 },
+ .string = .{ 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 },
+ .number = .{ 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 },
+ .line_number = .{ 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 },
+ .line_number_current = .{ 0x5a, 0x63, 0x78 },
// derived: none in the original; the page
- .scroll_track = .{ 0x10, 0x14, 0x1c },
+ .rail = .{ 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 },
+ .rail_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 },
+ .rule = .{ 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 },
+ .hit = .{ 0x4c, 0x41, 0x26 },
// ~/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 },
+ .@"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 = .{
+ .warning = .{ 0xe6, 0xb4, 0x50 },
+ .ansi = .{
.{ 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
diff --git a/core/themes/ayu_light.zig b/core/themes/ayu_light.zig
index 22436be7..730689c3 100644
--- a/core/themes/ayu_light.zig
+++ b/core/themes/ayu_light.zig
@@ -31,59 +31,62 @@
//! 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.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #f8f9fa -> #f0f1f2: 1.03:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #dcddde -> #d7d8d9: 1.20:1 off the tag, now 1.26:1 (R4, H: a focus step off the tag, and the loudest)
+//! - focused grip #f29718 -> #ae6a01: 1.60:1 on the focused tag, now 3.03:1 (R6: 3:1)
+//! - unsaved grip #478acc -> #3a7dbe: 3.22:1 on the tag, now 3.82:1 (R6: 3:1 on both tags)
+//! - error #e65050 -> #d33e41: 3.64:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #f29718 -> #a76501: 2.22:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
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 },
+ .page = .{ 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 },
+ .text = .{ 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 },
+ .selection = .{ 0xd7, 0xe4, 0xf6 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x5c, 0x61, 0x66 },
+ .selection_text = .{ 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 },
+ .tag = .{ 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 },
+ .tag_text = .{ 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 },
+ .tag_focus = .{ 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 },
+ .tag_focus_text = .{ 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 },
+ .accent = .{ 0xf2, 0x97, 0x18 },
// 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 },
+ .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 },
+ .column_grip = .{ 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 },
+ .keyword = .{ 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 },
+ .string = .{ 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 },
+ .number = .{ 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 },
+ .line_number = .{ 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 },
+ .line_number_current = .{ 0x9a, 0xa4, 0xb2 },
// derived: none in the original; the page
- .scroll_track = .{ 0xfc, 0xfc, 0xfc },
+ .rail = .{ 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 },
+ .rail_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 },
+ .rule = .{ 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 },
+ .hit = .{ 0xff, 0xe2, 0x94 },
// ~/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 },
+ .@"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 = .{
+ .warning = .{ 0xf2, 0x97, 0x18 },
+ .ansi = .{
.{ 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
diff --git a/core/themes/ayu_mirage.zig b/core/themes/ayu_mirage.zig
index 23aff67f..fcb7bcd8 100644
--- a/core/themes/ayu_mirage.zig
+++ b/core/themes/ayu_mirage.zig
@@ -31,59 +31,58 @@
//! 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.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #1f2430 -> #1c212d: 1.07:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - search hit #736950 -> #58402b: 2.67:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
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 },
+ .page = .{ 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 },
+ .text = .{ 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 },
+ .selection = .{ 0x2b, 0x47, 0x68 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xcc, 0xca, 0xc2 },
+ .selection_text = .{ 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 },
+ .tag = .{ 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 },
+ .tag_text = .{ 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 },
+ .tag_focus = .{ 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 },
+ .tag_focus_text = .{ 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 },
+ .accent = .{ 0xff, 0xcc, 0x66 },
// 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 },
+ .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 },
+ .column_grip = .{ 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 },
+ .keyword = .{ 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 },
+ .string = .{ 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 },
+ .number = .{ 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 },
+ .line_number = .{ 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 },
+ .line_number_current = .{ 0x70, 0x7a, 0x8c },
// derived: none in the original; the page
- .scroll_track = .{ 0x24, 0x29, 0x36 },
+ .rail = .{ 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 },
+ .rail_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 },
+ .rule = .{ 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 },
+ .hit = .{ 0x73, 0x69, 0x50 },
// ~/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 },
+ .@"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 = .{
+ .warning = .{ 0xff, 0xcc, 0x66 },
+ .ansi = .{
.{ 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
diff --git a/core/themes/catppuccin_frappe.zig b/core/themes/catppuccin_frappe.zig
index 7a97ee2c..de225bdc 100644
--- a/core/themes/catppuccin_frappe.zig
+++ b/core/themes/catppuccin_frappe.zig
@@ -28,63 +28,62 @@
//! (groups/integrations/gitsigns.lua:11), and neo-tree uses NeoTreeModified =
//! peach. Keyword = mauve directly (Statement also mauve). Diagnostic groups
//! are in groups/lsp.lua (merged into editor groups by lib/mapper.lua:26).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - search hit #506373 -> #644a3b: 1.98:1 off the page, now 1.52:1 (R8: 1.5:1, the text reading on it)
+//! - hint #81c8be -> #a6d189: 6.41:1 on the page, now 7.10:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "catppuccin_frappe",
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal bg = C.base (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:25)
- .bg = .{ 0x30, 0x34, 0x46 },
+ .page = .{ 0x30, 0x34, 0x46 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:16)
- .fg = .{ 0xc6, 0xd0, 0xf5 },
+ .text = .{ 0xc6, 0xd0, 0xf5 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:107 Visual bg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:23)
- .sel_bg = .{ 0x51, 0x57, 0x6d },
+ .selection = .{ 0x51, 0x57, 0x6d },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xc6, 0xd0, 0xf5 },
+ .selection_text = .{ 0xc6, 0xd0, 0xf5 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:26)
- .tag_bg = .{ 0x29, 0x2c, 0x3c },
+ .tag = .{ 0x29, 0x2c, 0x3c },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:23) #51576d, adjusted
- .tag_fg = .{ 0x90, 0x93, 0xa2 },
+ .tag_text = .{ 0x90, 0x93, 0xa2 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:26) #292c3c, adjusted
- .tag_active_bg = .{ 0x45, 0x4a, 0x5d },
+ .tag_focus = .{ 0x45, 0x4a, 0x5d },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:16)
- .tag_active_fg = .{ 0xc6, 0xd0, 0xf5 },
+ .tag_focus_text = .{ 0xc6, 0xd0, 0xf5 },
// the focused grip: ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/lualine.lua:20 lualine normal.a bg = C.blue (used by lua/lualine/themes/catppuccin-frappe.lua) -> C.blue (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:14)
- .box = .{ 0x8c, 0xaa, 0xee },
- // derived: the grip at rest, the accent #8caaee faded toward the unfocused tag #292c3c as far as 1.6:1 off it (0.26 of the way)
- .box_dim = .{ 0x43, 0x4d, 0x6a },
+ .accent = .{ 0x8c, 0xaa, 0xee },
// an unsaved grip: the original's warning colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:9)
- .box_dirty = .{ 0xe5, 0xc8, 0x90 },
+ .dirty = .{ 0xe5, 0xc8, 0x90 },
// derived: the column grip, the original's type colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:32 Type fg = C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:9)
- .column_box = .{ 0xe5, 0xc8, 0x90 },
+ .column_grip = .{ 0xe5, 0xc8, 0x90 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:20 Keyword fg = C.mauve (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:5)
- .kw = .{ 0xca, 0x9e, 0xe6 },
+ .keyword = .{ 0xca, 0x9e, 0xe6 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:8 String fg = C.green (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:10)
- .str = .{ 0xa6, 0xd1, 0x89 },
+ .string = .{ 0xa6, 0xd1, 0x89 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:10 Number fg = C.peach (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:8)
- .num = .{ 0xef, 0x9f, 0x76 },
+ .number = .{ 0xef, 0x9f, 0x76 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:5 Comment fg = C.overlay2 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:19)
.comment = .{ 0x94, 0x9c, 0xbb },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:27 LineNr fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:23)
- .lineno = .{ 0x51, 0x57, 0x6d },
+ .line_number = .{ 0x51, 0x57, 0x6d },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:28 CursorLineNr fg = C.lavender (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:15)
- .lineno_active = .{ 0xba, 0xbb, 0xf1 },
+ .line_number_current = .{ 0xba, 0xbb, 0xf1 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:72 PmenuSbar bg = C.surface0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:24)
- .scroll_track = .{ 0x41, 0x45, 0x59 },
+ .rail = .{ 0x41, 0x45, 0x59 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:73 PmenuThumb bg = C.overlay0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:21)
- .scroll_thumb = .{ 0x73, 0x79, 0x94 },
+ .rail_thumb = .{ 0x73, 0x79, 0x94 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:114 WinSeparator fg = C.crust (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:27) #232634, adjusted
- .border = .{ 0x51, 0x56, 0x6a },
+ .rule = .{ 0x51, 0x56, 0x6a },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search bg = U.darken(C.sky, 0.30, C.base) = blend(fg sky #99d1db, bg base #303446, alpha 0.3) per ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/colors.lua:29 -> #506373
- .search_bg = .{ 0x50, 0x63, 0x73 },
- // ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:16)
- .search_fg = .{ 0xc6, 0xd0, 0xf5 },
+ .hit = .{ 0x50, 0x63, 0x73 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:50 DiagnosticError fg = error (local error = C.red at line 8) -> C.red (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:6)
- .diagnostic_error = .{ 0xe7, 0x82, 0x84 },
+ .@"error" = .{ 0xe7, 0x82, 0x84 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:9)
- .diagnostic_warning = .{ 0xe5, 0xc8, 0x90 },
+ .warning = .{ 0xe5, 0xc8, 0x90 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:52 DiagnosticInfo fg = info (local info = C.sky at line 10) -> C.sky (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:12)
- .diagnostic_info = .{ 0x99, 0xd1, 0xdb },
+ .info = .{ 0x99, 0xd1, 0xdb },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:53 DiagnosticHint fg = hint (local hint = C.teal at line 11) -> C.teal (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/frappe.lua:11)
- .diagnostic_hint = .{ 0x81, 0xc8, 0xbe },
- .palette = .{
+ .hint = .{ 0x81, 0xc8, 0xbe },
+ .ansi = .{
.{ 0x51, 0x57, 0x6d }, // 0: ~/05-genizah/catppuccin-palette/palette.json:1470 frappe.ansiColors.black.normal
.{ 0xe7, 0x82, 0x84 }, // 1: ~/05-genizah/catppuccin-palette/palette.json:1514 frappe.ansiColors.red.normal
.{ 0xa6, 0xd1, 0x89 }, // 2: ~/05-genizah/catppuccin-palette/palette.json:1558 frappe.ansiColors.green.normal
diff --git a/core/themes/catppuccin_latte.zig b/core/themes/catppuccin_latte.zig
index 259198b4..03c95690 100644
--- a/core/themes/catppuccin_latte.zig
+++ b/core/themes/catppuccin_latte.zig
@@ -28,63 +28,68 @@
//! (groups/integrations/gitsigns.lua:11), and neo-tree uses NeoTreeModified =
//! peach. Keyword = mauve directly (Statement also mauve). Diagnostic groups
//! are in groups/lsp.lua (merged into editor groups by lib/mapper.lua:26).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #e6e9ef -> #e3e6ec: 1.08:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #cdd0da -> #cbced4: 1.23:1 off the tag, now 1.26:1 (R4, H: a focus step off the tag, and the loudest)
+//! - unsaved grip #df8e1d -> #a36400: 2.09:1 on the tag, now 3.83:1 (R6: 3:1 on both tags)
+//! - selection text #4c4f69 -> #4a4d67: 4.39:1 on the selection, now 4.53:1 (R7: 4.5:1)
+//! - search hit #a8daf0 -> #f2bc85: 1.33:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - warning #df8e1d -> #9d6000: 2.31:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - info #04a5e5 -> #0575a4: 2.47:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #179299 -> #097a81: 3.31:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "catppuccin_latte",
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal bg = C.base (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:25)
- .bg = .{ 0xef, 0xf1, 0xf5 },
+ .page = .{ 0xef, 0xf1, 0xf5 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:16)
- .fg = .{ 0x4c, 0x4f, 0x69 },
+ .text = .{ 0x4c, 0x4f, 0x69 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:107 Visual bg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:23)
- .sel_bg = .{ 0xbc, 0xc0, 0xcc },
+ .selection = .{ 0xbc, 0xc0, 0xcc },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x4c, 0x4f, 0x69 },
+ .selection_text = .{ 0x4c, 0x4f, 0x69 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:26)
- .tag_bg = .{ 0xe6, 0xe9, 0xef },
+ .tag = .{ 0xe6, 0xe9, 0xef },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:23) #bcc0cc, adjusted
- .tag_fg = .{ 0x66, 0x68, 0x6e },
+ .tag_text = .{ 0x66, 0x68, 0x6e },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:26) #e6e9ef, adjusted
- .tag_active_bg = .{ 0xcd, 0xd0, 0xda },
+ .tag_focus = .{ 0xcd, 0xd0, 0xda },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:16)
- .tag_active_fg = .{ 0x4c, 0x4f, 0x69 },
+ .tag_focus_text = .{ 0x4c, 0x4f, 0x69 },
// the focused grip: ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/lualine.lua:20 lualine normal.a bg = C.blue (used by lua/lualine/themes/catppuccin-latte.lua) -> C.blue (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:14)
- .box = .{ 0x1e, 0x66, 0xf5 },
- // derived: the grip at rest, the accent #1e66f5 faded toward the unfocused tag #e6e9ef as far as 1.6:1 off it (0.38 of the way)
- .box_dim = .{ 0x9a, 0xb7, 0xf1 },
+ .accent = .{ 0x1e, 0x66, 0xf5 },
// an unsaved grip: the original's warning colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:9)
- .box_dirty = .{ 0xdf, 0x8e, 0x1d },
+ .dirty = .{ 0xdf, 0x8e, 0x1d },
// derived: the column grip, the original's type colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:32 Type fg = C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:9)
- .column_box = .{ 0xdf, 0x8e, 0x1d },
+ .column_grip = .{ 0xdf, 0x8e, 0x1d },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:20 Keyword fg = C.mauve (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:5)
- .kw = .{ 0x88, 0x39, 0xef },
+ .keyword = .{ 0x88, 0x39, 0xef },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:8 String fg = C.green (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:10)
- .str = .{ 0x40, 0xa0, 0x2b },
+ .string = .{ 0x40, 0xa0, 0x2b },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:10 Number fg = C.peach (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:8)
- .num = .{ 0xfe, 0x64, 0x0b },
+ .number = .{ 0xfe, 0x64, 0x0b },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:5 Comment fg = C.overlay2 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:19)
.comment = .{ 0x7c, 0x7f, 0x93 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:27 LineNr fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:23)
- .lineno = .{ 0xbc, 0xc0, 0xcc },
+ .line_number = .{ 0xbc, 0xc0, 0xcc },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:28 CursorLineNr fg = C.lavender (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:15)
- .lineno_active = .{ 0x72, 0x87, 0xfd },
+ .line_number_current = .{ 0x72, 0x87, 0xfd },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:72 PmenuSbar bg = C.surface0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:24)
- .scroll_track = .{ 0xcc, 0xd0, 0xda },
+ .rail = .{ 0xcc, 0xd0, 0xda },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:73 PmenuThumb bg = C.overlay0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:21)
- .scroll_thumb = .{ 0x9c, 0xa0, 0xb0 },
+ .rail_thumb = .{ 0x9c, 0xa0, 0xb0 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:114 WinSeparator fg = C.crust (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:27) #dce0e8, adjusted
- .border = .{ 0xbc, 0xc0, 0xcc },
+ .rule = .{ 0xbc, 0xc0, 0xcc },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search bg = U.darken(C.sky, 0.30, C.base) = blend(fg sky #04a5e5, bg base #eff1f5, alpha 0.3) per ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/colors.lua:29 -> #a8daf0
- .search_bg = .{ 0xa8, 0xda, 0xf0 },
- // ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:16)
- .search_fg = .{ 0x4c, 0x4f, 0x69 },
+ .hit = .{ 0xa8, 0xda, 0xf0 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:50 DiagnosticError fg = error (local error = C.red at line 8) -> C.red (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:6)
- .diagnostic_error = .{ 0xd2, 0x0f, 0x39 },
+ .@"error" = .{ 0xd2, 0x0f, 0x39 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:9)
- .diagnostic_warning = .{ 0xdf, 0x8e, 0x1d },
+ .warning = .{ 0xdf, 0x8e, 0x1d },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:52 DiagnosticInfo fg = info (local info = C.sky at line 10) -> C.sky (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:12)
- .diagnostic_info = .{ 0x04, 0xa5, 0xe5 },
+ .info = .{ 0x04, 0xa5, 0xe5 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:53 DiagnosticHint fg = hint (local hint = C.teal at line 11) -> C.teal (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/latte.lua:11)
- .diagnostic_hint = .{ 0x17, 0x92, 0x99 },
- .palette = .{
+ .hint = .{ 0x17, 0x92, 0x99 },
+ .ansi = .{
.{ 0x5c, 0x5f, 0x77 }, // 0: ~/05-genizah/catppuccin-palette/palette.json:562 latte.ansiColors.black.normal
.{ 0xd2, 0x0f, 0x39 }, // 1: ~/05-genizah/catppuccin-palette/palette.json:606 latte.ansiColors.red.normal
.{ 0x40, 0xa0, 0x2b }, // 2: ~/05-genizah/catppuccin-palette/palette.json:650 latte.ansiColors.green.normal
diff --git a/core/themes/catppuccin_macchiato.zig b/core/themes/catppuccin_macchiato.zig
index 918c3257..db75f482 100644
--- a/core/themes/catppuccin_macchiato.zig
+++ b/core/themes/catppuccin_macchiato.zig
@@ -28,63 +28,62 @@
//! (groups/integrations/gitsigns.lua:11), and neo-tree uses NeoTreeModified =
//! peach. Keyword = mauve directly (Statement also mauve). Diagnostic groups
//! are in groups/lsp.lua (merged into editor groups by lib/mapper.lua:26).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #1e2030 -> #1d1f2f: 1.09:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - hint #8bd5ca -> #a6da95: 8.74:1 on the page, now 9.17:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "catppuccin_macchiato",
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal bg = C.base (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:25)
- .bg = .{ 0x24, 0x27, 0x3a },
+ .page = .{ 0x24, 0x27, 0x3a },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:16)
- .fg = .{ 0xca, 0xd3, 0xf5 },
+ .text = .{ 0xca, 0xd3, 0xf5 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:107 Visual bg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:23)
- .sel_bg = .{ 0x49, 0x4d, 0x64 },
+ .selection = .{ 0x49, 0x4d, 0x64 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xca, 0xd3, 0xf5 },
+ .selection_text = .{ 0xca, 0xd3, 0xf5 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:26)
- .tag_bg = .{ 0x1e, 0x20, 0x30 },
+ .tag = .{ 0x1e, 0x20, 0x30 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:23) #494d64, adjusted
- .tag_fg = .{ 0x87, 0x8a, 0x99 },
+ .tag_text = .{ 0x87, 0x8a, 0x99 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:26) #1e2030, adjusted
- .tag_active_bg = .{ 0x3d, 0x40, 0x53 },
+ .tag_focus = .{ 0x3d, 0x40, 0x53 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:16)
- .tag_active_fg = .{ 0xca, 0xd3, 0xf5 },
+ .tag_focus_text = .{ 0xca, 0xd3, 0xf5 },
// the focused grip: ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/lualine.lua:20 lualine normal.a bg = C.blue (used by lua/lualine/themes/catppuccin-macchiato.lua) -> C.blue (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:14)
- .box = .{ 0x8a, 0xad, 0xf4 },
- // derived: the grip at rest, the accent #8aadf4 faded toward the unfocused tag #1e2030 as far as 1.6:1 off it (0.24 of the way)
- .box_dim = .{ 0x38, 0x42, 0x5f },
+ .accent = .{ 0x8a, 0xad, 0xf4 },
// an unsaved grip: the original's warning colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:9)
- .box_dirty = .{ 0xee, 0xd4, 0x9f },
+ .dirty = .{ 0xee, 0xd4, 0x9f },
// derived: the column grip, the original's type colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:32 Type fg = C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:9)
- .column_box = .{ 0xee, 0xd4, 0x9f },
+ .column_grip = .{ 0xee, 0xd4, 0x9f },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:20 Keyword fg = C.mauve (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:5)
- .kw = .{ 0xc6, 0xa0, 0xf6 },
+ .keyword = .{ 0xc6, 0xa0, 0xf6 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:8 String fg = C.green (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:10)
- .str = .{ 0xa6, 0xda, 0x95 },
+ .string = .{ 0xa6, 0xda, 0x95 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:10 Number fg = C.peach (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:8)
- .num = .{ 0xf5, 0xa9, 0x7f },
+ .number = .{ 0xf5, 0xa9, 0x7f },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:5 Comment fg = C.overlay2 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:19)
.comment = .{ 0x93, 0x9a, 0xb7 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:27 LineNr fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:23)
- .lineno = .{ 0x49, 0x4d, 0x64 },
+ .line_number = .{ 0x49, 0x4d, 0x64 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:28 CursorLineNr fg = C.lavender (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:15)
- .lineno_active = .{ 0xb7, 0xbd, 0xf8 },
+ .line_number_current = .{ 0xb7, 0xbd, 0xf8 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:72 PmenuSbar bg = C.surface0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:24)
- .scroll_track = .{ 0x36, 0x3a, 0x4f },
+ .rail = .{ 0x36, 0x3a, 0x4f },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:73 PmenuThumb bg = C.overlay0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:21)
- .scroll_thumb = .{ 0x6e, 0x73, 0x8d },
+ .rail_thumb = .{ 0x6e, 0x73, 0x8d },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:114 WinSeparator fg = C.crust (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:27) #181926, adjusted
- .border = .{ 0x46, 0x49, 0x5c },
+ .rule = .{ 0x46, 0x49, 0x5c },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search bg = U.darken(C.sky, 0.30, C.base) = blend(fg sky #91d7e3, bg base #24273a, alpha 0.3) per ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/colors.lua:29 -> #455c6d
- .search_bg = .{ 0x45, 0x5c, 0x6d },
- // ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:16)
- .search_fg = .{ 0xca, 0xd3, 0xf5 },
+ .hit = .{ 0x45, 0x5c, 0x6d },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:50 DiagnosticError fg = error (local error = C.red at line 8) -> C.red (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:6)
- .diagnostic_error = .{ 0xed, 0x87, 0x96 },
+ .@"error" = .{ 0xed, 0x87, 0x96 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:9)
- .diagnostic_warning = .{ 0xee, 0xd4, 0x9f },
+ .warning = .{ 0xee, 0xd4, 0x9f },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:52 DiagnosticInfo fg = info (local info = C.sky at line 10) -> C.sky (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:12)
- .diagnostic_info = .{ 0x91, 0xd7, 0xe3 },
+ .info = .{ 0x91, 0xd7, 0xe3 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:53 DiagnosticHint fg = hint (local hint = C.teal at line 11) -> C.teal (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/macchiato.lua:11)
- .diagnostic_hint = .{ 0x8b, 0xd5, 0xca },
- .palette = .{
+ .hint = .{ 0x8b, 0xd5, 0xca },
+ .ansi = .{
.{ 0x49, 0x4d, 0x64 }, // 0: ~/05-genizah/catppuccin-palette/palette.json:2378 macchiato.ansiColors.black.normal
.{ 0xed, 0x87, 0x96 }, // 1: ~/05-genizah/catppuccin-palette/palette.json:2422 macchiato.ansiColors.red.normal
.{ 0xa6, 0xda, 0x95 }, // 2: ~/05-genizah/catppuccin-palette/palette.json:2466 macchiato.ansiColors.green.normal
diff --git a/core/themes/catppuccin_mocha.zig b/core/themes/catppuccin_mocha.zig
index fb34a923..dae31a69 100644
--- a/core/themes/catppuccin_mocha.zig
+++ b/core/themes/catppuccin_mocha.zig
@@ -28,63 +28,62 @@
//! (groups/integrations/gitsigns.lua:11), and neo-tree uses NeoTreeModified =
//! peach. Keyword = mauve directly (Statement also mauve). Diagnostic groups
//! are in groups/lsp.lua (merged into editor groups by lib/mapper.lua:26).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #181825 -> #151522: 1.07:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - hint #94e2d5 -> #a6e3a1: 11.01:1 on the page, now 11.03:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "catppuccin_mocha",
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal bg = C.base (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:25)
- .bg = .{ 0x1e, 0x1e, 0x2e },
+ .page = .{ 0x1e, 0x1e, 0x2e },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:35 Normal fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:16)
- .fg = .{ 0xcd, 0xd6, 0xf4 },
+ .text = .{ 0xcd, 0xd6, 0xf4 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:107 Visual bg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:23)
- .sel_bg = .{ 0x45, 0x47, 0x5a },
+ .selection = .{ 0x45, 0x47, 0x5a },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xcd, 0xd6, 0xf4 },
+ .selection_text = .{ 0xcd, 0xd6, 0xf4 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:26)
- .tag_bg = .{ 0x18, 0x18, 0x25 },
+ .tag = .{ 0x18, 0x18, 0x25 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:100 StatusLineNC fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:23) #45475a, adjusted
- .tag_fg = .{ 0x81, 0x82, 0x8f },
+ .tag_text = .{ 0x81, 0x82, 0x8f },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine bg = C.mantle (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:26) #181825, adjusted
- .tag_active_bg = .{ 0x39, 0x3a, 0x4a },
+ .tag_focus = .{ 0x39, 0x3a, 0x4a },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:99 StatusLine fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:16)
- .tag_active_fg = .{ 0xcd, 0xd6, 0xf4 },
+ .tag_focus_text = .{ 0xcd, 0xd6, 0xf4 },
// the focused grip: ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/lualine.lua:20 lualine normal.a bg = C.blue (used by lua/lualine/themes/catppuccin-mocha.lua) -> C.blue (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:14)
- .box = .{ 0x89, 0xb4, 0xfa },
- // derived: the grip at rest, the accent #89b4fa faded toward the unfocused tag #181825 as far as 1.6:1 off it (0.24 of the way)
- .box_dim = .{ 0x33, 0x3d, 0x58 },
+ .accent = .{ 0x89, 0xb4, 0xfa },
// an unsaved grip: the original's warning colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:9)
- .box_dirty = .{ 0xf9, 0xe2, 0xaf },
+ .dirty = .{ 0xf9, 0xe2, 0xaf },
// derived: the column grip, the original's type colour, ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:32 Type fg = C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:9)
- .column_box = .{ 0xf9, 0xe2, 0xaf },
+ .column_grip = .{ 0xf9, 0xe2, 0xaf },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:20 Keyword fg = C.mauve (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:5)
- .kw = .{ 0xcb, 0xa6, 0xf7 },
+ .keyword = .{ 0xcb, 0xa6, 0xf7 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:8 String fg = C.green (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:10)
- .str = .{ 0xa6, 0xe3, 0xa1 },
+ .string = .{ 0xa6, 0xe3, 0xa1 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:10 Number fg = C.peach (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:8)
- .num = .{ 0xfa, 0xb3, 0x87 },
+ .number = .{ 0xfa, 0xb3, 0x87 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/syntax.lua:5 Comment fg = C.overlay2 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:19)
.comment = .{ 0x93, 0x99, 0xb2 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:27 LineNr fg = C.surface1 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:23)
- .lineno = .{ 0x45, 0x47, 0x5a },
+ .line_number = .{ 0x45, 0x47, 0x5a },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:28 CursorLineNr fg = C.lavender (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:15)
- .lineno_active = .{ 0xb4, 0xbe, 0xfe },
+ .line_number_current = .{ 0xb4, 0xbe, 0xfe },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:72 PmenuSbar bg = C.surface0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:24)
- .scroll_track = .{ 0x31, 0x32, 0x44 },
+ .rail = .{ 0x31, 0x32, 0x44 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:73 PmenuThumb bg = C.overlay0 (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:21)
- .scroll_thumb = .{ 0x6c, 0x70, 0x86 },
+ .rail_thumb = .{ 0x6c, 0x70, 0x86 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:114 WinSeparator fg = C.crust (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:27) #11111b, adjusted
- .border = .{ 0x3e, 0x40, 0x4f },
+ .rule = .{ 0x3e, 0x40, 0x4f },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search bg = U.darken(C.sky, 0.30, C.base) = blend(fg sky #89dceb, bg base #1e1e2e, alpha 0.3) per ~/05-genizah/catppuccin-nvim/lua/catppuccin/utils/colors.lua:29 -> #3e5767
- .search_bg = .{ 0x3e, 0x57, 0x67 },
- // ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/editor.lua:91 Search fg = C.text (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:16)
- .search_fg = .{ 0xcd, 0xd6, 0xf4 },
+ .hit = .{ 0x3e, 0x57, 0x67 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:50 DiagnosticError fg = error (local error = C.red at line 8) -> C.red (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:6)
- .diagnostic_error = .{ 0xf3, 0x8b, 0xa8 },
+ .@"error" = .{ 0xf3, 0x8b, 0xa8 },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:51 DiagnosticWarn fg = warning (local warning = C.yellow at line 9) -> C.yellow (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:9)
- .diagnostic_warning = .{ 0xf9, 0xe2, 0xaf },
+ .warning = .{ 0xf9, 0xe2, 0xaf },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:52 DiagnosticInfo fg = info (local info = C.sky at line 10) -> C.sky (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:12)
- .diagnostic_info = .{ 0x89, 0xdc, 0xeb },
+ .info = .{ 0x89, 0xdc, 0xeb },
// ~/05-genizah/catppuccin-nvim/lua/catppuccin/groups/lsp.lua:53 DiagnosticHint fg = hint (local hint = C.teal at line 11) -> C.teal (~/05-genizah/catppuccin-nvim/lua/catppuccin/palettes/mocha.lua:11)
- .diagnostic_hint = .{ 0x94, 0xe2, 0xd5 },
- .palette = .{
+ .hint = .{ 0x94, 0xe2, 0xd5 },
+ .ansi = .{
.{ 0x45, 0x47, 0x5a }, // 0: ~/05-genizah/catppuccin-palette/palette.json:3286 mocha.ansiColors.black.normal
.{ 0xf3, 0x8b, 0xa8 }, // 1: ~/05-genizah/catppuccin-palette/palette.json:3330 mocha.ansiColors.red.normal
.{ 0xa6, 0xe3, 0xa1 }, // 2: ~/05-genizah/catppuccin-palette/palette.json:3374 mocha.ansiColors.green.normal
diff --git a/core/themes/clay.zig b/core/themes/clay.zig
index ba76ad35..4b28fb36 100644
--- a/core/themes/clay.zig
+++ b/core/themes/clay.zig
@@ -4,36 +4,32 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "clay",
- .bg = .{ 0x10, 0x10, 0x0e },
- .fg = .{ 0xf3, 0xe5, 0xbc },
- .tag_bg = .{ 0x34, 0x3f, 0x36 },
- .tag_fg = .{ 0xd7, 0xd6, 0xb6 },
- .tag_name_fg = .{ 0xaa, 0xe0, 0xe0 },
- .tag_active_name_fg = .{ 0xb5, 0xec, 0xec },
- .tag_active_bg = .{ 0x42, 0x4f, 0x40 },
- .tag_active_fg = .{ 0xe3, 0xe2, 0xc2 },
- .box = .{ 0x8a, 0xc8, 0x74 },
- .box_dim = .{ 0x68, 0x7c, 0x4d },
- .column_box = .{ 0xdd, 0x7c, 0x97 },
- .column_box_dim = .{ 0x87, 0x5e, 0x65 },
- .kw = .{ 0xff, 0x88, 0x65 },
- .str = .{ 0xd1, 0xd5, 0x0c },
- .num = .{ 0xe0, 0x79, 0x95 },
+ .page = .{ 0x10, 0x10, 0x0e },
+ .text = .{ 0xf3, 0xe5, 0xbc },
+ .tag = .{ 0x34, 0x3f, 0x36 },
+ .tag_text = .{ 0xd7, 0xd6, 0xb6 },
+ .tag_name = .{ 0xaa, 0xe0, 0xe0 },
+ .tag_focus = .{ 0x42, 0x4f, 0x40 },
+ .tag_focus_text = .{ 0xe3, 0xe2, 0xc2 },
+ .accent = .{ 0x8a, 0xc8, 0x74 },
+ .column_grip = .{ 0xdd, 0x7c, 0x97 },
+ .keyword = .{ 0xff, 0x88, 0x65 },
+ .string = .{ 0xd1, 0xd5, 0x0c },
+ .number = .{ 0xe0, 0x79, 0x95 },
.comment = .{ 0xf6, 0xb9, 0x5b },
- .lineno = .{ 0x69, 0x64, 0x55 },
- .lineno_active = .{ 0x71, 0x6c, 0x5d },
- .scroll_track = .{ 0x22, 0x21, 0x19 },
- .scroll_thumb = .{ 0x8c, 0x94, 0x67 },
- .border = .{ 0x74, 0x87, 0x61 },
- .sel_bg = .{ 0x50, 0x5c, 0x38 },
- .sel_fg = .{ 0xfb, 0xf1, 0xc7 },
- .search_bg = .{ 0x6f, 0x54, 0x1f },
- .search_fg = .{ 0xff, 0xe2, 0xa0 },
- .diagnostic_error = .{ 0xff, 0x88, 0x65 },
- .diagnostic_warning = .{ 0xff, 0xbf, 0x2a },
- .diagnostic_info = .{ 0x7b, 0xbd, 0xac },
- .diagnostic_hint = .{ 0x89, 0xca, 0x72 },
- .palette = .{
+ .line_number = .{ 0x69, 0x64, 0x55 },
+ .line_number_current = .{ 0x71, 0x6c, 0x5d },
+ .rail = .{ 0x22, 0x21, 0x19 },
+ .rail_thumb = .{ 0x8c, 0x94, 0x67 },
+ .rule = .{ 0x74, 0x87, 0x61 },
+ .selection = .{ 0x50, 0x5c, 0x38 },
+ .selection_text = .{ 0xfb, 0xf1, 0xc7 },
+ .hit = .{ 0x6f, 0x54, 0x1f },
+ .@"error" = .{ 0xff, 0x88, 0x65 },
+ .warning = .{ 0xff, 0xbf, 0x2a },
+ .info = .{ 0x7b, 0xbd, 0xac },
+ .hint = .{ 0x89, 0xca, 0x72 },
+ .ansi = .{
.{ 0x10, 0x10, 0x0e },
.{ 0xfb, 0x8a, 0x69 },
.{ 0xb8, 0xbb, 0x26 },
diff --git a/core/themes/dark.zig b/core/themes/dark.zig
index e93fd489..24506f6b 100644
--- a/core/themes/dark.zig
+++ b/core/themes/dark.zig
@@ -1,34 +1,36 @@
-//! pardes's own dark theme, and the boot default until the helix capture
-//! displaced it. It stays in the ring because it is the only one that leaves
-//! `bg`/`fg` NULL: the page keeps the host terminal's own default cell, so
-//! pardes sits inside whatever the surrounding terminal already looks like and
-//! only paints its chrome. Every other theme here dresses the whole page.
-//!
-//! The selection pair is the warm tan pardes used to paint EVERY theme's
-//! selection with, back when those six numbers were module constants. This is
-//! the theme it belongs to: a null page is the host terminal's, and a tan that
-//! reads as keyboard-driven on whatever dark cell that turns out to be is
-//! exactly what it was picked for.
+//! pardes dark: the host terminal's own page, white comments, violet stuff.
+//! The one theme that leaves `page` and `text` NULL: in a terminal the page
+//! is the host's own cell, ink and sixteen, so pardes sits inside whatever
+//! the terminal already looks like and paints only its chrome; a window
+//! draws colors.null_page (#121212) and #cccccc, and its sixteen below.
+//! DESIGN.md part C: comments the brightest ink (#f0f0f0, 16.4:1), keywords
+//! violet (#d76ef0, 6.6:1), a lilac tag, a violet grip that reads (#a58bff,
+//! 3.4:1 on the focused tag) and a violet selection (#46337a) so the hits
+//! keep amber; its own severities and sixteen (the window's).
pub const theme = .{
.name = "dark",
- .bg = null,
- .fg = null,
- .sel_bg = .{ 0x51, 0x3c, 0x17 },
- .sel_fg = .{ 0xd8, 0xc8, 0xa8 },
- .tag_bg = .{ 0x2c, 0x2a, 0x3e },
- .tag_fg = .{ 0x96, 0x96, 0x96 },
- // The focused tag: its band lighter in its own hue (1.54:1 off the
- // plain one), its ink lighter to keep reading on it.
- .tag_active_bg = .{ 0x48, 0x45, 0x66 },
- .tag_active_fg = .{ 0xc8, 0xc8, 0xc8 },
- .box = .{ 0x66, 0x3f, 0xe0 },
- .box_dim = .{ 0x35, 0x3a, 0x58 },
- .kw = .{ 0xda, 0x5e, 0xea },
- .str = .{ 0x85, 0xc3, 0x6f },
- .num = .{ 0xe1, 0xcb, 0x5f },
+ .page = null,
+ .text = null,
+ .tag = .{ 0x2c, 0x2a, 0x3e },
+ .tag_text = .{ 0xab, 0xa9, 0xc3 },
+ .tag_focus_text = .{ 0xd6, 0xd4, 0xe8 },
+ .accent = .{ 0xa5, 0x8b, 0xff },
+ .selection = .{ 0x46, 0x33, 0x7a },
+ .selection_text = .{ 0xf4, 0xf0, 0xff },
+ .keyword = .{ 0xd7, 0x6e, 0xf0 },
+ .string = .{ 0x8f, 0xca, 0x78 },
+ .number = .{ 0xe3, 0xcd, 0x64 },
.comment = .{ 0xf0, 0xf0, 0xf0 },
- .lineno = .{ 0x5a, 0x5a, 0x5a },
- .scroll_track = .{ 0x2a, 0x2a, 0x2a },
- .scroll_thumb = .{ 0x52, 0x52, 0x52 },
- .palette = null,
+ .line_number = .{ 0x5c, 0x5c, 0x66 },
+ .line_number_current = .{ 0x8e, 0x8c, 0x9e },
+ .@"error" = .{ 0xff, 0x6e, 0x7f },
+ .warning = .{ 0xff, 0xb4, 0x54 },
+ .info = .{ 0x7f, 0xa8, 0xff },
+ .hint = .{ 0x62, 0xd2, 0xc4 },
+ .ansi = .{
+ .{ 0x2c, 0x2a, 0x3e }, .{ 0xff, 0x6e, 0x7f }, .{ 0x8f, 0xca, 0x78 }, .{ 0xe3, 0xcd, 0x64 },
+ .{ 0x7f, 0xa8, 0xff }, .{ 0xd7, 0x6e, 0xf0 }, .{ 0x62, 0xd2, 0xc4 }, .{ 0xc4, 0xc4, 0xcc },
+ .{ 0x7e, 0x7b, 0x96 }, .{ 0xff, 0x95, 0xa1 }, .{ 0xae, 0xe3, 0x9a }, .{ 0xf2, 0xe0, 0x8a },
+ .{ 0xa6, 0xc3, 0xff }, .{ 0xe6, 0x9c, 0xf7 }, .{ 0x8f, 0xe6, 0xda }, .{ 0xf0, 0xf0, 0xf0 },
+ },
};
diff --git a/core/themes/dark_plus.zig b/core/themes/dark_plus.zig
index 9c1cb689..f0a13f1e 100644
--- a/core/themes/dark_plus.zig
+++ b/core/themes/dark_plus.zig
@@ -8,67 +8,67 @@
//! 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
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused tag ground #1e1e1e -> #565656: 1.51:1 off the tag, now 1.50:1 (R4, H: a focus step off the tag, and the loudest)
+//! - focused grip #007fd4 -> #4dabff: 1.74:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - unsaved grip #3399cc -> #4db0e4: 3.45:1 on the tag, now 4.54:1 (R6: 3:1 on both tags)
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 },
+ .page = .{ 0x1e, 0x1e, 0x1e },
// /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 colors."editor.foreground"
- .fg = .{ 0xd4, 0xd4, 0xd4 },
+ .text = .{ 0xd4, 0xd4, 0xd4 },
// ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:122 editor.selectionBackground dark
- .sel_bg = .{ 0x26, 0x4f, 0x78 },
+ .selection = .{ 0x26, 0x4f, 0x78 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xd4, 0xd4, 0xd4 },
+ .selection_text = .{ 0xd4, 0xd4, 0xd4 },
// ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:36 tab.inactiveBackground dark #2d2d2d, adjusted
- .tag_bg = .{ 0x3c, 0x3c, 0x3c },
+ .tag = .{ 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 },
+ .tag_text = .{ 0xa7, 0xa7, 0xa7 },
// ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:31 tab.activeBackground = editorBackground
- .tag_active_bg = .{ 0x1e, 0x1e, 0x1e },
+ .tag_focus = .{ 0x1e, 0x1e, 0x1e },
// ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:49 tab.activeForeground dark Color.white
- .tag_active_fg = .{ 0xff, 0xff, 0xff },
+ .tag_focus_text = .{ 0xff, 0xff, 0xff },
// the tagline is the status bar: ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:298 statusBar.background dark #007ACC
- .tagline_bg = .{ 0x00, 0x7a, 0xcc },
+ .workspace = .{ 0x00, 0x7a, 0xcc },
// ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:289 statusBar.foreground dark #FFFFFF
- .tagline_fg = .{ 0xff, 0xff, 0xff },
+ .workspace_text = .{ 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 },
+ .accent = .{ 0x00, 0x7f, 0xd4 },
// 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 },
+ .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 },
+ .column_grip = .{ 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 },
+ .keyword = .{ 0x56, 0x9c, 0xd6 },
// /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 tokenColors string
- .str = .{ 0xce, 0x91, 0x78 },
+ .string = .{ 0xce, 0x91, 0x78 },
// /usr/share/code/resources/app/extensions/theme-defaults/themes/dark_vs.json:1 tokenColors constant.numeric
- .num = .{ 0xb5, 0xce, 0xa8 },
+ .number = .{ 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 },
+ .line_number = .{ 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 },
+ .line_number_current = .{ 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 },
+ .rail = .{ 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 },
+ .rail_thumb = .{ 0x42, 0x42, 0x42 },
// ~/05-genizah/vscode/src/vs/workbench/common/theme.ts:237 editorGroup.border dark
- .border = .{ 0x44, 0x44, 0x44 },
+ .rule = .{ 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 },
+ .hit = .{ 0x51, 0x5c, 0x6a },
// ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:71 editorError.foreground dark
- .diagnostic_error = .{ 0xf1, 0x4c, 0x4c },
+ .@"error" = .{ 0xf1, 0x4c, 0x4c },
// ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:84 editorWarning.foreground dark
- .diagnostic_warning = .{ 0xcc, 0xa7, 0x00 },
+ .warning = .{ 0xcc, 0xa7, 0x00 },
// ~/05-genizah/vscode/src/vs/platform/theme/common/colors/editorColors.ts:97 editorInfo.foreground dark
- .diagnostic_info = .{ 0x59, 0xa4, 0xf9 },
+ .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 = .{
+ .hint = .{ 0xb0, 0xb0, 0xb0 },
+ .ansi = .{
.{ 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
diff --git a/core/themes/daybreak.zig b/core/themes/daybreak.zig
index e032b994..2e6c0b8a 100644
--- a/core/themes/daybreak.zig
+++ b/core/themes/daybreak.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "daybreak",
- .bg = .{ 0xff, 0xff, 0xff },
- .fg = .{ 0x14, 0x2d, 0x40 },
- .tag_bg = .{ 0xed, 0xf2, 0xf7 },
- .tag_fg = .{ 0x29, 0x46, 0x5e },
- .tag_name_fg = .{ 0x5a, 0x2d, 0x67 },
- .tag_active_name_fg = .{ 0x52, 0x25, 0x5f },
- .tag_active_bg = .{ 0xdf, 0xea, 0xf3 },
- .tag_active_fg = .{ 0x21, 0x3e, 0x56 },
- .box = .{ 0x00, 0x61, 0x98 },
- .box_dim = .{ 0x7b, 0x9e, 0xb7 },
- .column_box = .{ 0x7f, 0x42, 0x00 },
- .column_box_dim = .{ 0xb7, 0x9a, 0x7a },
- .kw = .{ 0x65, 0x1a, 0x98 },
- .str = .{ 0x1a, 0x65, 0x2b },
- .num = .{ 0x7f, 0x42, 0x00 },
+ .page = .{ 0xff, 0xff, 0xff },
+ .text = .{ 0x14, 0x2d, 0x40 },
+ .tag = .{ 0xed, 0xf2, 0xf7 },
+ .tag_text = .{ 0x29, 0x46, 0x5e },
+ .tag_name = .{ 0x5a, 0x2d, 0x67 },
+ .tag_focus = .{ 0xdf, 0xea, 0xf3 },
+ .tag_focus_text = .{ 0x21, 0x3e, 0x56 },
+ .accent = .{ 0x00, 0x61, 0x98 },
+ .column_grip = .{ 0x7f, 0x42, 0x00 },
+ .keyword = .{ 0x65, 0x1a, 0x98 },
+ .string = .{ 0x1a, 0x65, 0x2b },
+ .number = .{ 0x7f, 0x42, 0x00 },
.comment = .{ 0x08, 0x62, 0x39 },
- .lineno = .{ 0x88, 0x93, 0x9b },
- .lineno_active = .{ 0x80, 0x8b, 0x93 },
- .scroll_track = .{ 0xe6, 0xed, 0xf3 },
- .scroll_thumb = .{ 0x66, 0x85, 0xa0 },
- .border = .{ 0xc5, 0xcf, 0xd7 },
- .sel_bg = .{ 0xb9, 0xdf, 0xfb },
- .sel_fg = .{ 0x10, 0x36, 0x4f },
- .search_bg = .{ 0xff, 0xe3, 0x96 },
- .search_fg = .{ 0x4b, 0x35, 0x00 },
- .diagnostic_error = .{ 0xb3, 0x08, 0x22 },
- .diagnostic_warning = .{ 0x70, 0x49, 0x00 },
- .diagnostic_info = .{ 0x00, 0x5c, 0x8a },
- .diagnostic_hint = .{ 0x36, 0x5b, 0x25 },
- .palette = .{
+ .line_number = .{ 0x88, 0x93, 0x9b },
+ .line_number_current = .{ 0x80, 0x8b, 0x93 },
+ .rail = .{ 0xe6, 0xed, 0xf3 },
+ .rail_thumb = .{ 0x66, 0x85, 0xa0 },
+ .rule = .{ 0xc5, 0xcf, 0xd7 },
+ .selection = .{ 0xb9, 0xdf, 0xfb },
+ .selection_text = .{ 0x10, 0x36, 0x4f },
+ .hit = .{ 0xff, 0xe3, 0x96 },
+ .@"error" = .{ 0xb3, 0x08, 0x22 },
+ .warning = .{ 0x70, 0x49, 0x00 },
+ .info = .{ 0x00, 0x5c, 0x8a },
+ .hint = .{ 0x36, 0x5b, 0x25 },
+ .ansi = .{
.{ 0x14, 0x2d, 0x40 },
.{ 0xa1, 0x1c, 0x30 },
.{ 0x24, 0x5b, 0x30 },
diff --git a/core/themes/doom_one.zig b/core/themes/doom_one.zig
index 9db8bdee..1d3df86a 100644
--- a/core/themes/doom_one.zig
+++ b/core/themes/doom_one.zig
@@ -29,61 +29,59 @@
//! from tab-bar faces (inherit tab-line-*). The doom-modeline package
//! (separate) draws on the mode-line face; its accent bar is doom-modeline-bar
//! = highlight.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - search hit #387aa7 -> #594324: 3.01:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
pub const theme = .{
.name = "doom_one",
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:13 default :background bg; bg = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:56 bg (GUI/default column #282c34)
- .bg = .{ 0x28, 0x2c, 0x34 },
+ .page = .{ 0x28, 0x2c, 0x34 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:13 default :foreground fg; fg = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:57 fg (GUI/default column #bbc2cf)
- .fg = .{ 0xbb, 0xc2, 0xcf },
+ .text = .{ 0xbb, 0xc2, 0xcf },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:15 region :background region; region = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:110 region = (doom-lighten (car bg-alt) #21242b 0.15) = (doom-blend #21242b #FFFFFF 0.85) = #42444a (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten)
- .sel_bg = .{ 0x42, 0x44, 0x4a },
+ .selection = .{ 0x42, 0x44, 0x4a },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xbb, 0xc2, 0xcf },
+ .selection_text = .{ 0xbb, 0xc2, 0xcf },
// ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:145 mode-line-inactive :background modeline-bg-inactive; modeline-bg-inactive = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:128 modeline-bg-inactive = bg-alt (car bg-alt) -> #21242b
- .tag_bg = .{ 0x21, 0x24, 0x2b },
+ .tag = .{ 0x21, 0x24, 0x2b },
// ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:145 mode-line-inactive :foreground modeline-fg-alt; modeline-fg-alt = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:121 modeline-fg-alt = base5 -> #5b6268 #5b6268, adjusted
- .tag_fg = .{ 0x86, 0x8b, 0x8f },
+ .tag_text = .{ 0x86, 0x8b, 0x8f },
// ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:142 mode-line :background modeline-bg; modeline-bg = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:122 modeline-bg = (doom-darken bg-alt #21242b 0.1) (doom-one-brighter-modeline nil) = (doom-blend #21242b #000000 0.9) = #1d2026 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten) #1d2026, adjusted
- .tag_active_bg = .{ 0x40, 0x44, 0x4b },
+ .tag_focus = .{ 0x40, 0x44, 0x4b },
// ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:142 mode-line :foreground modeline-fg; modeline-fg = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:120 modeline-fg = fg -> #bbc2cf
- .tag_active_fg = .{ 0xbb, 0xc2, 0xcf },
+ .tag_focus_text = .{ 0xbb, 0xc2, 0xcf },
// the focused grip: ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:154 doom-modeline-bar :background highlight (the modeline accent bar; also cursor/link/minibuffer-prompt, ~/05-genizah/doomemacs-themes/doom-themes-base.el:17); highlight = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:95 highlight = blue -> #51afef
- .box = .{ 0x51, 0xaf, 0xef },
- // derived: the grip at rest, the accent #51afef faded toward the unfocused tag #21242b as far as 1.6:1 off it (0.26 of the way)
- .box_dim = .{ 0x2d, 0x48, 0x5e },
+ .accent = .{ 0x51, 0xaf, 0xef },
// an unsaved grip: the original's modified colour, ~/05-genizah/doomemacs-themes/doom-themes-base.el:412 diff-changed :foreground violet (doom-modeline-buffer-modified not defined in doom-themes); violet = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:88 violet (GUI/default column #a9a1e1)
- .box_dirty = .{ 0xa9, 0xa1, 0xe1 },
+ .dirty = .{ 0xa9, 0xa1, 0xe1 },
// derived: the column grip, the original's type colour, ~/05-genizah/doomemacs-themes/doom-themes-base.el:57 font-lock-type-face :foreground type; type = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:106 type = yellow -> #ecbe7b
- .column_box = .{ 0xec, 0xbe, 0x7b },
+ .column_grip = .{ 0xec, 0xbe, 0x7b },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:44 font-lock-keyword-face :foreground keywords; keywords = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:103 keywords = blue -> #51afef
- .kw = .{ 0x51, 0xaf, 0xef },
+ .keyword = .{ 0x51, 0xaf, 0xef },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:56 font-lock-string-face :foreground strings; strings = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:107 strings = green -> #98be65
- .str = .{ 0x98, 0xbe, 0x65 },
+ .string = .{ 0x98, 0xbe, 0x65 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:769 highlight-numbers-number :foreground numbers; numbers = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:109 numbers = orange -> #da8548
- .num = .{ 0xda, 0x85, 0x48 },
+ .number = .{ 0xda, 0x85, 0x48 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:37 font-lock-comment-face :foreground comments; comments = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:99 comments = base5 (doom-one-brighter-comments nil) -> #5b6268
.comment = .{ 0x5b, 0x62, 0x68 },
// ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:137 line-number &override :foreground base4; base4 = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:73 base4 (GUI/default column #3f444a)
- .lineno = .{ 0x3f, 0x44, 0x4a },
+ .line_number = .{ 0x3f, 0x44, 0x4a },
// ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:138 line-number-current-line &override :foreground fg; fg = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:57 fg (GUI/default column #bbc2cf)
- .lineno_active = .{ 0xbb, 0xc2, 0xcf },
+ .line_number_current = .{ 0xbb, 0xc2, 0xcf },
// derived: none in the original; the page
- .scroll_track = .{ 0x28, 0x2c, 0x34 },
+ .rail = .{ 0x28, 0x2c, 0x34 },
// derived: none in the original; line numbers, ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:137 line-number &override :foreground base4; base4 = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:73 base4 (GUI/default column #3f444a) #3f444a, adjusted
- .scroll_thumb = .{ 0x44, 0x49, 0x4f },
+ .rail_thumb = .{ 0x44, 0x49, 0x4f },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:28 vertical-border :foreground vertical-bar; vertical-bar = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:96 vertical-bar = (doom-darken base1 #1c1f24 0.1) = (doom-blend #1c1f24 #000000 0.9) = #191b20 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten) #191b20, adjusted
- .border = .{ 0x4a, 0x4d, 0x55 },
+ .rule = .{ 0x4a, 0x4d, 0x55 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:23 lazy-highlight &dark :background (doom-darken highlight #51afef 0.3) = (doom-blend #51afef #000000 0.7) = #387aa7 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-331); isearch inherits lazy-highlight (~/05-genizah/doomemacs-themes/doom-themes-base.el:820)
- .search_bg = .{ 0x38, 0x7a, 0xa7 },
- // ~/05-genizah/doomemacs-themes/doom-themes-base.el:23 lazy-highlight &dark :foreground base8 (isearch :inherit lazy-highlight, ~/05-genizah/doomemacs-themes/doom-themes-base.el:820); base8 = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:77 base8 (GUI/default column #dfdfdf)
- .search_fg = .{ 0xdf, 0xdf, 0xdf },
+ .hit = .{ 0x38, 0x7a, 0xa7 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:30 error face :foreground error; error = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:111 error = red -> #ff6c6b
- .diagnostic_error = .{ 0xff, 0x6c, 0x6b },
+ .@"error" = .{ 0xff, 0x6c, 0x6b },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:31 warning face :foreground warning; warning = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:112 warning = yellow -> #ecbe7b
- .diagnostic_warning = .{ 0xec, 0xbe, 0x7b },
+ .warning = .{ 0xec, 0xbe, 0x7b },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:32 success face :foreground success; success = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:113 success = green -> #98be65
- .diagnostic_info = .{ 0x98, 0xbe, 0x65 },
- .palette = .{
+ .info = .{ 0x98, 0xbe, 0x65 },
+ .ansi = .{
.{ 0x28, 0x2c, 0x34 }, // 0: ~/05-genizah/doomemacs-themes/doom-themes-base.el:198 ansi-color-black :foreground bg; bg = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:56 bg (GUI/default column #282c34)
.{ 0xff, 0x6c, 0x6b }, // 1: ~/05-genizah/doomemacs-themes/doom-themes-base.el:199 ansi-color-red :foreground red; red = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:80 red (GUI/default column #ff6c6b)
.{ 0x98, 0xbe, 0x65 }, // 2: ~/05-genizah/doomemacs-themes/doom-themes-base.el:200 ansi-color-green :foreground green; green = ~/05-genizah/doomemacs-themes/themes/doom-one-theme.el:82 green (GUI/default column #98be65)
diff --git a/core/themes/doom_one_light.zig b/core/themes/doom_one_light.zig
index c95b5c17..b70a9272 100644
--- a/core/themes/doom_one_light.zig
+++ b/core/themes/doom_one_light.zig
@@ -31,61 +31,63 @@
//! because ansi-color-black/white map to bg/fg; tabline_fg = fg-alt #c6c7c7 is
//! very low-contrast on bg-alt; the variable is named modeline-bg-alt-inactive
//! in this theme.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #4078f2 -> #3167df: 2.42:1 on the focused tag, now 3.04:1 (R6: 3:1)
+//! - unsaved grip #b751b6 -> #ab45aa: 3.30:1 on the tag, now 3.86:1 (R6: 3:1 on both tags)
+//! - search hit #c2d3f7 -> #f4c783: 1.44:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #e45649 -> #ce4136: 3.51:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - info #50a14f -> #318332: 3.07:1 on the page, now 4.55:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "doom_one_light",
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:13 default :background bg; bg = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:47 bg (GUI/default column #fafafa)
- .bg = .{ 0xfa, 0xfa, 0xfa },
+ .page = .{ 0xfa, 0xfa, 0xfa },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:13 default :foreground fg; fg = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:48 fg (GUI/default column #383a42)
- .fg = .{ 0x38, 0x3a, 0x42 },
+ .text = .{ 0x38, 0x3a, 0x42 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:15 region :background region; region = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:101 region = (doom-darken (car bg-alt) #f0f0f0 0.1) = (doom-blend #f0f0f0 #000000 0.9) = #d8d8d8 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten)
- .sel_bg = .{ 0xd8, 0xd8, 0xd8 },
+ .selection = .{ 0xd8, 0xd8, 0xd8 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x38, 0x3a, 0x42 },
+ .selection_text = .{ 0x38, 0x3a, 0x42 },
// ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:138 mode-line-inactive :background modeline-bg-inactive; modeline-bg-inactive = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:121 modeline-bg-inactive = (doom-darken bg #fafafa 0.1) = (doom-blend #fafafa #000000 0.9) = #e1e1e1 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten)
- .tag_bg = .{ 0xe1, 0xe1, 0xe1 },
+ .tag = .{ 0xe1, 0xe1, 0xe1 },
// ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:138 mode-line-inactive :foreground modeline-fg-alt; modeline-fg-alt = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:112 modeline-fg-alt = (doom-blend violet #b751b6 base4 #9ca0a4 0.2) (doom-one-light-brighter-modeline nil) = #a190a7 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten) #a190a7, adjusted
- .tag_fg = .{ 0x6a, 0x5f, 0x6e },
+ .tag_text = .{ 0x6a, 0x5f, 0x6e },
// ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:135 mode-line :background modeline-bg; modeline-bg = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:115 modeline-bg = base1 (doom-one-light-brighter-modeline nil) -> #e7e7e7 #e7e7e7, adjusted
- .tag_active_bg = .{ 0xc8, 0xc8, 0xc9 },
+ .tag_focus = .{ 0xc8, 0xc8, 0xc9 },
// ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:135 mode-line :foreground modeline-fg; modeline-fg = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:111 modeline-fg = fg -> #383a42
- .tag_active_fg = .{ 0x38, 0x3a, 0x42 },
+ .tag_focus_text = .{ 0x38, 0x3a, 0x42 },
// the focused grip: ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:152 doom-modeline-bar :background highlight (the modeline accent bar; also cursor/link/minibuffer-prompt, ~/05-genizah/doomemacs-themes/doom-themes-base.el:17); highlight = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:86 highlight = blue -> #4078f2
- .box = .{ 0x40, 0x78, 0xf2 },
- // derived: the grip at rest, the accent #4078f2 faded toward the unfocused tag #e1e1e1 as far as 1.6:1 off it (0.46 of the way)
- .box_dim = .{ 0x97, 0xb1, 0xe9 },
+ .accent = .{ 0x40, 0x78, 0xf2 },
// an unsaved grip: the original's modified colour, ~/05-genizah/doomemacs-themes/doom-themes-base.el:412 diff-changed :foreground violet (doom-modeline-buffer-modified not defined in doom-themes); violet = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:79 violet (GUI/default column #b751b6)
- .box_dirty = .{ 0xb7, 0x51, 0xb6 },
+ .dirty = .{ 0xb7, 0x51, 0xb6 },
// derived: the column grip, the original's type colour, ~/05-genizah/doomemacs-themes/doom-themes-base.el:57 font-lock-type-face :foreground type; type = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:97 type = yellow -> #986801
- .column_box = .{ 0x98, 0x68, 0x01 },
+ .column_grip = .{ 0x98, 0x68, 0x01 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:44 font-lock-keyword-face :foreground keywords; keywords = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:94 keywords = red -> #e45649
- .kw = .{ 0xe4, 0x56, 0x49 },
+ .keyword = .{ 0xe4, 0x56, 0x49 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:56 font-lock-string-face :foreground strings; strings = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:98 strings = green -> #50a14f
- .str = .{ 0x50, 0xa1, 0x4f },
+ .string = .{ 0x50, 0xa1, 0x4f },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:769 highlight-numbers-number :foreground numbers; numbers = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:100 numbers = orange -> #da8548
- .num = .{ 0xda, 0x85, 0x48 },
+ .number = .{ 0xda, 0x85, 0x48 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:37 font-lock-comment-face :foreground comments; comments = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:90 comments = base4 (doom-one-light-brighter-comments nil) -> #9ca0a4
.comment = .{ 0x9c, 0xa0, 0xa4 },
// ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:132 line-number &override :foreground (doom-lighten base4 #9ca0a4 0.15) = (doom-blend #9ca0a4 #FFFFFF 0.85) = #aaaeb1 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343)
- .lineno = .{ 0xaa, 0xae, 0xb1 },
+ .line_number = .{ 0xaa, 0xae, 0xb1 },
// ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:133 line-number-current-line &override :foreground base8; base8 = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:68 base8 (GUI/default column #1b2229)
- .lineno_active = .{ 0x1b, 0x22, 0x29 },
+ .line_number_current = .{ 0x1b, 0x22, 0x29 },
// derived: none in the original; the page
- .scroll_track = .{ 0xfa, 0xfa, 0xfa },
+ .rail = .{ 0xfa, 0xfa, 0xfa },
// derived: none in the original; line numbers, ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:132 line-number &override :foreground (doom-lighten base4 #9ca0a4 0.15) = (doom-blend #9ca0a4 #FFFFFF 0.85) = #aaaeb1 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343)
- .scroll_thumb = .{ 0xaa, 0xae, 0xb1 },
+ .rail_thumb = .{ 0xaa, 0xae, 0xb1 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:28 vertical-border :foreground vertical-bar; vertical-bar = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:87 vertical-bar = (doom-darken base2 #dfdfdf 0.1) = (doom-blend #dfdfdf #000000 0.9) = #c8c8c8 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-343 doom-blend/darken/lighten)
- .border = .{ 0xc8, 0xc8, 0xc8 },
+ .rule = .{ 0xc8, 0xc8, 0xc8 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:24 lazy-highlight &light :background (doom-blend bg #fafafa highlight #4078f2 0.7) = #c2d3f7 (computed per ~/05-genizah/doomemacs-themes/doom-themes.el:301-319); isearch inherits lazy-highlight (~/05-genizah/doomemacs-themes/doom-themes-base.el:820)
- .search_bg = .{ 0xc2, 0xd3, 0xf7 },
- // ~/05-genizah/doomemacs-themes/doom-themes-base.el:24 lazy-highlight &light :foreground base0 (isearch :inherit lazy-highlight, ~/05-genizah/doomemacs-themes/doom-themes-base.el:820); base0 = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:60 base0 (GUI/default column #f0f0f0)
- .search_fg = .{ 0xf0, 0xf0, 0xf0 },
+ .hit = .{ 0xc2, 0xd3, 0xf7 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:30 error face :foreground error; error = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:102 error = red -> #e45649
- .diagnostic_error = .{ 0xe4, 0x56, 0x49 },
+ .@"error" = .{ 0xe4, 0x56, 0x49 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:31 warning face :foreground warning; warning = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:103 warning = yellow -> #986801
- .diagnostic_warning = .{ 0x98, 0x68, 0x01 },
+ .warning = .{ 0x98, 0x68, 0x01 },
// ~/05-genizah/doomemacs-themes/doom-themes-base.el:32 success face :foreground success; success = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:104 success = green -> #50a14f
- .diagnostic_info = .{ 0x50, 0xa1, 0x4f },
- .palette = .{
+ .info = .{ 0x50, 0xa1, 0x4f },
+ .ansi = .{
.{ 0xfa, 0xfa, 0xfa }, // 0: ~/05-genizah/doomemacs-themes/doom-themes-base.el:198 ansi-color-black :foreground bg; bg = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:47 bg (GUI/default column #fafafa)
.{ 0xe4, 0x56, 0x49 }, // 1: ~/05-genizah/doomemacs-themes/doom-themes-base.el:199 ansi-color-red :foreground red; red = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:71 red (GUI/default column #e45649)
.{ 0x50, 0xa1, 0x4f }, // 2: ~/05-genizah/doomemacs-themes/doom-themes-base.el:200 ansi-color-green :foreground green; green = ~/05-genizah/doomemacs-themes/themes/doom-one-light-theme.el:73 green (GUI/default column #50a14f)
diff --git a/core/themes/dracula.zig b/core/themes/dracula.zig
index 16c6ba43..53bd74eb 100644
--- a/core/themes/dracula.zig
+++ b/core/themes/dracula.zig
@@ -8,57 +8,56 @@
//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched):
//! - focused tag ground #282a36 -> #41434d: 1.11:1 off the unfocused #21222c, pardes needs 1.5:1 on a dark page
//! - unfocused tag text #6272a4 -> #7b89b3: 3.36:1 on #21222c, tag text needs 4.5:1 to be read and run
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #94527e -> #be78a6: 1.76:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - search hit #947151 -> #004c63: 3.21:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
pub const theme = .{
.name = "dracula",
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:185 editor.background: *BG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:10)
- .bg = .{ 0x28, 0x2a, 0x36 },
+ .page = .{ 0x28, 0x2a, 0x36 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:184 editor.foreground: *FG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:11)
- .fg = .{ 0xf8, 0xf8, 0xf2 },
+ .text = .{ 0xf8, 0xf8, 0xf2 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:189 editor.selectionBackground: *SELECTION (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:12)
- .sel_bg = .{ 0x44, 0x47, 0x5a },
+ .selection = .{ 0x44, 0x47, 0x5a },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xf8, 0xf8, 0xf2 },
+ .selection_text = .{ 0xf8, 0xf8, 0xf2 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:178 tab.inactiveBackground: *BGDark (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:50)
- .tag_bg = .{ 0x21, 0x22, 0x2c },
+ .tag = .{ 0x21, 0x22, 0x2c },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:179 tab.inactiveForeground: *COMMENT (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:13) #6272a4, adjusted
- .tag_fg = .{ 0x7b, 0x89, 0xb3 },
+ .tag_text = .{ 0x7b, 0x89, 0xb3 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:172 tab.activeBackground: *BG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:10) #282a36, adjusted
- .tag_active_bg = .{ 0x41, 0x43, 0x4d },
+ .tag_focus = .{ 0x41, 0x43, 0x4d },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:173 tab.activeForeground: *FG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:11)
- .tag_active_fg = .{ 0xf8, 0xf8, 0xf2 },
+ .tag_focus_text = .{ 0xf8, 0xf8, 0xf2 },
// the focused grip: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:175 tab.activeBorderTop: !alpha [*PINK, 80] over BG
- .box = .{ 0x94, 0x52, 0x7e },
- // derived: the grip at rest, the accent #94527e faded toward the unfocused tag #21222c as far as 1.6:1 off it (0.50 of the way)
- .box_dim = .{ 0x5b, 0x3a, 0x55 },
+ .accent = .{ 0x94, 0x52, 0x7e },
// an unsaved grip: the original's warning colour, ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:250 editorWarning.foreground: *CYAN (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:14)
- .box_dirty = .{ 0x8b, 0xe9, 0xfd },
+ .dirty = .{ 0x8b, 0xe9, 0xfd },
// derived: the column grip, the original's function colour, ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:688 tokenColors "Function names" *GREEN
- .column_box = .{ 0x50, 0xfa, 0x7b },
+ .column_grip = .{ 0x50, 0xfa, 0x7b },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:725 tokenColors "Keywords" *PINK
- .kw = .{ 0xff, 0x79, 0xc6 },
+ .keyword = .{ 0xff, 0x79, 0xc6 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:978 tokenColors "Strings" *YELLOW
- .str = .{ 0xf1, 0xfa, 0x8c },
+ .string = .{ 0xf1, 0xfa, 0x8c },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:640 tokenColors "Constants" *PURPLE
- .num = .{ 0xbd, 0x93, 0xf9 },
+ .number = .{ 0xbd, 0x93, 0xf9 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:601 tokenColors "Comments" *COMMENT
.comment = .{ 0x62, 0x72, 0xa4 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:186 editorLineNumber.foreground: *COMMENT (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:13)
- .lineno = .{ 0x62, 0x72, 0xa4 },
+ .line_number = .{ 0x62, 0x72, 0xa4 },
// derived: none in the original; the page
- .scroll_track = .{ 0x28, 0x2a, 0x36 },
+ .rail = .{ 0x28, 0x2a, 0x36 },
// derived: none in the original; line numbers, ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:186 editorLineNumber.foreground: *COMMENT (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:13)
- .scroll_thumb = .{ 0x62, 0x72, 0xa4 },
+ .rail_thumb = .{ 0x62, 0x72, 0xa4 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:167 editorGroup.border: *PURPLE (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:18)
- .border = .{ 0xbd, 0x93, 0xf9 },
+ .rule = .{ 0xbd, 0x93, 0xf9 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:197 editor.findMatchBackground: !alpha [*ORANGE, 80] over BG
- .search_bg = .{ 0x94, 0x71, 0x51 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xf8, 0xf8, 0xf2 },
+ .hit = .{ 0x94, 0x71, 0x51 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:248 editorError.foreground: *RED (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:19)
- .diagnostic_error = .{ 0xff, 0x55, 0x55 },
+ .@"error" = .{ 0xff, 0x55, 0x55 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:250 editorWarning.foreground: *CYAN (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:14)
- .diagnostic_warning = .{ 0x8b, 0xe9, 0xfd },
- .palette = .{
+ .warning = .{ 0x8b, 0xe9, 0xfd },
+ .ansi = .{
.{ 0x21, 0x22, 0x2c }, // 0: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:67 terminal.ansiBlack: *COLOR0 (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:22)
.{ 0xff, 0x55, 0x55 }, // 1: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:68 terminal.ansiRed: *COLOR1 (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:23)
.{ 0x50, 0xfa, 0x7b }, // 2: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:69 terminal.ansiGreen: *COLOR2 (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:24)
diff --git a/core/themes/dracula_soft.zig b/core/themes/dracula_soft.zig
index 9a8d5788..74396635 100644
--- a/core/themes/dracula_soft.zig
+++ b/core/themes/dracula_soft.zig
@@ -8,57 +8,56 @@
//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched):
//! - focused tag ground #282a36 -> #454751: 1.05:1 off the unfocused #272727, pardes needs 1.5:1 on a dark page
//! - unfocused tag text #7b7f8b -> #8b8e99: 3.74:1 on #272727, tag text needs 4.5:1 to be read and run
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #7d6976 -> #a28d9b: 1.83:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - search hit #947151 -> #004c63: 3.21:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
pub const theme = .{
.name = "dracula_soft",
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:185 editor.background: *BG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:10)
- .bg = .{ 0x28, 0x2a, 0x36 },
+ .page = .{ 0x28, 0x2a, 0x36 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:184 editor.foreground: *FG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:11); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .fg = .{ 0xf6, 0xf6, 0xf4 },
+ .text = .{ 0xf6, 0xf6, 0xf4 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:189 editor.selectionBackground: *SELECTION (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:12)
- .sel_bg = .{ 0x44, 0x47, 0x5a },
+ .selection = .{ 0x44, 0x47, 0x5a },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xf6, 0xf6, 0xf4 },
+ .selection_text = .{ 0xf6, 0xf6, 0xf4 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:178 tab.inactiveBackground: *BGDark (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:50); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .tag_bg = .{ 0x27, 0x27, 0x27 },
+ .tag = .{ 0x27, 0x27, 0x27 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:179 tab.inactiveForeground: *COMMENT (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:13); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44) #7b7f8b, adjusted
- .tag_fg = .{ 0x8b, 0x8e, 0x99 },
+ .tag_text = .{ 0x8b, 0x8e, 0x99 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:172 tab.activeBackground: *BG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:10) #282a36, adjusted
- .tag_active_bg = .{ 0x45, 0x47, 0x51 },
+ .tag_focus = .{ 0x45, 0x47, 0x51 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:173 tab.activeForeground: *FG (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:11); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .tag_active_fg = .{ 0xf6, 0xf6, 0xf4 },
+ .tag_focus_text = .{ 0xf6, 0xf6, 0xf4 },
// the focused grip: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:175 tab.activeBorderTop: !alpha [*PINK, 80] over BG; Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .box = .{ 0x7d, 0x69, 0x76 },
- // derived: the grip at rest, the accent #7d6976 faded toward the unfocused tag #272727 as far as 1.6:1 off it (0.46 of the way)
- .box_dim = .{ 0x4f, 0x45, 0x4b },
+ .accent = .{ 0x7d, 0x69, 0x76 },
// an unsaved grip: the original's warning colour, ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:250 editorWarning.foreground: *CYAN (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:14); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .box_dirty = .{ 0x97, 0xe1, 0xf1 },
+ .dirty = .{ 0x97, 0xe1, 0xf1 },
// derived: the column grip, the original's function colour, ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:688 tokenColors "Function names" *GREEN; Soft: desaturate(20)
- .column_box = .{ 0x62, 0xe8, 0x84 },
+ .column_grip = .{ 0x62, 0xe8, 0x84 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:725 tokenColors "Keywords" *PINK; Soft: desaturate(20)
- .kw = .{ 0xf2, 0x86, 0xc4 },
+ .keyword = .{ 0xf2, 0x86, 0xc4 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:978 tokenColors "Strings" *YELLOW; Soft: desaturate(20)
- .str = .{ 0xe7, 0xee, 0x98 },
+ .string = .{ 0xe7, 0xee, 0x98 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:640 tokenColors "Constants" *PURPLE; Soft: desaturate(20)
- .num = .{ 0xbf, 0x9e, 0xee },
+ .number = .{ 0xbf, 0x9e, 0xee },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:601 tokenColors "Comments" *COMMENT; Soft: desaturate(20)
.comment = .{ 0x7b, 0x7f, 0x8b },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:186 editorLineNumber.foreground: *COMMENT (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:13); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .lineno = .{ 0x7b, 0x7f, 0x8b },
+ .line_number = .{ 0x7b, 0x7f, 0x8b },
// derived: none in the original; the page
- .scroll_track = .{ 0x28, 0x2a, 0x36 },
+ .rail = .{ 0x28, 0x2a, 0x36 },
// derived: none in the original; line numbers, ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:186 editorLineNumber.foreground: *COMMENT (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:13); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .scroll_thumb = .{ 0x7b, 0x7f, 0x8b },
+ .rail_thumb = .{ 0x7b, 0x7f, 0x8b },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:167 editorGroup.border: *PURPLE (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:18); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .border = .{ 0xbf, 0x9e, 0xee },
+ .rule = .{ 0xbf, 0x9e, 0xee },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:197 editor.findMatchBackground: !alpha [*ORANGE, 80] over BG
- .search_bg = .{ 0x94, 0x71, 0x51 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xf6, 0xf6, 0xf4 },
+ .hit = .{ 0x94, 0x71, 0x51 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:248 editorError.foreground: *RED (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:19); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .diagnostic_error = .{ 0xee, 0x66, 0x66 },
+ .@"error" = .{ 0xee, 0x66, 0x66 },
// ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:250 editorWarning.foreground: *CYAN (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:14); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
- .diagnostic_warning = .{ 0x97, 0xe1, 0xf1 },
- .palette = .{
+ .warning = .{ 0x97, 0xe1, 0xf1 },
+ .ansi = .{
.{ 0x27, 0x27, 0x27 }, // 0: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:67 terminal.ansiBlack: *COLOR0 (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:22); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
.{ 0xee, 0x66, 0x66 }, // 1: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:68 terminal.ansiRed: *COLOR1 (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:23); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
.{ 0x62, 0xe8, 0x84 }, // 2: ~/05-genizah/dracula-visual-studio-code/src/dracula.yml:69 terminal.ansiGreen: *COLOR2 (~/05-genizah/dracula-visual-studio-code/src/dracula.yml:24); Soft: desaturate(20) (~/05-genizah/dracula-visual-studio-code/scripts/generate.js:44)
diff --git a/core/themes/duckbones.zig b/core/themes/duckbones.zig
index c4f86997..dd2d92e7 100644
--- a/core/themes/duckbones.zig
+++ b/core/themes/duckbones.zig
@@ -15,63 +15,63 @@
//! (bold only), so it inherits Normal. TabLine links to StatusLine, TabLineFill
//! to StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral
//! (the theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #4f5570 -> #7e85a2: 1.51:1 on the focused tag, now 3.04:1 (R6: 3:1)
+//! - error #e03600 -> #e63c0d: 4.24:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #795ccc -> #8569da: 3.81:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "duckbones",
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:34 Normal guibg
- .bg = .{ 0x0e, 0x10, 0x1a },
+ .page = .{ 0x0e, 0x10, 0x1a },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:34 Normal guifg
- .fg = .{ 0xeb, 0xef, 0xc0 },
+ .text = .{ 0xeb, 0xef, 0xc0 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:212 Visual guibg
- .sel_bg = .{ 0x37, 0x38, 0x2d },
+ .selection = .{ 0x37, 0x38, 0x2d },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xeb, 0xef, 0xc0 },
+ .selection_text = .{ 0xeb, 0xef, 0xc0 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:199 StatusLineNC guibg
- .tag_bg = .{ 0x1a, 0x1d, 0x2b },
+ .tag = .{ 0x1a, 0x1d, 0x2b },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:199 StatusLineNC guifg
- .tag_fg = .{ 0xf0, 0xf5, 0xc4 },
+ .tag_text = .{ 0xf0, 0xf5, 0xc4 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:196 StatusLine guibg #232738, adjusted
- .tag_active_bg = .{ 0x35, 0x3b, 0x51 },
+ .tag_focus = .{ 0x35, 0x3b, 0x51 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:196 StatusLine guifg
- .tag_active_fg = .{ 0xeb, 0xef, 0xc0 },
+ .tag_focus_text = .{ 0xeb, 0xef, 0xc0 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/duckbones_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x4f, 0x55, 0x70 },
- // derived: the grip at rest, the accent #444a67 faded toward the unfocused tag #1a1d2b as far as 1.6:1 off it (0.76 of the way)
- .box_dim = .{ 0x3a, 0x3f, 0x59 },
+ .accent = .{ 0x4f, 0x55, 0x70 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/duckbones.vim:42 Changed guifg
- .box_dirty = .{ 0x00, 0xa3, 0xcb },
+ .dirty = .{ 0x00, 0xa3, 0xcb },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/duckbones.vim:208 Type guifg
- .column_box = .{ 0x89, 0x8f, 0xb1 },
+ .column_grip = .{ 0x89, 0x8f, 0xb1 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:193 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x79, 0x5c, 0xcc },
+ .keyword = .{ 0x79, 0x5c, 0xcc },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:202 String guifg
- .str = .{ 0xae, 0xb1, 0x8d },
+ .string = .{ 0xae, 0xb1, 0x8d },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:165 Number guifg
- .num = .{ 0xae, 0xb1, 0x8d },
+ .number = .{ 0xae, 0xb1, 0x8d },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:48 Comment guifg
.comment = .{ 0x5a, 0x5f, 0x7b },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:151 LineNr guifg
- .lineno = .{ 0x51, 0x58, 0x7a },
+ .line_number = .{ 0x51, 0x58, 0x7a },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:63 CursorLineNr guifg
- .lineno_active = .{ 0xeb, 0xef, 0xc0 },
+ .line_number_current = .{ 0xeb, 0xef, 0xc0 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:168 PmenuSbar guibg
- .scroll_track = .{ 0x4b, 0x51, 0x70 },
+ .rail = .{ 0x4b, 0x51, 0x70 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:170 PmenuThumb guibg
- .scroll_thumb = .{ 0x75, 0x7d, 0xa3 },
+ .rail_thumb = .{ 0x75, 0x7d, 0xa3 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:219 WinSeparator guifg
- .border = .{ 0x51, 0x58, 0x7a },
+ .rule = .{ 0x51, 0x58, 0x7a },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:174 Search guibg
- .search_bg = .{ 0x4d, 0x31, 0x91 },
- // ~/05-genizah/zenbones.nvim/colors/duckbones.vim:174 Search guifg
- .search_fg = .{ 0xeb, 0xef, 0xc0 },
+ .hit = .{ 0x4d, 0x31, 0x91 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:114 Error guifg via DiagnosticError->Error (link :115)
- .diagnostic_error = .{ 0xe0, 0x36, 0x00 },
+ .@"error" = .{ 0xe0, 0x36, 0x00 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:213 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :214)
- .diagnostic_warning = .{ 0xe3, 0x95, 0x00 },
+ .warning = .{ 0xe3, 0x95, 0x00 },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:73 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x00, 0xa3, 0xcb },
+ .info = .{ 0x00, 0xa3, 0xcb },
// ~/05-genizah/zenbones.nvim/colors/duckbones.vim:68 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x79, 0x5c, 0xcc },
- .palette = .{
+ .hint = .{ 0x79, 0x5c, 0xcc },
+ .ansi = .{
.{ 0x0e, 0x10, 0x1a }, // 0: ~/05-genizah/zenbones.nvim/colors/duckbones.vim:18 g:terminal_color_0
.{ 0xe0, 0x36, 0x00 }, // 1: ~/05-genizah/zenbones.nvim/colors/duckbones.vim:19 g:terminal_color_1
.{ 0x5d, 0xcd, 0x97 }, // 2: ~/05-genizah/zenbones.nvim/colors/duckbones.vim:20 g:terminal_color_2
diff --git a/core/themes/dusk.zig b/core/themes/dusk.zig
index 06f90ab2..30db779f 100644
--- a/core/themes/dusk.zig
+++ b/core/themes/dusk.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "dusk",
- .bg = .{ 0x39, 0x32, 0x3b },
- .fg = .{ 0xc3, 0xb6, 0xc1 },
- .tag_bg = .{ 0x2c, 0x26, 0x30 },
- .tag_fg = .{ 0xc6, 0xb6, 0xc5 },
- .tag_name_fg = .{ 0x96, 0xc9, 0xb8 },
- .tag_active_name_fg = .{ 0xa1, 0xd5, 0xc4 },
- .tag_active_bg = .{ 0x3b, 0x2f, 0x3b },
- .tag_active_fg = .{ 0xd2, 0xc2, 0xd1 },
- .box = .{ 0xed, 0xb0, 0x92 },
- .box_dim = .{ 0x74, 0x54, 0x69 },
- .column_box = .{ 0xbd, 0xce, 0x8e },
- .column_box_dim = .{ 0x75, 0x7a, 0x5f },
- .kw = .{ 0xd0, 0xa7, 0xf2 },
- .str = .{ 0xbe, 0xd1, 0x8b },
- .num = .{ 0xf7, 0xb2, 0x83 },
+ .page = .{ 0x39, 0x32, 0x3b },
+ .text = .{ 0xc3, 0xb6, 0xc1 },
+ .tag = .{ 0x2c, 0x26, 0x30 },
+ .tag_text = .{ 0xc6, 0xb6, 0xc5 },
+ .tag_name = .{ 0x96, 0xc9, 0xb8 },
+ .tag_focus = .{ 0x3b, 0x2f, 0x3b },
+ .tag_focus_text = .{ 0xd2, 0xc2, 0xd1 },
+ .accent = .{ 0xed, 0xb0, 0x92 },
+ .column_grip = .{ 0xbd, 0xce, 0x8e },
+ .keyword = .{ 0xd0, 0xa7, 0xf2 },
+ .string = .{ 0xbe, 0xd1, 0x8b },
+ .number = .{ 0xf7, 0xb2, 0x83 },
.comment = .{ 0xff, 0xb8, 0x7b },
- .lineno = .{ 0x82, 0x71, 0x7e },
- .lineno_active = .{ 0x8a, 0x79, 0x86 },
- .scroll_track = .{ 0x3d, 0x35, 0x40 },
- .scroll_thumb = .{ 0x8e, 0x66, 0x7c },
- .border = .{ 0x6d, 0x58, 0x6b },
- .sel_bg = .{ 0x65, 0x40, 0x53 },
- .sel_fg = .{ 0xff, 0xf0, 0xeb },
- .search_bg = .{ 0x65, 0x4a, 0x27 },
- .search_fg = .{ 0xff, 0xe3, 0xa2 },
- .diagnostic_error = .{ 0xff, 0xa2, 0x9b },
- .diagnostic_warning = .{ 0xfc, 0xce, 0x7b },
- .diagnostic_info = .{ 0xa2, 0xcd, 0xe4 },
- .diagnostic_hint = .{ 0xc5, 0xd4, 0x9a },
- .palette = .{
+ .line_number = .{ 0x82, 0x71, 0x7e },
+ .line_number_current = .{ 0x8a, 0x79, 0x86 },
+ .rail = .{ 0x3d, 0x35, 0x40 },
+ .rail_thumb = .{ 0x8e, 0x66, 0x7c },
+ .rule = .{ 0x6d, 0x58, 0x6b },
+ .selection = .{ 0x65, 0x40, 0x53 },
+ .selection_text = .{ 0xff, 0xf0, 0xeb },
+ .hit = .{ 0x65, 0x4a, 0x27 },
+ .@"error" = .{ 0xff, 0xa2, 0x9b },
+ .warning = .{ 0xfc, 0xce, 0x7b },
+ .info = .{ 0xa2, 0xcd, 0xe4 },
+ .hint = .{ 0xc5, 0xd4, 0x9a },
+ .ansi = .{
.{ 0x39, 0x32, 0x3b },
.{ 0xf6, 0xaa, 0xa4 },
.{ 0xba, 0xc8, 0x94 },
diff --git a/core/themes/forestbones_dark.zig b/core/themes/forestbones_dark.zig
index 11825525..8b759f58 100644
--- a/core/themes/forestbones_dark.zig
+++ b/core/themes/forestbones_dark.zig
@@ -15,63 +15,62 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #6a7781 -> #9eacb7: 1.53:1 on the focused tag, now 3.03:1 (R6: 3:1)
+//! - search hit #9e5179 -> #614a2b: 2.35:1 off the page, now 1.52:1 (R8: 1.5:1, the text reading on it)
pub const theme = .{
.name = "forestbones_dark",
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:33 Normal guibg
- .bg = .{ 0x2c, 0x34, 0x3a },
+ .page = .{ 0x2c, 0x34, 0x3a },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:33 Normal guifg
- .fg = .{ 0xe7, 0xdc, 0xc4 },
+ .text = .{ 0xe7, 0xdc, 0xc4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:211 Visual guibg
- .sel_bg = .{ 0x61, 0x5b, 0x51 },
+ .selection = .{ 0x61, 0x5b, 0x51 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xe7, 0xdc, 0xc4 },
+ .selection_text = .{ 0xe7, 0xdc, 0xc4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:198 StatusLineNC guibg
- .tag_bg = .{ 0x35, 0x3f, 0x46 },
+ .tag = .{ 0x35, 0x3f, 0x46 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:198 StatusLineNC guifg
- .tag_fg = .{ 0xed, 0xe5, 0xd4 },
+ .tag_text = .{ 0xed, 0xe5, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:195 StatusLine guibg #3e4850, adjusted
- .tag_active_bg = .{ 0x50, 0x5a, 0x64 },
+ .tag_focus = .{ 0x50, 0x5a, 0x64 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:195 StatusLine guifg
- .tag_active_fg = .{ 0xe7, 0xdc, 0xc4 },
+ .tag_focus_text = .{ 0xe7, 0xdc, 0xc4 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/forestbones_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x6a, 0x77, 0x81 },
- // derived: the grip at rest, the accent #596873 faded toward the unfocused tag #353f46 as far as 1.6:1 off it (0.76 of the way)
- .box_dim = .{ 0x50, 0x5e, 0x68 },
+ .accent = .{ 0x6a, 0x77, 0x81 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/forestbones.vim:41 Changed guifg
- .box_dirty = .{ 0x7f, 0xbc, 0xb4 },
+ .dirty = .{ 0x7f, 0xbc, 0xb4 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/forestbones.vim:207 Type guifg
- .column_box = .{ 0x7f, 0xbc, 0xb4 },
+ .column_grip = .{ 0x7f, 0xbc, 0xb4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:192 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xa9, 0xc1, 0x81 },
+ .keyword = .{ 0xa9, 0xc1, 0x81 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:201 String guifg
- .str = .{ 0xad, 0xa2, 0x8b },
+ .string = .{ 0xad, 0xa2, 0x8b },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:164 Number guifg
- .num = .{ 0xad, 0xa2, 0x8b },
+ .number = .{ 0xad, 0xa2, 0x8b },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:47 Comment guifg
.comment = .{ 0x6e, 0x7b, 0x85 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:150 LineNr guifg
- .lineno = .{ 0x66, 0x77, 0x83 },
+ .line_number = .{ 0x66, 0x77, 0x83 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:62 CursorLineNr guifg
- .lineno_active = .{ 0xe7, 0xdc, 0xc4 },
+ .line_number_current = .{ 0xe7, 0xdc, 0xc4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:167 PmenuSbar guibg
- .scroll_track = .{ 0x60, 0x6f, 0x7b },
+ .rail = .{ 0x60, 0x6f, 0x7b },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:169 PmenuThumb guibg
- .scroll_thumb = .{ 0x82, 0x96, 0xa5 },
+ .rail_thumb = .{ 0x82, 0x96, 0xa5 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:218 WinSeparator guifg
- .border = .{ 0x66, 0x77, 0x83 },
+ .rule = .{ 0x66, 0x77, 0x83 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:173 Search guibg
- .search_bg = .{ 0x9e, 0x51, 0x79 },
- // ~/05-genizah/zenbones.nvim/colors/forestbones.vim:173 Search guifg
- .search_fg = .{ 0xe7, 0xdc, 0xc4 },
+ .hit = .{ 0x9e, 0x51, 0x79 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:113 Error guifg via DiagnosticError->Error (link :114)
- .diagnostic_error = .{ 0xe6, 0x7c, 0x7f },
+ .@"error" = .{ 0xe6, 0x7c, 0x7f },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:212 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :213)
- .diagnostic_warning = .{ 0xdd, 0xbd, 0x7f },
+ .warning = .{ 0xdd, 0xbd, 0x7f },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:72 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x7f, 0xbc, 0xb4 },
+ .info = .{ 0x7f, 0xbc, 0xb4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:67 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xd6, 0x9a, 0xb7 },
- .palette = .{
+ .hint = .{ 0xd6, 0x9a, 0xb7 },
+ .ansi = .{
.{ 0x2c, 0x34, 0x3a }, // 0: ~/05-genizah/zenbones.nvim/colors/forestbones.vim:17 g:terminal_color_0
.{ 0xe6, 0x7c, 0x7f }, // 1: ~/05-genizah/zenbones.nvim/colors/forestbones.vim:18 g:terminal_color_1
.{ 0xa9, 0xc1, 0x81 }, // 2: ~/05-genizah/zenbones.nvim/colors/forestbones.vim:19 g:terminal_color_2
diff --git a/core/themes/forestbones_light.zig b/core/themes/forestbones_light.zig
index e227d6a9..7d6132df 100644
--- a/core/themes/forestbones_light.zig
+++ b/core/themes/forestbones_light.zig
@@ -17,63 +17,68 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #b1a26f -> #7e703e: 1.56:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - unsaved grip #3a94c4 -> #1378a7: 2.62:1 on the tag, now 3.81:1 (R6: 3:1 on both tags)
+//! - selection #d3dfe6 -> #d7dcd1: 1.23:1 off the page, now 1.26:1 (R7)
+//! - search hit #eebadb -> #f9c96b: 1.50:1 off the page, now 1.40:1 (R8: 1.5:1, the text reading on it)
+//! - error #f85550 -> #d22e30: 2.96:1 on the page, now 4.55:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #dea000 -> #926805: 2.08:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - info #3a94c4 -> #1277a6: 3.05:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #df69ba -> #b54293: 2.76:1 on the page, now 4.55:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "forestbones_light",
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:267 Normal guibg
- .bg = .{ 0xfa, 0xf3, 0xe1 },
+ .page = .{ 0xfa, 0xf3, 0xe1 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:267 Normal guifg
- .fg = .{ 0x4f, 0x5b, 0x62 },
+ .text = .{ 0x4f, 0x5b, 0x62 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:445 Visual guibg
- .sel_bg = .{ 0xd3, 0xdf, 0xe6 },
+ .selection = .{ 0xd3, 0xdf, 0xe6 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x4f, 0x5b, 0x62 },
+ .selection_text = .{ 0x4f, 0x5b, 0x62 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:432 StatusLineNC guibg
- .tag_bg = .{ 0xf3, 0xe2, 0xaa },
+ .tag = .{ 0xf3, 0xe2, 0xaa },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:432 StatusLineNC guifg #758690, adjusted
- .tag_fg = .{ 0x59, 0x66, 0x6d },
+ .tag_text = .{ 0x59, 0x66, 0x6d },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:429 StatusLine guibg #e3d191, adjusted
- .tag_active_bg = .{ 0xdd, 0xca, 0x87 },
+ .tag_focus = .{ 0xdd, 0xca, 0x87 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:429 StatusLine guifg #4f5b62, adjusted
- .tag_active_fg = .{ 0x4c, 0x57, 0x5e },
+ .tag_focus_text = .{ 0x4c, 0x57, 0x5e },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/forestbones_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0xb1, 0xa2, 0x6f },
- // derived: the grip at rest, the accent #c0b079 faded toward the unfocused tag #f3e2aa as far as 1.6:1 off it (0.94 of the way)
- .box_dim = .{ 0xc3, 0xb3, 0x7c },
+ .accent = .{ 0xb1, 0xa2, 0x6f },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/forestbones.vim:275 Changed guifg
- .box_dirty = .{ 0x3a, 0x94, 0xc4 },
+ .dirty = .{ 0x3a, 0x94, 0xc4 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/forestbones.vim:441 Type guifg
- .column_box = .{ 0x3a, 0x94, 0xc4 },
+ .column_grip = .{ 0x3a, 0x94, 0xc4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:426 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x8d, 0xa2, 0x00 },
+ .keyword = .{ 0x8d, 0xa2, 0x00 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:435 String guifg
- .str = .{ 0x73, 0x84, 0x8d },
+ .string = .{ 0x73, 0x84, 0x8d },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:398 Number guifg
- .num = .{ 0x73, 0x84, 0x8d },
+ .number = .{ 0x73, 0x84, 0x8d },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:281 Comment guifg
.comment = .{ 0x9a, 0x90, 0x71 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:384 LineNr guifg
- .lineno = .{ 0xa9, 0x9b, 0x6a },
+ .line_number = .{ 0xa9, 0x9b, 0x6a },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:296 CursorLineNr guifg
- .lineno_active = .{ 0x4f, 0x5b, 0x62 },
+ .line_number_current = .{ 0x4f, 0x5b, 0x62 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:401 PmenuSbar guibg
- .scroll_track = .{ 0xb7, 0xa8, 0x74 },
+ .rail = .{ 0xb7, 0xa8, 0x74 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:403 PmenuThumb guibg
- .scroll_thumb = .{ 0xfc, 0xf9, 0xf1 },
+ .rail_thumb = .{ 0xfc, 0xf9, 0xf1 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:452 WinSeparator guifg
- .border = .{ 0xa9, 0x9b, 0x6a },
+ .rule = .{ 0xa9, 0x9b, 0x6a },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:407 Search guibg
- .search_bg = .{ 0xee, 0xba, 0xdb },
- // ~/05-genizah/zenbones.nvim/colors/forestbones.vim:407 Search guifg
- .search_fg = .{ 0x4f, 0x5b, 0x62 },
+ .hit = .{ 0xee, 0xba, 0xdb },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:347 Error guifg via DiagnosticError->Error (link :348)
- .diagnostic_error = .{ 0xf8, 0x55, 0x50 },
+ .@"error" = .{ 0xf8, 0x55, 0x50 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:446 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :447)
- .diagnostic_warning = .{ 0xde, 0xa0, 0x00 },
+ .warning = .{ 0xde, 0xa0, 0x00 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:306 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x3a, 0x94, 0xc4 },
+ .info = .{ 0x3a, 0x94, 0xc4 },
// ~/05-genizah/zenbones.nvim/colors/forestbones.vim:301 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xdf, 0x69, 0xba },
- .palette = .{
+ .hint = .{ 0xdf, 0x69, 0xba },
+ .ansi = .{
.{ 0xfa, 0xf3, 0xe1 }, // 0: ~/05-genizah/zenbones.nvim/colors/forestbones.vim:251 g:terminal_color_0
.{ 0xf8, 0x55, 0x50 }, // 1: ~/05-genizah/zenbones.nvim/colors/forestbones.vim:252 g:terminal_color_1
.{ 0x8d, 0xa2, 0x00 }, // 2: ~/05-genizah/zenbones.nvim/colors/forestbones.vim:253 g:terminal_color_2
diff --git a/core/themes/forge.zig b/core/themes/forge.zig
index 0effa742..6a0dab5f 100644
--- a/core/themes/forge.zig
+++ b/core/themes/forge.zig
@@ -4,37 +4,33 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "forge",
- .bg = .{ 0x0c, 0x0c, 0x0e },
- .fg = .{ 0xe5, 0xe5, 0xe5 },
- .tag_bg = .{ 0x22, 0x25, 0x2b },
- .tag_fg = .{ 0xc5, 0xc9, 0xd2 },
- .tag_name_fg = .{ 0xec, 0xbf, 0x9b },
- .tag_active_name_fg = .{ 0xf8, 0xcb, 0xa7 },
- .tag_active_bg = .{ 0x2d, 0x34, 0x40 },
- .tag_active_fg = .{ 0xd1, 0xd5, 0xde },
- .box = .{ 0x9c, 0xc3, 0xf7 },
- .box_dim = .{ 0x55, 0x64, 0x7b },
- .column_box = .{ 0xb4, 0xd3, 0xa3 },
- .column_box_dim = .{ 0x6a, 0x7b, 0x67 },
- .kw = .{ 0x61, 0xb7, 0xfc },
- .str = .{ 0xdd, 0x8b, 0x69 },
- .num = .{ 0xb3, 0xd5, 0xa1 },
+ .page = .{ 0x0c, 0x0c, 0x0e },
+ .text = .{ 0xe5, 0xe5, 0xe5 },
+ .tag = .{ 0x22, 0x25, 0x2b },
+ .tag_text = .{ 0xc5, 0xc9, 0xd2 },
+ .tag_name = .{ 0xec, 0xbf, 0x9b },
+ .tag_focus = .{ 0x2d, 0x34, 0x40 },
+ .tag_focus_text = .{ 0xd1, 0xd5, 0xde },
+ .accent = .{ 0x9c, 0xc3, 0xf7 },
+ .column_grip = .{ 0xb4, 0xd3, 0xa3 },
+ .keyword = .{ 0x61, 0xb7, 0xfc },
+ .string = .{ 0xdd, 0x8b, 0x69 },
+ .number = .{ 0xb3, 0xd5, 0xa1 },
.comment = .{ 0xb3, 0xca, 0xff },
- .lineno = .{ 0x62, 0x65, 0x6c },
- .lineno_active = .{ 0x6a, 0x6d, 0x74 },
- .scroll_track = .{ 0x1a, 0x1c, 0x21 },
- .scroll_thumb = .{ 0x70, 0x80, 0x95 },
- .border = .{ 0x60, 0x6f, 0x86 },
- .sel_bg = .{ 0x1c, 0x51, 0x72 },
- .sel_fg = .{ 0xe2, 0xee, 0xf4 },
- .search_bg = .{ 0x61, 0x4d, 0x1d },
- .search_fg = .{ 0xf5, 0xdf, 0xa1 },
- .diagnostic_error = .{ 0xff, 0x7f, 0x74 },
- .diagnostic_warning = .{ 0xe4, 0xbf, 0x70 },
- .diagnostic_info = .{ 0x75, 0xbe, 0xff },
- .diagnostic_hint = .{ 0x81, 0xd8, 0xbe },
+ .line_number = .{ 0x62, 0x65, 0x6c },
+ .line_number_current = .{ 0x6a, 0x6d, 0x74 },
+ .rail = .{ 0x1a, 0x1c, 0x21 },
+ .rail_thumb = .{ 0x70, 0x80, 0x95 },
+ .rule = .{ 0x60, 0x6f, 0x86 },
+ .selection = .{ 0x1c, 0x51, 0x72 },
+ .selection_text = .{ 0xe2, 0xee, 0xf4 },
+ .hit = .{ 0x61, 0x4d, 0x1d },
+ .@"error" = .{ 0xff, 0x7f, 0x74 },
+ .warning = .{ 0xe4, 0xbf, 0x70 },
+ .info = .{ 0x75, 0xbe, 0xff },
+ .hint = .{ 0x81, 0xd8, 0xbe },
// ANSI roles are semantic colors, independent of peach string syntax.
- .palette = .{
+ .ansi = .{
.{ 0x0c, 0x0c, 0x0e },
.{ 0xf2, 0x8a, 0x81 },
.{ 0xb5, 0xce, 0xa8 },
diff --git a/core/themes/forge_black.zig b/core/themes/forge_black.zig
index f51e8594..74401c08 100644
--- a/core/themes/forge_black.zig
+++ b/core/themes/forge_black.zig
@@ -4,37 +4,33 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "forge_black",
- .bg = .{ 0x00, 0x00, 0x00 },
- .fg = .{ 0xf6, 0xf6, 0xf6 },
- .tag_bg = .{ 0x22, 0x25, 0x2b },
- .tag_fg = .{ 0xc5, 0xc9, 0xd2 },
- .tag_name_fg = .{ 0xec, 0xbf, 0x9b },
- .tag_active_name_fg = .{ 0xf8, 0xcb, 0xa7 },
- .tag_active_bg = .{ 0x2d, 0x34, 0x40 },
- .tag_active_fg = .{ 0xd1, 0xd5, 0xde },
- .box = .{ 0x9c, 0xc3, 0xf7 },
- .box_dim = .{ 0x55, 0x64, 0x7b },
- .column_box = .{ 0xb4, 0xd3, 0xa3 },
- .column_box_dim = .{ 0x6a, 0x7b, 0x67 },
- .kw = .{ 0x61, 0xb7, 0xfc },
- .str = .{ 0xdd, 0x8b, 0x69 },
- .num = .{ 0xb3, 0xd5, 0xa1 },
+ .page = .{ 0x00, 0x00, 0x00 },
+ .text = .{ 0xf6, 0xf6, 0xf6 },
+ .tag = .{ 0x22, 0x25, 0x2b },
+ .tag_text = .{ 0xc5, 0xc9, 0xd2 },
+ .tag_name = .{ 0xec, 0xbf, 0x9b },
+ .tag_focus = .{ 0x2d, 0x34, 0x40 },
+ .tag_focus_text = .{ 0xd1, 0xd5, 0xde },
+ .accent = .{ 0x9c, 0xc3, 0xf7 },
+ .column_grip = .{ 0xb4, 0xd3, 0xa3 },
+ .keyword = .{ 0x61, 0xb7, 0xfc },
+ .string = .{ 0xdd, 0x8b, 0x69 },
+ .number = .{ 0xb3, 0xd5, 0xa1 },
.comment = .{ 0xb3, 0xca, 0xff },
- .lineno = .{ 0x62, 0x65, 0x6c },
- .lineno_active = .{ 0x6a, 0x6d, 0x74 },
- .scroll_track = .{ 0x14, 0x16, 0x1a },
- .scroll_thumb = .{ 0x70, 0x80, 0x95 },
- .border = .{ 0x60, 0x6f, 0x86 },
- .sel_bg = .{ 0x1c, 0x51, 0x72 },
- .sel_fg = .{ 0xe2, 0xee, 0xf4 },
- .search_bg = .{ 0x61, 0x4d, 0x1d },
- .search_fg = .{ 0xf5, 0xdf, 0xa1 },
- .diagnostic_error = .{ 0xff, 0x7f, 0x74 },
- .diagnostic_warning = .{ 0xe4, 0xbf, 0x70 },
- .diagnostic_info = .{ 0x75, 0xbe, 0xff },
- .diagnostic_hint = .{ 0x81, 0xd8, 0xbe },
+ .line_number = .{ 0x62, 0x65, 0x6c },
+ .line_number_current = .{ 0x6a, 0x6d, 0x74 },
+ .rail = .{ 0x14, 0x16, 0x1a },
+ .rail_thumb = .{ 0x70, 0x80, 0x95 },
+ .rule = .{ 0x60, 0x6f, 0x86 },
+ .selection = .{ 0x1c, 0x51, 0x72 },
+ .selection_text = .{ 0xe2, 0xee, 0xf4 },
+ .hit = .{ 0x61, 0x4d, 0x1d },
+ .@"error" = .{ 0xff, 0x7f, 0x74 },
+ .warning = .{ 0xe4, 0xbf, 0x70 },
+ .info = .{ 0x75, 0xbe, 0xff },
+ .hint = .{ 0x81, 0xd8, 0xbe },
// ANSI roles are semantic colors, independent of peach string syntax.
- .palette = .{
+ .ansi = .{
.{ 0x00, 0x00, 0x00 },
.{ 0xf2, 0x8a, 0x81 },
.{ 0xb5, 0xce, 0xa8 },
diff --git a/core/themes/forge_soft.zig b/core/themes/forge_soft.zig
index a0cf141b..3d9f8fe6 100644
--- a/core/themes/forge_soft.zig
+++ b/core/themes/forge_soft.zig
@@ -4,37 +4,33 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "forge_soft",
- .bg = .{ 0x35, 0x38, 0x3e },
- .fg = .{ 0xbf, 0xc3, 0xcc },
- .tag_bg = .{ 0x2a, 0x2d, 0x34 },
- .tag_fg = .{ 0xc5, 0xc9, 0xd2 },
- .tag_name_fg = .{ 0xec, 0xbf, 0x9b },
- .tag_active_name_fg = .{ 0xf8, 0xcb, 0xa7 },
- .tag_active_bg = .{ 0x37, 0x3e, 0x49 },
- .tag_active_fg = .{ 0xd1, 0xd5, 0xde },
- .box = .{ 0x9c, 0xc3, 0xf7 },
- .box_dim = .{ 0x55, 0x64, 0x7b },
- .column_box = .{ 0xb4, 0xd3, 0xa3 },
- .column_box_dim = .{ 0x6d, 0x7f, 0x6c },
- .kw = .{ 0x61, 0xb7, 0xfc },
- .str = .{ 0xe7, 0xa0, 0x81 },
- .num = .{ 0xb3, 0xd5, 0xa1 },
+ .page = .{ 0x35, 0x38, 0x3e },
+ .text = .{ 0xbf, 0xc3, 0xcc },
+ .tag = .{ 0x2a, 0x2d, 0x34 },
+ .tag_text = .{ 0xc5, 0xc9, 0xd2 },
+ .tag_name = .{ 0xec, 0xbf, 0x9b },
+ .tag_focus = .{ 0x37, 0x3e, 0x49 },
+ .tag_focus_text = .{ 0xd1, 0xd5, 0xde },
+ .accent = .{ 0x9c, 0xc3, 0xf7 },
+ .column_grip = .{ 0xb4, 0xd3, 0xa3 },
+ .keyword = .{ 0x61, 0xb7, 0xfc },
+ .string = .{ 0xe7, 0xa0, 0x81 },
+ .number = .{ 0xb3, 0xd5, 0xa1 },
.comment = .{ 0xb3, 0xca, 0xff },
- .lineno = .{ 0x86, 0x89, 0x91 },
- .lineno_active = .{ 0x8e, 0x91, 0x99 },
- .scroll_track = .{ 0x3d, 0x40, 0x47 },
- .scroll_thumb = .{ 0x70, 0x80, 0x95 },
- .border = .{ 0x60, 0x6f, 0x86 },
- .sel_bg = .{ 0x1c, 0x51, 0x72 },
- .sel_fg = .{ 0xe2, 0xee, 0xf4 },
- .search_bg = .{ 0x61, 0x4d, 0x1d },
- .search_fg = .{ 0xf5, 0xdf, 0xa1 },
- .diagnostic_error = .{ 0xff, 0x7f, 0x74 },
- .diagnostic_warning = .{ 0xe4, 0xbf, 0x70 },
- .diagnostic_info = .{ 0x75, 0xbe, 0xff },
- .diagnostic_hint = .{ 0x81, 0xd8, 0xbe },
+ .line_number = .{ 0x86, 0x89, 0x91 },
+ .line_number_current = .{ 0x8e, 0x91, 0x99 },
+ .rail = .{ 0x3d, 0x40, 0x47 },
+ .rail_thumb = .{ 0x70, 0x80, 0x95 },
+ .rule = .{ 0x60, 0x6f, 0x86 },
+ .selection = .{ 0x1c, 0x51, 0x72 },
+ .selection_text = .{ 0xe2, 0xee, 0xf4 },
+ .hit = .{ 0x61, 0x4d, 0x1d },
+ .@"error" = .{ 0xff, 0x7f, 0x74 },
+ .warning = .{ 0xe4, 0xbf, 0x70 },
+ .info = .{ 0x75, 0xbe, 0xff },
+ .hint = .{ 0x81, 0xd8, 0xbe },
// ANSI roles are semantic colors, independent of peach string syntax.
- .palette = .{
+ .ansi = .{
.{ 0x35, 0x38, 0x3e },
.{ 0xf2, 0x8a, 0x81 },
.{ 0xb5, 0xce, 0xa8 },
diff --git a/core/themes/harvest.zig b/core/themes/harvest.zig
index b0ad57c7..a0a44656 100644
--- a/core/themes/harvest.zig
+++ b/core/themes/harvest.zig
@@ -4,36 +4,32 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "harvest",
- .bg = .{ 0x10, 0x0e, 0x0b },
- .fg = .{ 0xf3, 0xf2, 0xcc },
- .tag_bg = .{ 0x34, 0x3b, 0x2e },
- .tag_fg = .{ 0xd5, 0xd8, 0xb8 },
- .tag_name_fg = .{ 0xba, 0xdb, 0xeb },
- .tag_active_name_fg = .{ 0xc5, 0xe7, 0xf7 },
- .tag_active_bg = .{ 0x42, 0x4d, 0x38 },
- .tag_active_fg = .{ 0xe1, 0xe4, 0xc4 },
- .box = .{ 0xd8, 0xbd, 0x83 },
- .box_dim = .{ 0x7b, 0x7e, 0x4e },
- .column_box = .{ 0xff, 0x74, 0x54 },
- .column_box_dim = .{ 0x9b, 0x58, 0x3f },
- .kw = .{ 0xff, 0x74, 0x54 },
- .str = .{ 0x9a, 0xcc, 0x62 },
- .num = .{ 0xff, 0xd8, 0x61 },
+ .page = .{ 0x10, 0x0e, 0x0b },
+ .text = .{ 0xf3, 0xf2, 0xcc },
+ .tag = .{ 0x34, 0x3b, 0x2e },
+ .tag_text = .{ 0xd5, 0xd8, 0xb8 },
+ .tag_name = .{ 0xba, 0xdb, 0xeb },
+ .tag_focus = .{ 0x42, 0x4d, 0x38 },
+ .tag_focus_text = .{ 0xe1, 0xe4, 0xc4 },
+ .accent = .{ 0xd8, 0xbd, 0x83 },
+ .column_grip = .{ 0xff, 0x74, 0x54 },
+ .keyword = .{ 0xff, 0x74, 0x54 },
+ .string = .{ 0x9a, 0xcc, 0x62 },
+ .number = .{ 0xff, 0xd8, 0x61 },
.comment = .{ 0xff, 0xca, 0x7c },
- .lineno = .{ 0x6a, 0x64, 0x56 },
- .lineno_active = .{ 0x72, 0x6c, 0x5e },
- .scroll_track = .{ 0x20, 0x1d, 0x17 },
- .scroll_thumb = .{ 0x88, 0x8e, 0x5e },
- .border = .{ 0x78, 0x88, 0x60 },
- .sel_bg = .{ 0x4f, 0x58, 0x34 },
- .sel_fg = .{ 0xf3, 0xf2, 0xcc },
- .search_bg = .{ 0x6f, 0x44, 0x24 },
- .search_fg = .{ 0xff, 0xe2, 0xac },
- .diagnostic_error = .{ 0xff, 0x84, 0x69 },
- .diagnostic_warning = .{ 0xff, 0xd8, 0x61 },
- .diagnostic_info = .{ 0x7d, 0xca, 0xbf },
- .diagnostic_hint = .{ 0xb9, 0xcf, 0x83 },
- .palette = .{
+ .line_number = .{ 0x6a, 0x64, 0x56 },
+ .line_number_current = .{ 0x72, 0x6c, 0x5e },
+ .rail = .{ 0x20, 0x1d, 0x17 },
+ .rail_thumb = .{ 0x88, 0x8e, 0x5e },
+ .rule = .{ 0x78, 0x88, 0x60 },
+ .selection = .{ 0x4f, 0x58, 0x34 },
+ .selection_text = .{ 0xf3, 0xf2, 0xcc },
+ .hit = .{ 0x6f, 0x44, 0x24 },
+ .@"error" = .{ 0xff, 0x84, 0x69 },
+ .warning = .{ 0xff, 0xd8, 0x61 },
+ .info = .{ 0x7d, 0xca, 0xbf },
+ .hint = .{ 0xb9, 0xcf, 0x83 },
+ .ansi = .{
.{ 0x10, 0x0e, 0x0b },
.{ 0xf5, 0x8a, 0x73 },
.{ 0x99, 0xbe, 0x70 },
diff --git a/core/themes/helix.zig b/core/themes/helix.zig
index 61dc8e63..9ee639df 100644
--- a/core/themes/helix.zig
+++ b/core/themes/helix.zig
@@ -37,24 +37,23 @@
//! turns a missing field here into a compile error naming it.
pub const theme = .{
.name = "helix",
- .bg = .{ 0x08, 0x08, 0x08 },
- .fg = .{ 0xbd, 0xbd, 0xbd },
- .sel_bg = .{ 0x80, 0xa0, 0xff },
- .sel_fg = .{ 0x08, 0x08, 0x08 },
- .tag_bg = .{ 0x12, 0x12, 0x12 },
- .tag_fg = .{ 0x94, 0x94, 0x94 },
+ .page = .{ 0x08, 0x08, 0x08 },
+ .text = .{ 0xbd, 0xbd, 0xbd },
+ .selection = .{ 0x80, 0xa0, 0xff },
+ .selection_text = .{ 0x08, 0x08, 0x08 },
+ .tag = .{ 0x12, 0x12, 0x12 },
+ .tag_text = .{ 0x94, 0x94, 0x94 },
// The focused tag, still on the ramp: 237 #3a3a3a under 250 #bdbdbd
// (the page's text), 1.65:1 off the plain bar.
- .tag_active_bg = .{ 0x3a, 0x3a, 0x3a },
- .tag_active_fg = .{ 0xbd, 0xbd, 0xbd },
- .box = .{ 0x62, 0x62, 0x62 },
- .box_dim = .{ 0x26, 0x26, 0x26 },
- .kw = .{ 0xd7, 0x76, 0xf9 },
- .str = .{ 0xf3, 0xcd, 0x7a },
- .num = .{ 0xf3, 0xcd, 0x7a },
+ .tag_focus = .{ 0x3a, 0x3a, 0x3a },
+ .tag_focus_text = .{ 0xbd, 0xbd, 0xbd },
+ .accent = .{ 0x62, 0x62, 0x62 },
+ .keyword = .{ 0xd7, 0x76, 0xf9 },
+ .string = .{ 0xf3, 0xcd, 0x7a },
+ .number = .{ 0xf3, 0xcd, 0x7a },
.comment = .{ 0xff, 0xff, 0xff },
- .lineno = .{ 0x62, 0x62, 0x62 },
- .scroll_track = .{ 0x12, 0x12, 0x12 },
- .scroll_thumb = .{ 0x44, 0x44, 0x44 },
- .palette = null,
+ .line_number = .{ 0x62, 0x62, 0x62 },
+ .rail = .{ 0x12, 0x12, 0x12 },
+ .rail_thumb = .{ 0x44, 0x44, 0x44 },
+ .ansi = null,
};
diff --git a/core/themes/ink.zig b/core/themes/ink.zig
index 4151df7a..ca718cce 100644
--- a/core/themes/ink.zig
+++ b/core/themes/ink.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "ink",
- .bg = .{ 0x00, 0x00, 0x00 },
- .fg = .{ 0xf3, 0xf7, 0xfc },
- .tag_bg = .{ 0x15, 0x21, 0x2c },
- .tag_fg = .{ 0xd5, 0xe4, 0xf1 },
- .tag_name_fg = .{ 0xf5, 0xe0, 0xac },
- .tag_active_name_fg = .{ 0xff, 0xea, 0xb8 },
- .tag_active_bg = .{ 0x22, 0x33, 0x42 },
- .tag_active_fg = .{ 0xe1, 0xee, 0xf9 },
- .box = .{ 0x86, 0xd8, 0xff },
- .box_dim = .{ 0x5f, 0x79, 0x90 },
- .column_box = .{ 0xff, 0xd6, 0x94 },
- .column_box_dim = .{ 0x8f, 0x7d, 0x5b },
- .kw = .{ 0xd5, 0xb8, 0xff },
- .str = .{ 0xac, 0xf9, 0xa3 },
- .num = .{ 0xff, 0xd6, 0x94 },
+ .page = .{ 0x00, 0x00, 0x00 },
+ .text = .{ 0xf3, 0xf7, 0xfc },
+ .tag = .{ 0x15, 0x21, 0x2c },
+ .tag_text = .{ 0xd5, 0xe4, 0xf1 },
+ .tag_name = .{ 0xf5, 0xe0, 0xac },
+ .tag_focus = .{ 0x22, 0x33, 0x42 },
+ .tag_focus_text = .{ 0xe1, 0xee, 0xf9 },
+ .accent = .{ 0x86, 0xd8, 0xff },
+ .column_grip = .{ 0xff, 0xd6, 0x94 },
+ .keyword = .{ 0xd5, 0xb8, 0xff },
+ .string = .{ 0xac, 0xf9, 0xa3 },
+ .number = .{ 0xff, 0xd6, 0x94 },
.comment = .{ 0x9d, 0xee, 0xff },
- .lineno = .{ 0x62, 0x6b, 0x75 },
- .lineno_active = .{ 0x6a, 0x73, 0x7d },
- .scroll_track = .{ 0x15, 0x21, 0x2c },
- .scroll_thumb = .{ 0x86, 0xa8, 0xc2 },
- .border = .{ 0x80, 0x95, 0xa9 },
- .sel_bg = .{ 0x1b, 0x54, 0x7c },
- .sel_fg = .{ 0xff, 0xff, 0xff },
- .search_bg = .{ 0x7c, 0x4e, 0x0d },
- .search_fg = .{ 0xff, 0xff, 0xff },
- .diagnostic_error = .{ 0xff, 0xb1, 0xb1 },
- .diagnostic_warning = .{ 0xff, 0xe2, 0x9c },
- .diagnostic_info = .{ 0x9b, 0xde, 0xff },
- .diagnostic_hint = .{ 0xc4, 0xeb, 0xae },
- .palette = .{
+ .line_number = .{ 0x62, 0x6b, 0x75 },
+ .line_number_current = .{ 0x6a, 0x73, 0x7d },
+ .rail = .{ 0x15, 0x21, 0x2c },
+ .rail_thumb = .{ 0x86, 0xa8, 0xc2 },
+ .rule = .{ 0x80, 0x95, 0xa9 },
+ .selection = .{ 0x1b, 0x54, 0x7c },
+ .selection_text = .{ 0xff, 0xff, 0xff },
+ .hit = .{ 0x7c, 0x4e, 0x0d },
+ .@"error" = .{ 0xff, 0xb1, 0xb1 },
+ .warning = .{ 0xff, 0xe2, 0x9c },
+ .info = .{ 0x9b, 0xde, 0xff },
+ .hint = .{ 0xc4, 0xeb, 0xae },
+ .ansi = .{
.{ 0x00, 0x00, 0x00 },
.{ 0xff, 0xb1, 0xb1 },
.{ 0xb5, 0xee, 0xae },
diff --git a/core/themes/kanagawabones.zig b/core/themes/kanagawabones.zig
index 94e5aab0..345d6227 100644
--- a/core/themes/kanagawabones.zig
+++ b/core/themes/kanagawabones.zig
@@ -16,63 +16,61 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #606071 -> #9090a2: 1.54:1 on the focused tag, now 3.03:1 (R6: 3:1)
pub const theme = .{
.name = "kanagawabones",
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:34 Normal guibg
- .bg = .{ 0x1f, 0x1f, 0x28 },
+ .page = .{ 0x1f, 0x1f, 0x28 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:34 Normal guifg
- .fg = .{ 0xdd, 0xd8, 0xbb },
+ .text = .{ 0xdd, 0xd8, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:212 Visual guibg
- .sel_bg = .{ 0x49, 0x47, 0x3e },
+ .selection = .{ 0x49, 0x47, 0x3e },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xdd, 0xd8, 0xbb },
+ .selection_text = .{ 0xdd, 0xd8, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:199 StatusLineNC guibg
- .tag_bg = .{ 0x29, 0x29, 0x34 },
+ .tag = .{ 0x29, 0x29, 0x34 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:199 StatusLineNC guifg
- .tag_fg = .{ 0xe9, 0xe3, 0xc5 },
+ .tag_text = .{ 0xe9, 0xe3, 0xc5 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:196 StatusLine guibg #363644, adjusted
- .tag_active_bg = .{ 0x44, 0x44, 0x56 },
+ .tag_focus = .{ 0x44, 0x44, 0x56 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:196 StatusLine guifg
- .tag_active_fg = .{ 0xdd, 0xd8, 0xbb },
+ .tag_focus_text = .{ 0xdd, 0xd8, 0xbb },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/kanagawabones_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x60, 0x60, 0x71 },
- // derived: the grip at rest, the accent #565668 faded toward the unfocused tag #292934 as far as 1.6:1 off it (0.70 of the way)
- .box_dim = .{ 0x49, 0x49, 0x58 },
+ .accent = .{ 0x60, 0x60, 0x71 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:42 Changed guifg
- .box_dirty = .{ 0x7e, 0xb3, 0xc9 },
+ .dirty = .{ 0x7e, 0xb3, 0xc9 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:208 Type guifg
- .column_box = .{ 0x97, 0x97, 0xa5 },
+ .column_grip = .{ 0x97, 0x97, 0xa5 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:192 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xdd, 0xd8, 0xbb },
+ .keyword = .{ 0xdd, 0xd8, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:202 String guifg
- .str = .{ 0xa2, 0x9e, 0x89 },
+ .string = .{ 0xa2, 0x9e, 0x89 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:165 Number guifg
- .num = .{ 0xa2, 0x9e, 0x89 },
+ .number = .{ 0xa2, 0x9e, 0x89 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:48 Comment guifg
.comment = .{ 0x69, 0x69, 0x77 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:151 LineNr guifg
- .lineno = .{ 0x64, 0x64, 0x76 },
+ .line_number = .{ 0x64, 0x64, 0x76 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:63 CursorLineNr guifg
- .lineno_active = .{ 0xdd, 0xd8, 0xbb },
+ .line_number_current = .{ 0xdd, 0xd8, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:168 PmenuSbar guibg
- .scroll_track = .{ 0x5d, 0x5d, 0x6f },
+ .rail = .{ 0x5d, 0x5d, 0x6f },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:170 PmenuThumb guibg
- .scroll_thumb = .{ 0x85, 0x85, 0x94 },
+ .rail_thumb = .{ 0x85, 0x85, 0x94 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:219 WinSeparator guifg
- .border = .{ 0x64, 0x64, 0x76 },
+ .rule = .{ 0x64, 0x64, 0x76 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:173 Search guibg
- .search_bg = .{ 0x61, 0x4a, 0x82 },
- // ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:173 Search guifg
- .search_fg = .{ 0xdd, 0xd8, 0xbb },
+ .hit = .{ 0x61, 0x4a, 0x82 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:114 Error guifg via DiagnosticError->Error (link :115)
- .diagnostic_error = .{ 0xe4, 0x6a, 0x78 },
+ .@"error" = .{ 0xe4, 0x6a, 0x78 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:213 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :214)
- .diagnostic_warning = .{ 0xe5, 0xc2, 0x83 },
+ .warning = .{ 0xe5, 0xc2, 0x83 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:73 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x7e, 0xb3, 0xc9 },
+ .info = .{ 0x7e, 0xb3, 0xc9 },
// ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:68 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x95, 0x7f, 0xb8 },
- .palette = .{
+ .hint = .{ 0x95, 0x7f, 0xb8 },
+ .ansi = .{
.{ 0x1f, 0x1f, 0x28 }, // 0: ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:18 g:terminal_color_0
.{ 0xe4, 0x6a, 0x78 }, // 1: ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:19 g:terminal_color_1
.{ 0x98, 0xbc, 0x6d }, // 2: ~/05-genizah/zenbones.nvim/colors/kanagawabones.vim:20 g:terminal_color_2
diff --git a/core/themes/lagoon.zig b/core/themes/lagoon.zig
index 66473c46..7679f4ea 100644
--- a/core/themes/lagoon.zig
+++ b/core/themes/lagoon.zig
@@ -4,36 +4,32 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "lagoon",
- .bg = .{ 0x34, 0x46, 0x4c },
- .fg = .{ 0xba, 0xc9, 0xce },
- .tag_bg = .{ 0x29, 0x44, 0x3f },
- .tag_fg = .{ 0xbb, 0xd7, 0xcb },
- .tag_name_fg = .{ 0xe4, 0xc2, 0xec },
- .tag_active_name_fg = .{ 0xf0, 0xce, 0xf8 },
- .tag_active_bg = .{ 0x34, 0x57, 0x4d },
- .tag_active_fg = .{ 0xc7, 0xe3, 0xd7 },
- .box = .{ 0x81, 0xcf, 0xb7 },
- .box_dim = .{ 0x54, 0x83, 0x72 },
- .column_box = .{ 0xff, 0xad, 0x91 },
- .column_box_dim = .{ 0x9a, 0x76, 0x62 },
- .kw = .{ 0xd9, 0x9c, 0xf9 },
- .str = .{ 0xc6, 0xf8, 0x7d },
- .num = .{ 0xff, 0xad, 0x91 },
+ .page = .{ 0x34, 0x46, 0x4c },
+ .text = .{ 0xba, 0xc9, 0xce },
+ .tag = .{ 0x29, 0x44, 0x3f },
+ .tag_text = .{ 0xbb, 0xd7, 0xcb },
+ .tag_name = .{ 0xe4, 0xc2, 0xec },
+ .tag_focus = .{ 0x34, 0x57, 0x4d },
+ .tag_focus_text = .{ 0xc7, 0xe3, 0xd7 },
+ .accent = .{ 0x81, 0xcf, 0xb7 },
+ .column_grip = .{ 0xff, 0xad, 0x91 },
+ .keyword = .{ 0xd9, 0x9c, 0xf9 },
+ .string = .{ 0xc6, 0xf8, 0x7d },
+ .number = .{ 0xff, 0xad, 0x91 },
.comment = .{ 0x84, 0xef, 0xd9 },
- .lineno = .{ 0x7b, 0x91, 0x94 },
- .lineno_active = .{ 0x83, 0x99, 0x9c },
- .scroll_track = .{ 0x3a, 0x4c, 0x50 },
- .scroll_thumb = .{ 0x6e, 0x9b, 0x8b },
- .border = .{ 0x6e, 0x9b, 0x8c },
- .sel_bg = .{ 0x32, 0x5f, 0x6c },
- .sel_fg = .{ 0xe6, 0xf2, 0xf3 },
- .search_bg = .{ 0x69, 0x58, 0x1e },
- .search_fg = .{ 0xff, 0xf0, 0xb9 },
- .diagnostic_error = .{ 0xff, 0x9d, 0xa1 },
- .diagnostic_warning = .{ 0xff, 0xcb, 0x6b },
- .diagnostic_info = .{ 0x7d, 0xca, 0xff },
- .diagnostic_hint = .{ 0x7c, 0xea, 0xd4 },
- .palette = .{
+ .line_number = .{ 0x7b, 0x91, 0x94 },
+ .line_number_current = .{ 0x83, 0x99, 0x9c },
+ .rail = .{ 0x3a, 0x4c, 0x50 },
+ .rail_thumb = .{ 0x6e, 0x9b, 0x8b },
+ .rule = .{ 0x6e, 0x9b, 0x8c },
+ .selection = .{ 0x32, 0x5f, 0x6c },
+ .selection_text = .{ 0xe6, 0xf2, 0xf3 },
+ .hit = .{ 0x69, 0x58, 0x1e },
+ .@"error" = .{ 0xff, 0x9d, 0xa1 },
+ .warning = .{ 0xff, 0xcb, 0x6b },
+ .info = .{ 0x7d, 0xca, 0xff },
+ .hint = .{ 0x7c, 0xea, 0xd4 },
+ .ansi = .{
.{ 0x34, 0x46, 0x4c },
.{ 0xff, 0x9d, 0xa1 },
.{ 0xc3, 0xe8, 0x8d },
diff --git a/core/themes/lapis.zig b/core/themes/lapis.zig
index 95fc86bd..a4996d59 100644
--- a/core/themes/lapis.zig
+++ b/core/themes/lapis.zig
@@ -5,48 +5,44 @@
pub const theme = .{
.name = "lapis",
// --lapis-deep, --vellum
- .bg = .{ 0x0a, 0x10, 0x30 },
- .fg = .{ 0xee, 0xe6, 0xd2 },
+ .page = .{ 0x0a, 0x10, 0x30 },
+ .text = .{ 0xee, 0xe6, 0xd2 },
// A gold highlight in lapis ink, as the directory's current entry.
- .sel_bg = .{ 0xe8, 0xc4, 0x6a },
- .sel_fg = .{ 0x0f, 0x1a, 0x4a },
+ .selection = .{ 0xe8, 0xc4, 0x6a },
+ .selection_text = .{ 0x0f, 0x1a, 0x4a },
// --lapis, --vellum-dim
- .tag_bg = .{ 0x0f, 0x1a, 0x4a },
- .tag_fg = .{ 0x9a, 0xa6, 0xd9 },
- .tag_name_fg = .{ 0xe8, 0xc4, 0x6a },
- .tag_active_name_fg = .{ 0xf2, 0xd2, 0x80 },
+ .tag = .{ 0x0f, 0x1a, 0x4a },
+ .tag_text = .{ 0x9a, 0xa6, 0xd9 },
+ .tag_name = .{ 0xe8, 0xc4, 0x6a },
// The plaques' hover lapis, taken a step further: 1.5:1 off the tag.
- .tag_active_bg = .{ 0x25, 0x39, 0x7d },
- .tag_active_fg = .{ 0xee, 0xe6, 0xd2 },
- .box = .{ 0xe8, 0xc4, 0x6a },
- .box_dim = .{ 0x3a, 0x4a, 0x8a },
- .box_border = .{ 0x9a, 0xa6, 0xd9 },
- .box_dirty = .{ 0xff, 0x6a, 0x4a },
- .column_box = .{ 0xff, 0x6a, 0x4a },
- .column_box_dim = .{ 0x8a, 0x3a, 0x3a },
+ .tag_focus = .{ 0x25, 0x39, 0x7d },
+ .tag_focus_text = .{ 0xee, 0xe6, 0xd2 },
+ .accent = .{ 0xe8, 0xc4, 0x6a },
+ .grip_ring = .{ 0x9a, 0xa6, 0xd9 },
+ .dirty = .{ 0xff, 0x6a, 0x4a },
+ .column_grip = .{ 0xff, 0x6a, 0x4a },
// Rubrics: vermilion keywords, gilded strings, the code window's green
// for numbers, vellum-dim comments.
- .kw = .{ 0xff, 0x6a, 0x4a },
- .str = .{ 0xe8, 0xc4, 0x6a },
- .num = .{ 0xe7, 0xff, 0xe0 },
+ .keyword = .{ 0xff, 0x6a, 0x4a },
+ .string = .{ 0xe8, 0xc4, 0x6a },
+ .number = .{ 0xe7, 0xff, 0xe0 },
.comment = .{ 0x9a, 0xa6, 0xd9 },
- .lineno = .{ 0x5a, 0x6a, 0xa8 },
- .lineno_active = .{ 0x6a, 0x7a, 0xb8 },
+ .line_number = .{ 0x5a, 0x6a, 0xa8 },
+ .line_number_current = .{ 0x6a, 0x7a, 0xb8 },
// --lapis-ink under a gold thumb (the page's scrollbar-color).
- .scroll_track = .{ 0x05, 0x0a, 0x24 },
- .scroll_thumb = .{ 0xe8, 0xc4, 0x6a },
+ .rail = .{ 0x05, 0x0a, 0x24 },
+ .rail_thumb = .{ 0xe8, 0xc4, 0x6a },
// Gold rules, a vermilion hairline between a tag and its text.
- .border = .{ 0xe8, 0xc4, 0x6a },
+ .rule = .{ 0xe8, 0xc4, 0x6a },
// An empty column is the page, not a slab of gold leaf.
- .empty_col = .{ 0x0a, 0x10, 0x30 },
+ .empty_column = .{ 0x0a, 0x10, 0x30 },
.tag_rule = .{ 0xd4, 0x41, 0x2f },
- .search_bg = .{ 0x6a, 0x2a, 0x1c },
- .search_fg = .{ 0xff, 0xd0, 0xb0 },
- .diagnostic_error = .{ 0xff, 0x6a, 0x4a },
- .diagnostic_warning = .{ 0xe8, 0xc4, 0x6a },
- .diagnostic_info = .{ 0x9a, 0xc6, 0xff },
- .diagnostic_hint = .{ 0xa8, 0xe0, 0xc0 },
- .palette = .{
+ .hit = .{ 0x6a, 0x2a, 0x1c },
+ .@"error" = .{ 0xff, 0x6a, 0x4a },
+ .warning = .{ 0xe8, 0xc4, 0x6a },
+ .info = .{ 0x9a, 0xc6, 0xff },
+ .hint = .{ 0xa8, 0xe0, 0xc0 },
+ .ansi = .{
.{ 0x0a, 0x10, 0x30 },
.{ 0xff, 0x6a, 0x4a },
.{ 0xa8, 0xe0, 0xc0 },
diff --git a/core/themes/light.zig b/core/themes/light.zig
new file mode 100644
index 00000000..681c000a
--- /dev/null
+++ b/core/themes/light.zig
@@ -0,0 +1,30 @@
+//! pardes light: dark's daylight sibling (DESIGN.md part D). White paper,
+//! the comments the darkest ink as dark's are the brightest, violet keywords
+//! and grip, a lilac-grey tag, a pale violet selection. For dark's users at a
+//! sunny desk, or a phone outdoors.
+pub const theme = .{
+ .name = "light",
+ .page = .{ 0xfb, 0xfb, 0xfd },
+ .text = .{ 0x34, 0x32, 0x3f },
+ .tag = .{ 0xe9, 0xe7, 0xf3 },
+ .tag_text = .{ 0x4b, 0x48, 0x62 },
+ .accent = .{ 0x6a, 0x3f, 0xd8 },
+ .selection = .{ 0xdd, 0xd3, 0xfb },
+ .selection_text = .{ 0x1c, 0x1a, 0x24 },
+ .keyword = .{ 0x8b, 0x2a, 0xb8 },
+ .string = .{ 0x2f, 0x6e, 0x1f },
+ .number = .{ 0x8a, 0x57, 0x00 },
+ .comment = .{ 0x0d, 0x0c, 0x12 },
+ .line_number = .{ 0xa3, 0xa1, 0xb0 },
+ .line_number_current = .{ 0x6e, 0x6b, 0x80 },
+ .@"error" = .{ 0xc0, 0x23, 0x3a },
+ .warning = .{ 0x9a, 0x5a, 0x00 },
+ .info = .{ 0x24, 0x57, 0xc5 },
+ .hint = .{ 0x0f, 0x76, 0x6e },
+ .ansi = .{
+ .{ 0xe9, 0xe7, 0xf3 }, .{ 0xc0, 0x23, 0x3a }, .{ 0x2f, 0x6e, 0x1f }, .{ 0x8a, 0x57, 0x00 },
+ .{ 0x24, 0x57, 0xc5 }, .{ 0x8b, 0x2a, 0xb8 }, .{ 0x0f, 0x76, 0x6e }, .{ 0x55, 0x53, 0x6a },
+ .{ 0x73, 0x71, 0x84 }, .{ 0xd2, 0x36, 0x4d }, .{ 0x35, 0x82, 0x21 }, .{ 0xa0, 0x67, 0x00 },
+ .{ 0x39, 0x6c, 0xde }, .{ 0xa4, 0x3f, 0xd4 }, .{ 0x04, 0x81, 0x77 }, .{ 0x0d, 0x0c, 0x12 },
+ },
+};
diff --git a/core/themes/mono.zig b/core/themes/mono.zig
new file mode 100644
index 00000000..f0dd109a
--- /dev/null
+++ b/core/themes/mono.zig
@@ -0,0 +1,31 @@
+//! pardes mono: acme at night (DESIGN.md part D). Syntax by lightness
+//! alone: keywords the brightest, strings a warm off-white, numbers the
+//! text's, comments a step down (5.6:1). Hue only where pardes says a state:
+//! the selection, hits, severities, added and deleted. For acme and Plan 9
+//! users, anyone who finds syntax colour noise, and screen sharing.
+pub const theme = .{
+ .name = "mono",
+ .page = .{ 0x11, 0x11, 0x13 },
+ .text = .{ 0xbf, 0xc0, 0xc6 },
+ .tag = .{ 0x1e, 0x1f, 0x24 },
+ .tag_text = .{ 0xa2, 0xa4, 0xad },
+ .accent = .{ 0xe6, 0xe7, 0xec },
+ .selection = .{ 0x3b, 0x3d, 0x47 },
+ .selection_text = .{ 0xf2, 0xf2, 0xf5 },
+ .keyword = .{ 0xf2, 0xf2, 0xf5 },
+ .string = .{ 0xd4, 0xd0, 0xc4 },
+ .number = .{ 0xbf, 0xc0, 0xc6 },
+ .comment = .{ 0x8a, 0x8b, 0x94 },
+ .line_number = .{ 0x55, 0x56, 0x5e },
+ .line_number_current = .{ 0x80, 0x81, 0x8b },
+ .@"error" = .{ 0xff, 0x7b, 0x72 },
+ .warning = .{ 0xe3, 0xb3, 0x41 },
+ .info = .{ 0x79, 0xc0, 0xff },
+ .hint = .{ 0xa5, 0xd6, 0xa7 },
+ .ansi = .{
+ .{ 0x1e, 0x1f, 0x24 }, .{ 0xff, 0x7b, 0x72 }, .{ 0x7e, 0xe7, 0x87 }, .{ 0xe3, 0xb3, 0x41 },
+ .{ 0x79, 0xc0, 0xff }, .{ 0xd2, 0xa8, 0xff }, .{ 0x76, 0xe3, 0xea }, .{ 0xbf, 0xc0, 0xc6 },
+ .{ 0x7b, 0x7d, 0x86 }, .{ 0xff, 0xa1, 0x98 }, .{ 0xa5, 0xf0, 0xb0 }, .{ 0xf2, 0xcc, 0x60 },
+ .{ 0xa5, 0xd6, 0xff }, .{ 0xe2, 0xc5, 0xff }, .{ 0xb3, 0xf0, 0xff }, .{ 0xf2, 0xf2, 0xf5 },
+ },
+};
diff --git a/core/themes/monokai.zig b/core/themes/monokai.zig
index 13e72336..db43b764 100644
--- a/core/themes/monokai.zig
+++ b/core/themes/monokai.zig
@@ -7,63 +7,64 @@
//! Adjusted to meet pardes's floors (chrome only; text, syntax and ANSI are untouched):
//! - focused tag ground #49483e -> #59584f: 1.19:1 off the unfocused #3e3d32, pardes needs 1.5:1 on a dark page
//! - rules between panes #3b3a32 -> #4a4941: 1.30:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #f92672 -> #ff809c: 1.89:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - search hit #ffe792 -> #5f3c0c: 12.10:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #f92672 -> #fe457d: 3.93:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #75715e -> #928e7a: 3.03:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "monokai",
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:13 background
- .bg = .{ 0x27, 0x28, 0x22 },
+ .page = .{ 0x27, 0x28, 0x22 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground
- .fg = .{ 0xf8, 0xf8, 0xf2 },
+ .text = .{ 0xf8, 0xf8, 0xf2 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:23 selection
- .sel_bg = .{ 0x49, 0x48, 0x3e },
+ .selection = .{ 0x49, 0x48, 0x3e },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xf8, 0xf8, 0xf2 },
+ .selection_text = .{ 0xf8, 0xf8, 0xf2 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:21 lineHighlight — derived: no UI colours in a tmTheme; unfocused tag = lineHighlight
- .tag_bg = .{ 0x3e, 0x3d, 0x32 },
+ .tag = .{ 0x3e, 0x3d, 0x32 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: foreground
- .tag_fg = .{ 0xf8, 0xf8, 0xf2 },
+ .tag_text = .{ 0xf8, 0xf8, 0xf2 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:23 selection — derived: focused tag = selection #49483e, adjusted
- .tag_active_bg = .{ 0x59, 0x58, 0x4f },
+ .tag_focus = .{ 0x59, 0x58, 0x4f },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: foreground
- .tag_active_fg = .{ 0xf8, 0xf8, 0xf2 },
+ .tag_focus_text = .{ 0xf8, 0xf8, 0xf2 },
// the focused grip: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: Keyword pink
- .box = .{ 0xf9, 0x26, 0x72 },
- // derived: the grip at rest, the accent #f92672 faded toward the unfocused tag #3e3d32 as far as 1.6:1 off it (0.54 of the way)
- .box_dim = .{ 0xa3, 0x31, 0x55 },
+ .accent = .{ 0xf9, 0x26, 0x72 },
// an unsaved grip: the original's modified colour, ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:66 "String" foreground — derived: diff.changed #E6DB74
- .box_dirty = .{ 0xe6, 0xdb, 0x74 },
+ .dirty = .{ 0xe6, 0xdb, 0x74 },
// derived: the column grip, the original's type colour, ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground
- .column_box = .{ 0x66, 0xd9, 0xef },
+ .column_grip = .{ 0x66, 0xd9, 0xef },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground
- .kw = .{ 0xf9, 0x26, 0x72 },
+ .keyword = .{ 0xf9, 0x26, 0x72 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:66 "String" foreground
- .str = .{ 0xe6, 0xdb, 0x74 },
+ .string = .{ 0xe6, 0xdb, 0x74 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:77 "Number" foreground
- .num = .{ 0xae, 0x81, 0xff },
+ .number = .{ 0xae, 0x81, 0xff },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground
.comment = .{ 0x75, 0x71, 0x5e },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground — derived: the tmTheme has no gutter colour; Comment
- .lineno = .{ 0x75, 0x71, 0x5e },
+ .line_number = .{ 0x75, 0x71, 0x5e },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:17 foreground — derived: foreground
- .lineno_active = .{ 0xf8, 0xf8, 0xf2 },
+ .line_number_current = .{ 0xf8, 0xf8, 0xf2 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:13 background — derived: page
- .scroll_track = .{ 0x27, 0x28, 0x22 },
+ .rail = .{ 0x27, 0x28, 0x22 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:23 selection — derived: selection
- .scroll_thumb = .{ 0x49, 0x48, 0x3e },
+ .rail_thumb = .{ 0x49, 0x48, 0x3e },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:19 invisibles — derived: invisibles #3b3a32, adjusted
- .border = .{ 0x4a, 0x49, 0x41 },
+ .rule = .{ 0x4a, 0x49, 0x41 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:25 findHighlight
- .search_bg = .{ 0xff, 0xe7, 0x92 },
- // ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:27 findHighlightForeground
- .search_fg = .{ 0x00, 0x00, 0x00 },
+ .hit = .{ 0xff, 0xe7, 0x92 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: Invalid is drawn on #F92672, the Keyword colour
- .diagnostic_error = .{ 0xf9, 0x26, 0x72 },
+ .@"error" = .{ 0xf9, 0x26, 0x72 },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:200 "Function argument" foreground — derived: Function argument orange
- .diagnostic_warning = .{ 0xfd, 0x97, 0x1f },
+ .warning = .{ 0xfd, 0x97, 0x1f },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:148 "Storage type" foreground — derived: Storage type cyan
- .diagnostic_info = .{ 0x66, 0xd9, 0xef },
+ .info = .{ 0x66, 0xd9, 0xef },
// ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:55 "Comment" foreground — derived: Comment
- .diagnostic_hint = .{ 0x75, 0x71, 0x5e },
- .palette = .{
+ .hint = .{ 0x75, 0x71, 0x5e },
+ .ansi = .{
.{ 0x27, 0x28, 0x22 }, // 0: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:13 background — derived: ANSI 0: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat)
.{ 0xf9, 0x26, 0x72 }, // 1: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:122 "Keyword" foreground — derived: ANSI 1: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat)
.{ 0xa6, 0xe2, 0x2e }, // 2: ~/05-genizah/sublime-text-2-color-schemes/Monokai.tmTheme:187 "Function name" foreground — derived: ANSI 2: a tmTheme has no terminal colours; its own palette in ANSI order (black=page, red=Keyword, green=Function name, yellow=String, blue and cyan=Storage type, magenta=Number, white=foreground, bright black=Comment, brights repeat)
diff --git a/core/themes/monokai_pro.zig b/core/themes/monokai_pro.zig
index 46a5d58b..34510e01 100644
--- a/core/themes/monokai_pro.zig
+++ b/core/themes/monokai_pro.zig
@@ -8,63 +8,63 @@
//! - focused tag ground #2d2a2e -> #4f4637: 1.00:1 off the unfocused #2d2a2e, pardes needs 1.5:1 on a dark page
//! - rules between panes #221f22 -> #4e4b4d: 1.15:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #434044 -> #4a484b: 1.39:1 on its track #2d2a2e
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #2d2a2e -> #343135: 1.00:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #4f4637 -> #4f4c50: 1.38:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest)
+//! - selection #434044 -> #464048: 1.39:1 off the page, now 1.41:1 (R7)
pub const theme = .{
.name = "monokai_pro",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editor.background"
- .bg = .{ 0x2d, 0x2a, 0x2e },
+ .page = .{ 0x2d, 0x2a, 0x2e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editor.foreground"
- .fg = .{ 0xfc, 0xfc, 0xfa },
+ .text = .{ 0xfc, 0xfc, 0xfa },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editor.selectionBackground" #c1c0c026 over #2d2a2e
- .sel_bg = .{ 0x43, 0x40, 0x44 },
+ .selection = .{ 0x43, 0x40, 0x44 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xfc, 0xfc, 0xfa },
+ .selection_text = .{ 0xfc, 0xfc, 0xfa },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0x2d, 0x2a, 0x2e },
+ .tag = .{ 0x2d, 0x2a, 0x2e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."tab.inactiveForeground"
- .tag_fg = .{ 0x93, 0x92, 0x93 },
+ .tag_text = .{ 0x93, 0x92, 0x93 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."tab.activeBackground" #2d2a2e, adjusted
- .tag_active_bg = .{ 0x4f, 0x46, 0x37 },
+ .tag_focus = .{ 0x4f, 0x46, 0x37 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."tab.activeForeground"
- .tag_active_fg = .{ 0xff, 0xd8, 0x66 },
+ .tag_focus_text = .{ 0xff, 0xd8, 0x66 },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."tab.activeBorder"
- .box = .{ 0xff, 0xd8, 0x66 },
- // derived: the grip at rest, the accent #ffd866 faded toward the unfocused tag #2d2a2e as far as 1.6:1 off it (0.20 of the way)
- .box_dim = .{ 0x57, 0x4d, 0x39 },
+ .accent = .{ 0xff, 0xd8, 0x66 },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xfc, 0x98, 0x67 },
+ .dirty = .{ 0xfc, 0x98, 0x67 },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x78, 0xdc, 0xe8 },
+ .column_grip = .{ 0x78, 0xdc, 0xe8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 tokenColors[57] "keyword"
- .kw = .{ 0xff, 0x61, 0x88 },
+ .keyword = .{ 0xff, 0x61, 0x88 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 tokenColors[132] "string"
- .str = .{ 0xff, 0xd8, 0x66 },
+ .string = .{ 0xff, 0xd8, 0x66 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0xab, 0x9d, 0xf2 },
+ .number = .{ 0xab, 0x9d, 0xf2 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 tokenColors[0] "comment"
.comment = .{ 0x72, 0x70, 0x72 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0x5b, 0x59, 0x5c },
+ .line_number = .{ 0x5b, 0x59, 0x5c },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0xc1, 0xc0, 0xc0 },
+ .line_number_current = .{ 0xc1, 0xc0, 0xc0 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0x2d, 0x2a, 0x2e },
+ .rail = .{ 0x2d, 0x2a, 0x2e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."scrollbarSlider.background" #c1c0c026 over #2d2a2e #434044, adjusted
- .scroll_thumb = .{ 0x4a, 0x48, 0x4b },
+ .rail_thumb = .{ 0x4a, 0x48, 0x4b },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorGroup.border" #221f22, adjusted
- .border = .{ 0x4e, 0x4b, 0x4d },
+ .rule = .{ 0x4e, 0x4b, 0x4d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editor.findMatchBackground" #fcfcfa26 over #2d2a2e
- .search_bg = .{ 0x4c, 0x49, 0x4c },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xfc, 0xfc, 0xfa },
+ .hit = .{ 0x4c, 0x49, 0x4c },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xff, 0x61, 0x88 },
+ .@"error" = .{ 0xff, 0x61, 0x88 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xfc, 0x98, 0x67 },
+ .warning = .{ 0xfc, 0x98, 0x67 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x78, 0xdc, 0xe8 },
+ .info = .{ 0x78, 0xdc, 0xe8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0xab, 0x9d, 0xf2 },
- .palette = .{
+ .hint = .{ 0xab, 0x9d, 0xf2 },
+ .ansi = .{
.{ 0x40, 0x3e, 0x41 }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."terminal.ansiBlack"
.{ 0xff, 0x61, 0x88 }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."terminal.ansiRed"
.{ 0xa9, 0xdc, 0x76 }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro.json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_classic.zig b/core/themes/monokai_pro_classic.zig
index 69f26327..ed1f8092 100644
--- a/core/themes/monokai_pro_classic.zig
+++ b/core/themes/monokai_pro_classic.zig
@@ -8,63 +8,63 @@
//! - focused tag ground #272822 -> #46452f: 1.00:1 off the unfocused #272822, pardes needs 1.5:1 on a dark page
//! - rules between panes #1d1e19 -> #4a4b44: 1.13:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #3e3f38 -> #46473f: 1.40:1 on its track #272822
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #272822 -> #2e2f29: 1.00:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #46452f -> #494a43: 1.38:1 off the tag, now 1.51:1 (R4, H: a focus step off the tag, and the loudest)
+//! - error #f92672 -> #fe457d: 3.93:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "monokai_pro_classic",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editor.background"
- .bg = .{ 0x27, 0x28, 0x22 },
+ .page = .{ 0x27, 0x28, 0x22 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editor.foreground"
- .fg = .{ 0xfd, 0xff, 0xf1 },
+ .text = .{ 0xfd, 0xff, 0xf1 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editor.selectionBackground" #c0c1b526 over #272822
- .sel_bg = .{ 0x3e, 0x3f, 0x38 },
+ .selection = .{ 0x3e, 0x3f, 0x38 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xfd, 0xff, 0xf1 },
+ .selection_text = .{ 0xfd, 0xff, 0xf1 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0x27, 0x28, 0x22 },
+ .tag = .{ 0x27, 0x28, 0x22 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."tab.inactiveForeground"
- .tag_fg = .{ 0x91, 0x92, 0x88 },
+ .tag_text = .{ 0x91, 0x92, 0x88 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."tab.activeBackground" #272822, adjusted
- .tag_active_bg = .{ 0x46, 0x45, 0x2f },
+ .tag_focus = .{ 0x46, 0x45, 0x2f },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."tab.activeForeground"
- .tag_active_fg = .{ 0xe6, 0xdb, 0x74 },
+ .tag_focus_text = .{ 0xe6, 0xdb, 0x74 },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."tab.activeBorder"
- .box = .{ 0xe6, 0xdb, 0x74 },
- // derived: the grip at rest, the accent #e6db74 faded toward the unfocused tag #272822 as far as 1.6:1 off it (0.20 of the way)
- .box_dim = .{ 0x4d, 0x4c, 0x32 },
+ .accent = .{ 0xe6, 0xdb, 0x74 },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xfd, 0x97, 0x1f },
+ .dirty = .{ 0xfd, 0x97, 0x1f },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x66, 0xd9, 0xef },
+ .column_grip = .{ 0x66, 0xd9, 0xef },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 tokenColors[57] "keyword"
- .kw = .{ 0xf9, 0x26, 0x72 },
+ .keyword = .{ 0xf9, 0x26, 0x72 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 tokenColors[132] "string"
- .str = .{ 0xe6, 0xdb, 0x74 },
+ .string = .{ 0xe6, 0xdb, 0x74 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0xae, 0x81, 0xff },
+ .number = .{ 0xae, 0x81, 0xff },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 tokenColors[0] "comment"
.comment = .{ 0x6e, 0x70, 0x66 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0x57, 0x58, 0x4f },
+ .line_number = .{ 0x57, 0x58, 0x4f },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0xc0, 0xc1, 0xb5 },
+ .line_number_current = .{ 0xc0, 0xc1, 0xb5 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0x27, 0x28, 0x22 },
+ .rail = .{ 0x27, 0x28, 0x22 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."scrollbarSlider.background" #c0c1b526 over #272822 #3e3f38, adjusted
- .scroll_thumb = .{ 0x46, 0x47, 0x3f },
+ .rail_thumb = .{ 0x46, 0x47, 0x3f },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorGroup.border" #1d1e19, adjusted
- .border = .{ 0x4a, 0x4b, 0x44 },
+ .rule = .{ 0x4a, 0x4b, 0x44 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editor.findMatchBackground" #fdfff126 over #272822
- .search_bg = .{ 0x47, 0x48, 0x41 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xfd, 0xff, 0xf1 },
+ .hit = .{ 0x47, 0x48, 0x41 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xf9, 0x26, 0x72 },
+ .@"error" = .{ 0xf9, 0x26, 0x72 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xfd, 0x97, 0x1f },
+ .warning = .{ 0xfd, 0x97, 0x1f },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x66, 0xd9, 0xef },
+ .info = .{ 0x66, 0xd9, 0xef },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0xae, 0x81, 0xff },
- .palette = .{
+ .hint = .{ 0xae, 0x81, 0xff },
+ .ansi = .{
.{ 0x3b, 0x3c, 0x35 }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."terminal.ansiBlack"
.{ 0xf9, 0x26, 0x72 }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."terminal.ansiRed"
.{ 0xa6, 0xe2, 0x2e }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Classic.json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_light.zig b/core/themes/monokai_pro_light.zig
index ef638731..2e75d5c2 100644
--- a/core/themes/monokai_pro_light.zig
+++ b/core/themes/monokai_pro_light.zig
@@ -10,63 +10,69 @@
//! - focused tag text #e14775 -> #a73557: 2.80:1 on #f5d1d9, tag text needs 4.5:1
//! - rules between panes #ede7e5 -> #c6c0c0: 1.12:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #e5e0de -> #cec9c8: 1.20:1 on its track #faf4f2
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #faf4f2 -> #efe9e7: 1.00:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #f5d1d9 -> #d7d1cf: 1.16:1 off the tag, now 1.26:1 (R4, H: a focus step off the tag, and the loudest)
+//! - focused grip #e14775 -> #d43a6a: 2.60:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - unsaved grip #e16032 -> #cc4c1b: 2.95:1 on the tag, now 3.79:1 (R6: 3:1 on both tags)
+//! - selection #e5e0de -> #e5dad6: 1.20:1 off the page, now 1.26:1 (R7)
+//! - search hit #dbd5d4 -> #febaa3: 1.33:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #e14775 -> #cd3365: 3.60:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #e16032 -> #c54611: 3.26:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - info #1c8ca8 -> #077b95: 3.59:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "monokai_pro_light",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editor.background"
- .bg = .{ 0xfa, 0xf4, 0xf2 },
+ .page = .{ 0xfa, 0xf4, 0xf2 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editor.foreground"
- .fg = .{ 0x29, 0x24, 0x2a },
+ .text = .{ 0x29, 0x24, 0x2a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editor.selectionBackground" #706b6e26 over #faf4f2
- .sel_bg = .{ 0xe5, 0xe0, 0xde },
+ .selection = .{ 0xe5, 0xe0, 0xde },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x29, 0x24, 0x2a },
+ .selection_text = .{ 0x29, 0x24, 0x2a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0xfa, 0xf4, 0xf2 },
+ .tag = .{ 0xfa, 0xf4, 0xf2 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."tab.inactiveForeground" #918c8e, adjusted
- .tag_fg = .{ 0x71, 0x6d, 0x6f },
+ .tag_text = .{ 0x71, 0x6d, 0x6f },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."tab.activeBackground" #faf4f2, adjusted
- .tag_active_bg = .{ 0xf5, 0xd1, 0xd9 },
+ .tag_focus = .{ 0xf5, 0xd1, 0xd9 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."tab.activeForeground" #e14775, adjusted
- .tag_active_fg = .{ 0xa7, 0x35, 0x57 },
+ .tag_focus_text = .{ 0xa7, 0x35, 0x57 },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."tab.activeBorder"
- .box = .{ 0xe1, 0x47, 0x75 },
- // derived: the grip at rest, the accent #e14775 faded toward the unfocused tag #faf4f2 as far as 1.6:1 off it (0.38 of the way)
- .box_dim = .{ 0xf1, 0xb2, 0xc3 },
+ .accent = .{ 0xe1, 0x47, 0x75 },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xe1, 0x60, 0x32 },
+ .dirty = .{ 0xe1, 0x60, 0x32 },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x1c, 0x8c, 0xa8 },
+ .column_grip = .{ 0x1c, 0x8c, 0xa8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 tokenColors[57] "keyword"
- .kw = .{ 0xe1, 0x47, 0x75 },
+ .keyword = .{ 0xe1, 0x47, 0x75 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 tokenColors[132] "string"
- .str = .{ 0xcc, 0x7a, 0x0a },
+ .string = .{ 0xcc, 0x7a, 0x0a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0x70, 0x58, 0xbe },
+ .number = .{ 0x70, 0x58, 0xbe },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 tokenColors[0] "comment"
.comment = .{ 0xa5, 0x9f, 0xa0 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0xbf, 0xb9, 0xba },
+ .line_number = .{ 0xbf, 0xb9, 0xba },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0x70, 0x6b, 0x6e },
+ .line_number_current = .{ 0x70, 0x6b, 0x6e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0xfa, 0xf4, 0xf2 },
+ .rail = .{ 0xfa, 0xf4, 0xf2 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."scrollbarSlider.background" #706b6e26 over #faf4f2 #e5e0de, adjusted
- .scroll_thumb = .{ 0xce, 0xc9, 0xc8 },
+ .rail_thumb = .{ 0xce, 0xc9, 0xc8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorGroup.border" #ede7e5, adjusted
- .border = .{ 0xc6, 0xc0, 0xc0 },
+ .rule = .{ 0xc6, 0xc0, 0xc0 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editor.findMatchBackground" #29242a26 over #faf4f2
- .search_bg = .{ 0xdb, 0xd5, 0xd4 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0x29, 0x24, 0x2a },
+ .hit = .{ 0xdb, 0xd5, 0xd4 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xe1, 0x47, 0x75 },
+ .@"error" = .{ 0xe1, 0x47, 0x75 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xe1, 0x60, 0x32 },
+ .warning = .{ 0xe1, 0x60, 0x32 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x1c, 0x8c, 0xa8 },
+ .info = .{ 0x1c, 0x8c, 0xa8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0x70, 0x58, 0xbe },
- .palette = .{
+ .hint = .{ 0x70, 0x58, 0xbe },
+ .ansi = .{
.{ 0xd3, 0xcd, 0xcc }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."terminal.ansiBlack"
.{ 0xe1, 0x47, 0x75 }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."terminal.ansiRed"
.{ 0x26, 0x9d, 0x69 }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light.json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_light_sun.zig b/core/themes/monokai_pro_light_sun.zig
index 2d023deb..f74ee446 100644
--- a/core/themes/monokai_pro_light_sun.zig
+++ b/core/themes/monokai_pro_light_sun.zig
@@ -10,63 +10,69 @@
//! - focused tag text #ce4770 -> #9d3655: 3.01:1 on #f0cdcf, tag text needs 4.5:1
//! - rules between panes #eee5de -> #c7bebb: 1.09:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #e4dbd5 -> #cac1be: 1.20:1 on its track #f8efe7
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #f8efe7 -> #ede4dc: 1.00:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #f0cdcf -> #d5ccc4: 1.17:1 off the tag, now 1.26:1 (R4, H: a focus step off the tag, and the loudest)
+//! - focused grip #ce4770 -> #c7416b: 2.79:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - unsaved grip #d4572b -> #c64a1b: 3.22:1 on the tag, now 3.81:1 (R6: 3:1 on both tags)
+//! - selection #e4dbd5 -> #e7d5c7: 1.20:1 off the page, now 1.25:1 (R7)
+//! - search hit #dad1cb -> #feb599: 1.32:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #ce4770 -> #c13b65: 3.89:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #d4572b -> #c04414: 3.56:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - info #2473b6 -> #2271b4: 4.40:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "monokai_pro_light_sun",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editor.background"
- .bg = .{ 0xf8, 0xef, 0xe7 },
+ .page = .{ 0xf8, 0xef, 0xe7 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editor.foreground"
- .fg = .{ 0x2c, 0x23, 0x2e },
+ .text = .{ 0x2c, 0x23, 0x2e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editor.selectionBackground" #72696d26 over #f8efe7
- .sel_bg = .{ 0xe4, 0xdb, 0xd5 },
+ .selection = .{ 0xe4, 0xdb, 0xd5 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x2c, 0x23, 0x2e },
+ .selection_text = .{ 0x2c, 0x23, 0x2e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0xf8, 0xef, 0xe7 },
+ .tag = .{ 0xf8, 0xef, 0xe7 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."tab.inactiveForeground" #92898a, adjusted
- .tag_fg = .{ 0x72, 0x6b, 0x6c },
+ .tag_text = .{ 0x72, 0x6b, 0x6c },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."tab.activeBackground" #f8efe7, adjusted
- .tag_active_bg = .{ 0xf0, 0xcd, 0xcf },
+ .tag_focus = .{ 0xf0, 0xcd, 0xcf },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."tab.activeForeground" #ce4770, adjusted
- .tag_active_fg = .{ 0x9d, 0x36, 0x55 },
+ .tag_focus_text = .{ 0x9d, 0x36, 0x55 },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."tab.activeBorder"
- .box = .{ 0xce, 0x47, 0x70 },
- // derived: the grip at rest, the accent #ce4770 faded toward the unfocused tag #f8efe7 as far as 1.6:1 off it (0.38 of the way)
- .box_dim = .{ 0xe8, 0xaf, 0xba },
+ .accent = .{ 0xce, 0x47, 0x70 },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xd4, 0x57, 0x2b },
+ .dirty = .{ 0xd4, 0x57, 0x2b },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x24, 0x73, 0xb6 },
+ .column_grip = .{ 0x24, 0x73, 0xb6 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 tokenColors[57] "keyword"
- .kw = .{ 0xce, 0x47, 0x70 },
+ .keyword = .{ 0xce, 0x47, 0x70 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 tokenColors[132] "string"
- .str = .{ 0xb1, 0x68, 0x03 },
+ .string = .{ 0xb1, 0x68, 0x03 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0x68, 0x51, 0xa2 },
+ .number = .{ 0x68, 0x51, 0xa2 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 tokenColors[0] "comment"
.comment = .{ 0xa5, 0x9c, 0x9c },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0xbe, 0xb5, 0xb3 },
+ .line_number = .{ 0xbe, 0xb5, 0xb3 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0x72, 0x69, 0x6d },
+ .line_number_current = .{ 0x72, 0x69, 0x6d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0xf8, 0xef, 0xe7 },
+ .rail = .{ 0xf8, 0xef, 0xe7 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."scrollbarSlider.background" #72696d26 over #f8efe7 #e4dbd5, adjusted
- .scroll_thumb = .{ 0xca, 0xc1, 0xbe },
+ .rail_thumb = .{ 0xca, 0xc1, 0xbe },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorGroup.border" #eee5de, adjusted
- .border = .{ 0xc7, 0xbe, 0xbb },
+ .rule = .{ 0xc7, 0xbe, 0xbb },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editor.findMatchBackground" #2c232e26 over #f8efe7
- .search_bg = .{ 0xda, 0xd1, 0xcb },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0x2c, 0x23, 0x2e },
+ .hit = .{ 0xda, 0xd1, 0xcb },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xce, 0x47, 0x70 },
+ .@"error" = .{ 0xce, 0x47, 0x70 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xd4, 0x57, 0x2b },
+ .warning = .{ 0xd4, 0x57, 0x2b },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x24, 0x73, 0xb6 },
+ .info = .{ 0x24, 0x73, 0xb6 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0x68, 0x51, 0xa2 },
- .palette = .{
+ .hint = .{ 0x68, 0x51, 0xa2 },
+ .ansi = .{
.{ 0xd2, 0xc9, 0xc4 }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."terminal.ansiBlack"
.{ 0xce, 0x47, 0x70 }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."terminal.ansiRed"
.{ 0x21, 0x88, 0x71 }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro Light (Filter Sun).json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_machine.zig b/core/themes/monokai_pro_machine.zig
index 5e4c6885..60f3f26f 100644
--- a/core/themes/monokai_pro_machine.zig
+++ b/core/themes/monokai_pro_machine.zig
@@ -9,63 +9,63 @@
//! - unfocused tag text #8b9798 -> #8d999a: 4.42:1 on #273136, tag text needs 4.5:1 to be read and run
//! - rules between panes #1d2528 -> #485152: 1.17:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #3d474b -> #444e52: 1.39:1 on its track #273136
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #273136 -> #2e383d: 1.00:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #4a4f40 -> #485358: 1.42:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest)
+//! - selection #3d474b -> #334952: 1.39:1 off the page, now 1.40:1 (R7)
pub const theme = .{
.name = "monokai_pro_machine",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editor.background"
- .bg = .{ 0x27, 0x31, 0x36 },
+ .page = .{ 0x27, 0x31, 0x36 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editor.foreground"
- .fg = .{ 0xf2, 0xff, 0xfc },
+ .text = .{ 0xf2, 0xff, 0xfc },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editor.selectionBackground" #b8c4c326 over #273136
- .sel_bg = .{ 0x3d, 0x47, 0x4b },
+ .selection = .{ 0x3d, 0x47, 0x4b },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xf2, 0xff, 0xfc },
+ .selection_text = .{ 0xf2, 0xff, 0xfc },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0x27, 0x31, 0x36 },
+ .tag = .{ 0x27, 0x31, 0x36 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."tab.inactiveForeground" #8b9798, adjusted
- .tag_fg = .{ 0x8d, 0x99, 0x9a },
+ .tag_text = .{ 0x8d, 0x99, 0x9a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."tab.activeBackground" #273136, adjusted
- .tag_active_bg = .{ 0x4a, 0x4f, 0x40 },
+ .tag_focus = .{ 0x4a, 0x4f, 0x40 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."tab.activeForeground"
- .tag_active_fg = .{ 0xff, 0xed, 0x72 },
+ .tag_focus_text = .{ 0xff, 0xed, 0x72 },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."tab.activeBorder"
- .box = .{ 0xff, 0xed, 0x72 },
- // derived: the grip at rest, the accent #ffed72 faded toward the unfocused tag #273136 as far as 1.6:1 off it (0.18 of the way)
- .box_dim = .{ 0x4e, 0x53, 0x41 },
+ .accent = .{ 0xff, 0xed, 0x72 },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xff, 0xb2, 0x70 },
+ .dirty = .{ 0xff, 0xb2, 0x70 },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x7c, 0xd5, 0xf1 },
+ .column_grip = .{ 0x7c, 0xd5, 0xf1 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 tokenColors[57] "keyword"
- .kw = .{ 0xff, 0x6d, 0x7e },
+ .keyword = .{ 0xff, 0x6d, 0x7e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 tokenColors[132] "string"
- .str = .{ 0xff, 0xed, 0x72 },
+ .string = .{ 0xff, 0xed, 0x72 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0xba, 0xa0, 0xf8 },
+ .number = .{ 0xba, 0xa0, 0xf8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 tokenColors[0] "comment"
.comment = .{ 0x6b, 0x76, 0x78 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0x54, 0x5f, 0x62 },
+ .line_number = .{ 0x54, 0x5f, 0x62 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0xb8, 0xc4, 0xc3 },
+ .line_number_current = .{ 0xb8, 0xc4, 0xc3 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0x27, 0x31, 0x36 },
+ .rail = .{ 0x27, 0x31, 0x36 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."scrollbarSlider.background" #b8c4c326 over #273136 #3d474b, adjusted
- .scroll_thumb = .{ 0x44, 0x4e, 0x52 },
+ .rail_thumb = .{ 0x44, 0x4e, 0x52 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorGroup.border" #1d2528, adjusted
- .border = .{ 0x48, 0x51, 0x52 },
+ .rule = .{ 0x48, 0x51, 0x52 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editor.findMatchBackground" #f2fffc26 over #273136
- .search_bg = .{ 0x45, 0x50, 0x54 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xf2, 0xff, 0xfc },
+ .hit = .{ 0x45, 0x50, 0x54 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xff, 0x6d, 0x7e },
+ .@"error" = .{ 0xff, 0x6d, 0x7e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xff, 0xb2, 0x70 },
+ .warning = .{ 0xff, 0xb2, 0x70 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x7c, 0xd5, 0xf1 },
+ .info = .{ 0x7c, 0xd5, 0xf1 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0xba, 0xa0, 0xf8 },
- .palette = .{
+ .hint = .{ 0xba, 0xa0, 0xf8 },
+ .ansi = .{
.{ 0x3a, 0x44, 0x49 }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."terminal.ansiBlack"
.{ 0xff, 0x6d, 0x7e }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."terminal.ansiRed"
.{ 0xa2, 0xe5, 0x7b }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Machine).json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_octagon.zig b/core/themes/monokai_pro_octagon.zig
index 62bb8c15..5d9db83b 100644
--- a/core/themes/monokai_pro_octagon.zig
+++ b/core/themes/monokai_pro_octagon.zig
@@ -9,63 +9,63 @@
//! - unfocused tag text #888d94 -> #8d9298: 4.24:1 on #282a3a, tag text needs 4.5:1 to be read and run
//! - rules between panes #1e1f2b -> #4b4d57: 1.15:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #3d3f4e -> #444655: 1.36:1 on its track #282a3a
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #282a3a -> #2e3141: 1.00:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #4a4642 -> #494c5d: 1.38:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest)
+//! - selection #3d3f4e -> #3c4060: 1.36:1 off the page, now 1.41:1 (R7)
pub const theme = .{
.name = "monokai_pro_octagon",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editor.background"
- .bg = .{ 0x28, 0x2a, 0x3a },
+ .page = .{ 0x28, 0x2a, 0x3a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editor.foreground"
- .fg = .{ 0xea, 0xf2, 0xf1 },
+ .text = .{ 0xea, 0xf2, 0xf1 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editor.selectionBackground" #b2b9bd26 over #282a3a
- .sel_bg = .{ 0x3d, 0x3f, 0x4e },
+ .selection = .{ 0x3d, 0x3f, 0x4e },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xea, 0xf2, 0xf1 },
+ .selection_text = .{ 0xea, 0xf2, 0xf1 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0x28, 0x2a, 0x3a },
+ .tag = .{ 0x28, 0x2a, 0x3a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."tab.inactiveForeground" #888d94, adjusted
- .tag_fg = .{ 0x8d, 0x92, 0x98 },
+ .tag_text = .{ 0x8d, 0x92, 0x98 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."tab.activeBackground" #282a3a, adjusted
- .tag_active_bg = .{ 0x4a, 0x46, 0x42 },
+ .tag_focus = .{ 0x4a, 0x46, 0x42 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."tab.activeForeground"
- .tag_active_fg = .{ 0xff, 0xd7, 0x6d },
+ .tag_focus_text = .{ 0xff, 0xd7, 0x6d },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."tab.activeBorder"
- .box = .{ 0xff, 0xd7, 0x6d },
- // derived: the grip at rest, the accent #ffd76d faded toward the unfocused tag #282a3a as far as 1.6:1 off it (0.20 of the way)
- .box_dim = .{ 0x53, 0x4d, 0x44 },
+ .accent = .{ 0xff, 0xd7, 0x6d },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xff, 0x9b, 0x5e },
+ .dirty = .{ 0xff, 0x9b, 0x5e },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x9c, 0xd1, 0xbb },
+ .column_grip = .{ 0x9c, 0xd1, 0xbb },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 tokenColors[57] "keyword"
- .kw = .{ 0xff, 0x65, 0x7a },
+ .keyword = .{ 0xff, 0x65, 0x7a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 tokenColors[132] "string"
- .str = .{ 0xff, 0xd7, 0x6d },
+ .string = .{ 0xff, 0xd7, 0x6d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0xc3, 0x9a, 0xc9 },
+ .number = .{ 0xc3, 0x9a, 0xc9 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 tokenColors[0] "comment"
.comment = .{ 0x69, 0x6d, 0x77 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0x53, 0x57, 0x63 },
+ .line_number = .{ 0x53, 0x57, 0x63 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0xb2, 0xb9, 0xbd },
+ .line_number_current = .{ 0xb2, 0xb9, 0xbd },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0x28, 0x2a, 0x3a },
+ .rail = .{ 0x28, 0x2a, 0x3a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."scrollbarSlider.background" #b2b9bd26 over #282a3a #3d3f4e, adjusted
- .scroll_thumb = .{ 0x44, 0x46, 0x55 },
+ .rail_thumb = .{ 0x44, 0x46, 0x55 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorGroup.border" #1e1f2b, adjusted
- .border = .{ 0x4b, 0x4d, 0x57 },
+ .rule = .{ 0x4b, 0x4d, 0x57 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editor.findMatchBackground" #eaf2f126 over #282a3a
- .search_bg = .{ 0x45, 0x48, 0x55 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xea, 0xf2, 0xf1 },
+ .hit = .{ 0x45, 0x48, 0x55 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xff, 0x65, 0x7a },
+ .@"error" = .{ 0xff, 0x65, 0x7a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xff, 0x9b, 0x5e },
+ .warning = .{ 0xff, 0x9b, 0x5e },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x9c, 0xd1, 0xbb },
+ .info = .{ 0x9c, 0xd1, 0xbb },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0xc3, 0x9a, 0xc9 },
- .palette = .{
+ .hint = .{ 0xc3, 0x9a, 0xc9 },
+ .ansi = .{
.{ 0x3a, 0x3d, 0x4b }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."terminal.ansiBlack"
.{ 0xff, 0x65, 0x7a }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."terminal.ansiRed"
.{ 0xba, 0xd7, 0x61 }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Octagon).json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_ristretto.zig b/core/themes/monokai_pro_ristretto.zig
index 88b1788c..3eaa11b3 100644
--- a/core/themes/monokai_pro_ristretto.zig
+++ b/core/themes/monokai_pro_ristretto.zig
@@ -9,63 +9,63 @@
//! - unfocused tag text #948a8b -> #968c8d: 4.48:1 on #2c2525, tag text needs 4.5:1 to be read and run
//! - rules between panes #211c1c -> #4d4747: 1.12:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #433b3b -> #4b4242: 1.38:1 on its track #2c2525
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #2c2525 -> #342d2d: 1.00:1 off the page, now 1.12:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #514332 -> #504848: 1.41:1 off the tag, now 1.51:1 (R4, H: a focus step off the tag, and the loudest)
+//! - selection #433b3b -> #4a3b3b: 1.38:1 off the page, now 1.42:1 (R7)
pub const theme = .{
.name = "monokai_pro_ristretto",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editor.background"
- .bg = .{ 0x2c, 0x25, 0x25 },
+ .page = .{ 0x2c, 0x25, 0x25 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editor.foreground"
- .fg = .{ 0xff, 0xf1, 0xf3 },
+ .text = .{ 0xff, 0xf1, 0xf3 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editor.selectionBackground" #c3b7b826 over #2c2525
- .sel_bg = .{ 0x43, 0x3b, 0x3b },
+ .selection = .{ 0x43, 0x3b, 0x3b },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xff, 0xf1, 0xf3 },
+ .selection_text = .{ 0xff, 0xf1, 0xf3 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0x2c, 0x25, 0x25 },
+ .tag = .{ 0x2c, 0x25, 0x25 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."tab.inactiveForeground" #948a8b, adjusted
- .tag_fg = .{ 0x96, 0x8c, 0x8d },
+ .tag_text = .{ 0x96, 0x8c, 0x8d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."tab.activeBackground" #2c2525, adjusted
- .tag_active_bg = .{ 0x51, 0x43, 0x32 },
+ .tag_focus = .{ 0x51, 0x43, 0x32 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."tab.activeForeground"
- .tag_active_fg = .{ 0xf9, 0xcc, 0x6c },
+ .tag_focus_text = .{ 0xf9, 0xcc, 0x6c },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."tab.activeBorder"
- .box = .{ 0xf9, 0xcc, 0x6c },
- // derived: the grip at rest, the accent #f9cc6c faded toward the unfocused tag #2c2525 as far as 1.6:1 off it (0.20 of the way)
- .box_dim = .{ 0x55, 0x46, 0x33 },
+ .accent = .{ 0xf9, 0xcc, 0x6c },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xf3, 0x8d, 0x70 },
+ .dirty = .{ 0xf3, 0x8d, 0x70 },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x85, 0xda, 0xcc },
+ .column_grip = .{ 0x85, 0xda, 0xcc },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 tokenColors[57] "keyword"
- .kw = .{ 0xfd, 0x68, 0x83 },
+ .keyword = .{ 0xfd, 0x68, 0x83 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 tokenColors[132] "string"
- .str = .{ 0xf9, 0xcc, 0x6c },
+ .string = .{ 0xf9, 0xcc, 0x6c },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0xa8, 0xa9, 0xeb },
+ .number = .{ 0xa8, 0xa9, 0xeb },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 tokenColors[0] "comment"
.comment = .{ 0x72, 0x69, 0x6a },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0x5b, 0x53, 0x53 },
+ .line_number = .{ 0x5b, 0x53, 0x53 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0xc3, 0xb7, 0xb8 },
+ .line_number_current = .{ 0xc3, 0xb7, 0xb8 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0x2c, 0x25, 0x25 },
+ .rail = .{ 0x2c, 0x25, 0x25 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."scrollbarSlider.background" #c3b7b826 over #2c2525 #433b3b, adjusted
- .scroll_thumb = .{ 0x4b, 0x42, 0x42 },
+ .rail_thumb = .{ 0x4b, 0x42, 0x42 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorGroup.border" #211c1c, adjusted
- .border = .{ 0x4d, 0x47, 0x47 },
+ .rule = .{ 0x4d, 0x47, 0x47 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editor.findMatchBackground" #fff1f326 over #2c2525
- .search_bg = .{ 0x4b, 0x43, 0x44 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xff, 0xf1, 0xf3 },
+ .hit = .{ 0x4b, 0x43, 0x44 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xfd, 0x68, 0x83 },
+ .@"error" = .{ 0xfd, 0x68, 0x83 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xf3, 0x8d, 0x70 },
+ .warning = .{ 0xf3, 0x8d, 0x70 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x85, 0xda, 0xcc },
+ .info = .{ 0x85, 0xda, 0xcc },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0xa8, 0xa9, 0xeb },
- .palette = .{
+ .hint = .{ 0xa8, 0xa9, 0xeb },
+ .ansi = .{
.{ 0x40, 0x38, 0x38 }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."terminal.ansiBlack"
.{ 0xfd, 0x68, 0x83 }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."terminal.ansiRed"
.{ 0xad, 0xda, 0x78 }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Ristretto).json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/monokai_pro_spectrum.zig b/core/themes/monokai_pro_spectrum.zig
index 3abd67ee..da7f4f4a 100644
--- a/core/themes/monokai_pro_spectrum.zig
+++ b/core/themes/monokai_pro_spectrum.zig
@@ -8,63 +8,63 @@
//! - focused tag ground #222222 -> #45412d: 1.00:1 off the unfocused #222222, pardes needs 1.5:1 on a dark page
//! - rules between panes #191919 -> #454447: 1.11:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
//! - scroll thumb #39383a -> #413f42: 1.36:1 on its track #222222
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #222222 -> #2a2a2a: 1.00:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #45412d -> #464646: 1.40:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest)
+//! - selection #39383a -> #3b3a3c: 1.36:1 off the page, now 1.41:1 (R7)
pub const theme = .{
.name = "monokai_pro_spectrum",
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editor.background"
- .bg = .{ 0x22, 0x22, 0x22 },
+ .page = .{ 0x22, 0x22, 0x22 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editor.foreground"
- .fg = .{ 0xf7, 0xf1, 0xff },
+ .text = .{ 0xf7, 0xf1, 0xff },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editor.selectionBackground" #bab6c026 over #222222
- .sel_bg = .{ 0x39, 0x38, 0x3a },
+ .selection = .{ 0x39, 0x38, 0x3a },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xf7, 0xf1, 0xff },
+ .selection_text = .{ 0xf7, 0xf1, 0xff },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."tab.inactiveBackground"
- .tag_bg = .{ 0x22, 0x22, 0x22 },
+ .tag = .{ 0x22, 0x22, 0x22 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."tab.inactiveForeground"
- .tag_fg = .{ 0x8b, 0x88, 0x8f },
+ .tag_text = .{ 0x8b, 0x88, 0x8f },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."tab.activeBackground" #222222, adjusted
- .tag_active_bg = .{ 0x45, 0x41, 0x2d },
+ .tag_focus = .{ 0x45, 0x41, 0x2d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."tab.activeForeground"
- .tag_active_fg = .{ 0xfc, 0xe5, 0x66 },
+ .tag_focus_text = .{ 0xfc, 0xe5, 0x66 },
// the focused grip: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."tab.activeBorder"
- .box = .{ 0xfc, 0xe5, 0x66 },
- // derived: the grip at rest, the accent #fce566 faded toward the unfocused tag #222222 as far as 1.6:1 off it (0.18 of the way)
- .box_dim = .{ 0x49, 0x45, 0x2e },
+ .accent = .{ 0xfc, 0xe5, 0x66 },
// an unsaved grip: the original's modified colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorGutter.modifiedBackground"
- .box_dirty = .{ 0xfd, 0x93, 0x53 },
+ .dirty = .{ 0xfd, 0x93, 0x53 },
// derived: the column grip, the original's type colour, ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 tokenColors[42] "entity.name.type"
- .column_box = .{ 0x5a, 0xd4, 0xe6 },
+ .column_grip = .{ 0x5a, 0xd4, 0xe6 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 tokenColors[57] "keyword"
- .kw = .{ 0xfc, 0x61, 0x8d },
+ .keyword = .{ 0xfc, 0x61, 0x8d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 tokenColors[132] "string"
- .str = .{ 0xfc, 0xe5, 0x66 },
+ .string = .{ 0xfc, 0xe5, 0x66 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 tokenColors[22] "constant.numeric"
- .num = .{ 0x94, 0x8a, 0xe3 },
+ .number = .{ 0x94, 0x8a, 0xe3 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 tokenColors[0] "comment"
.comment = .{ 0x69, 0x67, 0x6c },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorLineNumber.foreground"
- .lineno = .{ 0x52, 0x50, 0x53 },
+ .line_number = .{ 0x52, 0x50, 0x53 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorLineNumber.activeForeground"
- .lineno_active = .{ 0xba, 0xb6, 0xc0 },
+ .line_number_current = .{ 0xba, 0xb6, 0xc0 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 no scrollbar.background: the editor shows through
- .scroll_track = .{ 0x22, 0x22, 0x22 },
+ .rail = .{ 0x22, 0x22, 0x22 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."scrollbarSlider.background" #bab6c026 over #222222 #39383a, adjusted
- .scroll_thumb = .{ 0x41, 0x3f, 0x42 },
+ .rail_thumb = .{ 0x41, 0x3f, 0x42 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorGroup.border" #191919, adjusted
- .border = .{ 0x45, 0x44, 0x47 },
+ .rule = .{ 0x45, 0x44, 0x47 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editor.findMatchBackground" #f7f1ff26 over #222222
- .search_bg = .{ 0x42, 0x41, 0x43 },
- // derived: the original keeps text colours over a match; the page's text, whichever reads better on it
- .search_fg = .{ 0xf7, 0xf1, 0xff },
+ .hit = .{ 0x42, 0x41, 0x43 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorError.foreground"
- .diagnostic_error = .{ 0xfc, 0x61, 0x8d },
+ .@"error" = .{ 0xfc, 0x61, 0x8d },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorWarning.foreground"
- .diagnostic_warning = .{ 0xfd, 0x93, 0x53 },
+ .warning = .{ 0xfd, 0x93, 0x53 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorInfo.foreground"
- .diagnostic_info = .{ 0x5a, 0xd4, 0xe6 },
+ .info = .{ 0x5a, 0xd4, 0xe6 },
// ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."editorHint.foreground"
- .diagnostic_hint = .{ 0x94, 0x8a, 0xe3 },
- .palette = .{
+ .hint = .{ 0x94, 0x8a, 0xe3 },
+ .ansi = .{
.{ 0x36, 0x35, 0x37 }, // 0: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."terminal.ansiBlack"
.{ 0xfc, 0x61, 0x8d }, // 1: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."terminal.ansiRed"
.{ 0x7b, 0xd8, 0x8f }, // 2: ~/05-genizah/monokai-pro-vscode/vsix/extension/themes/Monokai Pro (Filter Spectrum).json:1 colors."terminal.ansiGreen"
diff --git a/core/themes/neobones_dark.zig b/core/themes/neobones_dark.zig
index b0167da2..25aaf8b9 100644
--- a/core/themes/neobones_dark.zig
+++ b/core/themes/neobones_dark.zig
@@ -15,63 +15,61 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #4b616f -> #768e9d: 1.59:1 on the focused tag, now 3.01:1 (R6: 3:1)
pub const theme = .{
.name = "neobones_dark",
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:33 Normal guibg
- .bg = .{ 0x0f, 0x19, 0x1f },
+ .page = .{ 0x0f, 0x19, 0x1f },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:33 Normal guifg
- .fg = .{ 0xc6, 0xd5, 0xcf },
+ .text = .{ 0xc6, 0xd5, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:209 Visual guibg
- .sel_bg = .{ 0x3a, 0x3e, 0x3d },
+ .selection = .{ 0x3a, 0x3e, 0x3d },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xc6, 0xd5, 0xcf },
+ .selection_text = .{ 0xc6, 0xd5, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:196 StatusLineNC guibg
- .tag_bg = .{ 0x18, 0x25, 0x2d },
+ .tag = .{ 0x18, 0x25, 0x2d },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:196 StatusLineNC guifg
- .tag_fg = .{ 0xd1, 0xe0, 0xda },
+ .tag_text = .{ 0xd1, 0xe0, 0xda },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:193 StatusLine guibg #20303a, adjusted
- .tag_active_bg = .{ 0x2e, 0x43, 0x50 },
+ .tag_focus = .{ 0x2e, 0x43, 0x50 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:193 StatusLine guifg
- .tag_active_fg = .{ 0xc6, 0xd5, 0xcf },
+ .tag_focus_text = .{ 0xc6, 0xd5, 0xcf },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/neobones_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x4b, 0x61, 0x6f },
- // derived: the grip at rest, the accent #3b5362 faded toward the unfocused tag #18252d as far as 1.6:1 off it (0.74 of the way)
- .box_dim = .{ 0x32, 0x47, 0x54 },
+ .accent = .{ 0x4b, 0x61, 0x6f },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/neobones.vim:41 Changed guifg
- .box_dirty = .{ 0x81, 0x90, 0xd4 },
+ .dirty = .{ 0x81, 0x90, 0xd4 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/neobones.vim:205 Type guifg
- .column_box = .{ 0x6e, 0x99, 0xb2 },
+ .column_grip = .{ 0x6e, 0x99, 0xb2 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:189 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xc6, 0xd5, 0xcf },
+ .keyword = .{ 0xc6, 0xd5, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:199 String guifg
- .str = .{ 0x93, 0x9e, 0x99 },
+ .string = .{ 0x93, 0x9e, 0x99 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:163 Number guifg
- .num = .{ 0x93, 0x9e, 0x99 },
+ .number = .{ 0x93, 0x9e, 0x99 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:47 Comment guifg
.comment = .{ 0x53, 0x69, 0x77 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:149 LineNr guifg
- .lineno = .{ 0x46, 0x62, 0x73 },
+ .line_number = .{ 0x46, 0x62, 0x73 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:61 CursorLineNr guifg
- .lineno_active = .{ 0xc6, 0xd5, 0xcf },
+ .line_number_current = .{ 0xc6, 0xd5, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:166 PmenuSbar guibg
- .scroll_track = .{ 0x40, 0x5a, 0x6b },
+ .rail = .{ 0x40, 0x5a, 0x6b },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:168 PmenuThumb guibg
- .scroll_thumb = .{ 0x60, 0x86, 0x9d },
+ .rail_thumb = .{ 0x60, 0x86, 0x9d },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:216 WinSeparator guifg
- .border = .{ 0x46, 0x62, 0x73 },
+ .rule = .{ 0x46, 0x62, 0x73 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:171 Search guibg
- .search_bg = .{ 0x62, 0x41, 0x5b },
- // ~/05-genizah/zenbones.nvim/colors/neobones.vim:171 Search guifg
- .search_fg = .{ 0xc6, 0xd5, 0xcf },
+ .hit = .{ 0x62, 0x41, 0x5b },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:112 Error guifg via DiagnosticError->Error (link :113)
- .diagnostic_error = .{ 0xde, 0x6e, 0x7c },
+ .@"error" = .{ 0xde, 0x6e, 0x7c },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:210 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :211)
- .diagnostic_warning = .{ 0xb7, 0x7e, 0x64 },
+ .warning = .{ 0xb7, 0x7e, 0x64 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:71 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x81, 0x90, 0xd4 },
+ .info = .{ 0x81, 0x90, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:66 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xb2, 0x79, 0xa7 },
- .palette = .{
+ .hint = .{ 0xb2, 0x79, 0xa7 },
+ .ansi = .{
.{ 0x0f, 0x19, 0x1f }, // 0: ~/05-genizah/zenbones.nvim/colors/neobones.vim:17 g:terminal_color_0
.{ 0xde, 0x6e, 0x7c }, // 1: ~/05-genizah/zenbones.nvim/colors/neobones.vim:18 g:terminal_color_1
.{ 0x90, 0xff, 0x6b }, // 2: ~/05-genizah/zenbones.nvim/colors/neobones.vim:19 g:terminal_color_2
diff --git a/core/themes/neobones_light.zig b/core/themes/neobones_light.zig
index b24fcef5..3a5997aa 100644
--- a/core/themes/neobones_light.zig
+++ b/core/themes/neobones_light.zig
@@ -15,63 +15,62 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #96a097 -> #646e65: 1.53:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - selection #ade48c -> #a5e484: 1.23:1 off the page, now 1.25:1 (R7)
pub const theme = .{
.name = "neobones_light",
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:266 Normal guibg
- .bg = .{ 0xe5, 0xed, 0xe6 },
+ .page = .{ 0xe5, 0xed, 0xe6 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:266 Normal guifg
- .fg = .{ 0x20, 0x2e, 0x18 },
+ .text = .{ 0x20, 0x2e, 0x18 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:442 Visual guibg
- .sel_bg = .{ 0xad, 0xe4, 0x8c },
+ .selection = .{ 0xad, 0xe4, 0x8c },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x20, 0x2e, 0x18 },
+ .selection_text = .{ 0x20, 0x2e, 0x18 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:429 StatusLineNC guibg
- .tag_bg = .{ 0xd0, 0xde, 0xd2 },
+ .tag = .{ 0xd0, 0xde, 0xd2 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:429 StatusLineNC guifg
- .tag_fg = .{ 0x4b, 0x66, 0x3c },
+ .tag_text = .{ 0x4b, 0x66, 0x3c },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:426 StatusLine guibg #c2cfc4, adjusted
- .tag_active_bg = .{ 0xba, 0xc6, 0xbc },
+ .tag_focus = .{ 0xba, 0xc6, 0xbc },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:426 StatusLine guifg
- .tag_active_fg = .{ 0x20, 0x2e, 0x18 },
+ .tag_focus_text = .{ 0x20, 0x2e, 0x18 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/neobones_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x96, 0xa0, 0x97 },
- // derived: the grip at rest, the accent #a3aea4 faded toward the unfocused tag #d0ded2 as far as 1.6:1 off it (0.98 of the way)
- .box_dim = .{ 0xa4, 0xaf, 0xa5 },
+ .accent = .{ 0x96, 0xa0, 0x97 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/neobones.vim:274 Changed guifg
- .box_dirty = .{ 0x28, 0x64, 0x86 },
+ .dirty = .{ 0x28, 0x64, 0x86 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/neobones.vim:438 Type guifg
- .column_box = .{ 0x49, 0x5c, 0x4c },
+ .column_grip = .{ 0x49, 0x5c, 0x4c },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:422 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x20, 0x2e, 0x18 },
+ .keyword = .{ 0x20, 0x2e, 0x18 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:432 String guifg
- .str = .{ 0x47, 0x60, 0x38 },
+ .string = .{ 0x47, 0x60, 0x38 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:396 Number guifg
- .num = .{ 0x47, 0x60, 0x38 },
+ .number = .{ 0x47, 0x60, 0x38 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:280 Comment guifg
.comment = .{ 0x87, 0x8d, 0x88 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:382 LineNr guifg
- .lineno = .{ 0x8f, 0x98, 0x90 },
+ .line_number = .{ 0x8f, 0x98, 0x90 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:294 CursorLineNr guifg
- .lineno_active = .{ 0x20, 0x2e, 0x18 },
+ .line_number_current = .{ 0x20, 0x2e, 0x18 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:399 PmenuSbar guibg
- .scroll_track = .{ 0x9b, 0xa6, 0x9d },
+ .rail = .{ 0x9b, 0xa6, 0x9d },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:401 PmenuThumb guibg
- .scroll_thumb = .{ 0xf4, 0xf7, 0xf5 },
+ .rail_thumb = .{ 0xf4, 0xf7, 0xf5 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:449 WinSeparator guifg
- .border = .{ 0x8f, 0x98, 0x90 },
+ .rule = .{ 0x8f, 0x98, 0x90 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:404 Search guibg
- .search_bg = .{ 0xdc, 0xb5, 0xd4 },
- // ~/05-genizah/zenbones.nvim/colors/neobones.vim:404 Search guifg
- .search_fg = .{ 0x20, 0x2e, 0x18 },
+ .hit = .{ 0xdc, 0xb5, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:345 Error guifg via DiagnosticError->Error (link :346)
- .diagnostic_error = .{ 0xa8, 0x33, 0x4c },
+ .@"error" = .{ 0xa8, 0x33, 0x4c },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:443 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :444)
- .diagnostic_warning = .{ 0x94, 0x49, 0x27 },
+ .warning = .{ 0x94, 0x49, 0x27 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:304 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x28, 0x64, 0x86 },
+ .info = .{ 0x28, 0x64, 0x86 },
// ~/05-genizah/zenbones.nvim/colors/neobones.vim:299 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x88, 0x50, 0x7d },
- .palette = .{
+ .hint = .{ 0x88, 0x50, 0x7d },
+ .ansi = .{
.{ 0xe5, 0xed, 0xe6 }, // 0: ~/05-genizah/zenbones.nvim/colors/neobones.vim:250 g:terminal_color_0
.{ 0xa8, 0x33, 0x4c }, // 1: ~/05-genizah/zenbones.nvim/colors/neobones.vim:251 g:terminal_color_1
.{ 0x56, 0x7a, 0x30 }, // 2: ~/05-genizah/zenbones.nvim/colors/neobones.vim:252 g:terminal_color_2
diff --git a/core/themes/nord.zig b/core/themes/nord.zig
index f74785b3..284b59e6 100644
--- a/core/themes/nord.zig
+++ b/core/themes/nord.zig
@@ -47,63 +47,63 @@
//! 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.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - search hit #88c0d0 -> #634a34: 6.24:1 off the page, now 1.52:1 (R8: 1.5:1, the text reading on it)
+//! - error #bf616a -> #e17f87: 3.05:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #5e81ac -> #7a9ecb: 3.10:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
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 },
+ .page = .{ 0x2e, 0x34, 0x40 },
// ~/05-genizah/nord-vim/colors/nord.vim:139 Normal guifg (s:nord4_gui = #D8DEE9 at :20)
- .fg = .{ 0xd8, 0xde, 0xe9 },
+ .text = .{ 0xd8, 0xde, 0xe9 },
// ~/05-genizah/nord-vim/colors/nord.vim:149 Visual guibg (s:nord2_gui = #434C5E at :17)
- .sel_bg = .{ 0x43, 0x4c, 0x5e },
+ .selection = .{ 0x43, 0x4c, 0x5e },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xd8, 0xde, 0xe9 },
+ .selection_text = .{ 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 },
+ .tag = .{ 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 },
+ .tag_text = .{ 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 },
+ .tag_focus = .{ 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 },
+ .tag_focus_text = .{ 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 },
+ .accent = .{ 0x88, 0xc0, 0xd0 },
// 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 },
+ .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 },
+ .column_grip = .{ 0xa3, 0xbe, 0x8c },
// ~/05-genizah/nord-vim/colors/nord.vim:270 Keyword guifg (s:nord9_gui = #81A1C1 at :25)
- .kw = .{ 0x81, 0xa1, 0xc1 },
+ .keyword = .{ 0x81, 0xa1, 0xc1 },
// ~/05-genizah/nord-vim/colors/nord.vim:281 String guifg (s:nord14_gui = #A3BE8C at :30)
- .str = .{ 0xa3, 0xbe, 0x8c },
+ .string = .{ 0xa3, 0xbe, 0x8c },
// ~/05-genizah/nord-vim/colors/nord.vim:272 Number guifg (s:nord15_gui = #B48EAD at :31)
- .num = .{ 0xb4, 0x8e, 0xad },
+ .number = .{ 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 },
+ .line_number = .{ 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 },
+ .line_number_current = .{ 0xd8, 0xde, 0xe9 },
// ~/05-genizah/nord-vim/colors/nord.vim:141 PmenuSbar guibg (s:nord2_gui = #434C5E at :17)
- .scroll_track = .{ 0x43, 0x4c, 0x5e },
+ .rail = .{ 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 },
+ .rail_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 },
+ .rule = .{ 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 },
+ .hit = .{ 0x88, 0xc0, 0xd0 },
// ~/05-genizah/nord-vim/colors/nord.vim:184 DiagnosticError guifg (s:nord11_gui = #BF616A at :27)
- .diagnostic_error = .{ 0xbf, 0x61, 0x6a },
+ .@"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 },
+ .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 },
+ .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 = .{
+ .hint = .{ 0x5e, 0x81, 0xac },
+ .ansi = .{
.{ 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)
diff --git a/core/themes/nordbones.zig b/core/themes/nordbones.zig
index e7ec64b3..947164b3 100644
--- a/core/themes/nordbones.zig
+++ b/core/themes/nordbones.zig
@@ -18,63 +18,65 @@
//! only), so it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #6e778b -> #a2acc2: 1.52:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - search hit #84637e -> #634b34: 2.38:1 off the page, now 1.52:1 (R8: 1.5:1, the text reading on it)
+//! - error #c1616a -> #e38088: 3.04:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #cf866f -> #e5c95e: 4.27:1 on the page, now 7.53:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #b38dac -> #b791b0: 4.29:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "nordbones",
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:34 Normal guibg
- .bg = .{ 0x2f, 0x35, 0x41 },
+ .page = .{ 0x2f, 0x35, 0x41 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:34 Normal guifg
- .fg = .{ 0xeb, 0xee, 0xf3 },
+ .text = .{ 0xeb, 0xee, 0xf3 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:212 Visual guibg
- .sel_bg = .{ 0x54, 0x5f, 0x70 },
+ .selection = .{ 0x54, 0x5f, 0x70 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xeb, 0xee, 0xf3 },
+ .selection_text = .{ 0xeb, 0xee, 0xf3 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:199 StatusLineNC guibg
- .tag_bg = .{ 0x39, 0x40, 0x4e },
+ .tag = .{ 0x39, 0x40, 0x4e },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:199 StatusLineNC guifg
- .tag_fg = .{ 0xf2, 0xf4, 0xf7 },
+ .tag_text = .{ 0xf2, 0xf4, 0xf7 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:196 StatusLine guibg #414959, adjusted
- .tag_active_bg = .{ 0x51, 0x5b, 0x6e },
+ .tag_focus = .{ 0x51, 0x5b, 0x6e },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:196 StatusLine guifg
- .tag_active_fg = .{ 0xeb, 0xee, 0xf3 },
+ .tag_focus_text = .{ 0xeb, 0xee, 0xf3 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/nordbones_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x6e, 0x77, 0x8b },
- // derived: the grip at rest, the accent #5e687e faded toward the unfocused tag #39404e as far as 1.6:1 off it (0.78 of the way)
- .box_dim = .{ 0x56, 0x5f, 0x73 },
+ .accent = .{ 0x6e, 0x77, 0x8b },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/nordbones.vim:42 Changed guifg
- .box_dirty = .{ 0x8f, 0xbc, 0xba },
+ .dirty = .{ 0x8f, 0xbc, 0xba },
// derived: the column grip, the original's function colour, ~/05-genizah/zenbones.nvim/colors/nordbones.vim:123 Function guifg
- .column_box = .{ 0x87, 0xbf, 0xce },
+ .column_grip = .{ 0x87, 0xbf, 0xce },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:192 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x81, 0xa1, 0xc1 },
+ .keyword = .{ 0x81, 0xa1, 0xc1 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:202 String guifg
- .str = .{ 0x9e, 0xaf, 0xc9 },
+ .string = .{ 0x9e, 0xaf, 0xc9 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:165 Number guifg
- .num = .{ 0x8f, 0xbc, 0xba },
+ .number = .{ 0x8f, 0xbc, 0xba },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:48 Comment guifg
.comment = .{ 0x73, 0x7c, 0x90 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:151 LineNr guifg
- .lineno = .{ 0x69, 0x75, 0x8c },
+ .line_number = .{ 0x69, 0x75, 0x8c },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:63 CursorLineNr guifg
- .lineno_active = .{ 0xeb, 0xee, 0xf3 },
+ .line_number_current = .{ 0xeb, 0xee, 0xf3 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:168 PmenuSbar guibg
- .scroll_track = .{ 0x65, 0x70, 0x87 },
+ .rail = .{ 0x65, 0x70, 0x87 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:170 PmenuThumb guibg
- .scroll_thumb = .{ 0x86, 0x94, 0xb0 },
+ .rail_thumb = .{ 0x86, 0x94, 0xb0 },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:219 WinSeparator guifg
- .border = .{ 0x69, 0x75, 0x8c },
+ .rule = .{ 0x69, 0x75, 0x8c },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:173 Search guibg
- .search_bg = .{ 0x84, 0x63, 0x7e },
- // ~/05-genizah/zenbones.nvim/colors/nordbones.vim:173 Search guifg
- .search_fg = .{ 0xeb, 0xee, 0xf3 },
+ .hit = .{ 0x84, 0x63, 0x7e },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:114 Error guifg via DiagnosticError->Error (link :115)
- .diagnostic_error = .{ 0xc1, 0x61, 0x6a },
+ .@"error" = .{ 0xc1, 0x61, 0x6a },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:213 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :214)
- .diagnostic_warning = .{ 0xcf, 0x86, 0x6f },
+ .warning = .{ 0xcf, 0x86, 0x6f },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:73 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x8f, 0xbc, 0xba },
+ .info = .{ 0x8f, 0xbc, 0xba },
// ~/05-genizah/zenbones.nvim/colors/nordbones.vim:68 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xb3, 0x8d, 0xac },
- .palette = .{
+ .hint = .{ 0xb3, 0x8d, 0xac },
+ .ansi = .{
.{ 0x2f, 0x35, 0x41 }, // 0: ~/05-genizah/zenbones.nvim/colors/nordbones.vim:18 g:terminal_color_0
.{ 0xc1, 0x61, 0x6a }, // 1: ~/05-genizah/zenbones.nvim/colors/nordbones.vim:19 g:terminal_color_1
.{ 0xa4, 0xbe, 0x8d }, // 2: ~/05-genizah/zenbones.nvim/colors/nordbones.vim:20 g:terminal_color_2
diff --git a/core/themes/okabe.zig b/core/themes/okabe.zig
new file mode 100644
index 00000000..ba8b1888
--- /dev/null
+++ b/core/themes/okabe.zig
@@ -0,0 +1,32 @@
+//! pardes okabe: colour-blind safe (DESIGN.md part D): Okabe and Ito's
+//! eight hues, lightened for a dark page. Added is blue, deleted vermilion,
+//! errors vermilion and warnings yellow: nothing says red against green. For
+//! the 8 % of men with a colour vision deficiency, and anyone reading diffs.
+pub const theme = .{
+ .name = "okabe",
+ .page = .{ 0x0e, 0x12, 0x18 },
+ .text = .{ 0xd8, 0xde, 0xe8 },
+ .tag = .{ 0x1b, 0x22, 0x2c },
+ .tag_text = .{ 0xa9, 0xb4, 0xc4 },
+ .accent = .{ 0x56, 0xb4, 0xe9 },
+ .selection = .{ 0x27, 0x41, 0x5e },
+ .selection_text = .{ 0xee, 0xf3, 0xfa },
+ .keyword = .{ 0x6c, 0xc0, 0xf0 },
+ .string = .{ 0x3c, 0xcf, 0xa4 },
+ .number = .{ 0xf0, 0xa8, 0x30 },
+ .comment = .{ 0xd7, 0xcf, 0x7a },
+ .line_number = .{ 0x4e, 0x58, 0x66 },
+ .line_number_current = .{ 0x7d, 0x88, 0x98 },
+ .@"error" = .{ 0xff, 0x8a, 0x4c },
+ .warning = .{ 0xf0, 0xe4, 0x42 },
+ .info = .{ 0x8c, 0xc8, 0xf0 },
+ .hint = .{ 0xe5, 0x94, 0xc8 },
+ .added = .{ 0x56, 0xb4, 0xe9 },
+ .deleted = .{ 0xff, 0x8a, 0x4c },
+ .ansi = .{
+ .{ 0x1b, 0x22, 0x2c }, .{ 0xff, 0x8a, 0x4c }, .{ 0x3c, 0xcf, 0xa4 }, .{ 0xf0, 0xe4, 0x42 },
+ .{ 0x56, 0xb4, 0xe9 }, .{ 0xe5, 0x94, 0xc8 }, .{ 0x8f, 0xd8, 0xf0 }, .{ 0xc4, 0xcc, 0xd8 },
+ .{ 0x73, 0x7e, 0x8e }, .{ 0xff, 0xab, 0x7c }, .{ 0x6f, 0xe0, 0xbd }, .{ 0xf6, 0xee, 0x80 },
+ .{ 0x86, 0xcc, 0xf2 }, .{ 0xf0, 0xb4, 0xda }, .{ 0xb4, 0xe6, 0xf6 }, .{ 0xee, 0xf3, 0xfa },
+ },
+};
diff --git a/core/themes/orchard.zig b/core/themes/orchard.zig
index b4a35c1f..8559119d 100644
--- a/core/themes/orchard.zig
+++ b/core/themes/orchard.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "orchard",
- .bg = .{ 0x0d, 0x14, 0x10 },
- .fg = .{ 0xe5, 0xee, 0xe5 },
- .tag_bg = .{ 0x1d, 0x28, 0x24 },
- .tag_fg = .{ 0xb2, 0xc3, 0xb8 },
- .tag_name_fg = .{ 0xd3, 0xb0, 0xd9 },
- .tag_active_name_fg = .{ 0xdf, 0xbc, 0xe5 },
- .tag_active_bg = .{ 0x26, 0x36, 0x2d },
- .tag_active_fg = .{ 0xbe, 0xcf, 0xc4 },
- .box = .{ 0xad, 0xd3, 0x8a },
- .box_dim = .{ 0x49, 0x66, 0x56 },
- .column_box = .{ 0xf4, 0xc0, 0x86 },
- .column_box_dim = .{ 0x88, 0x74, 0x55 },
- .kw = .{ 0xc9, 0xa7, 0xed },
- .str = .{ 0xb8, 0xd8, 0x8a },
- .num = .{ 0xf8, 0xc0, 0x82 },
+ .page = .{ 0x0d, 0x14, 0x10 },
+ .text = .{ 0xe5, 0xee, 0xe5 },
+ .tag = .{ 0x1d, 0x28, 0x24 },
+ .tag_text = .{ 0xb2, 0xc3, 0xb8 },
+ .tag_name = .{ 0xd3, 0xb0, 0xd9 },
+ .tag_focus = .{ 0x26, 0x36, 0x2d },
+ .tag_focus_text = .{ 0xbe, 0xcf, 0xc4 },
+ .accent = .{ 0xad, 0xd3, 0x8a },
+ .column_grip = .{ 0xf4, 0xc0, 0x86 },
+ .keyword = .{ 0xc9, 0xa7, 0xed },
+ .string = .{ 0xb8, 0xd8, 0x8a },
+ .number = .{ 0xf8, 0xc0, 0x82 },
.comment = .{ 0xb9, 0xf4, 0x80 },
- .lineno = .{ 0x59, 0x67, 0x5c },
- .lineno_active = .{ 0x61, 0x6f, 0x64 },
- .scroll_track = .{ 0x15, 0x20, 0x19 },
- .scroll_thumb = .{ 0x60, 0x82, 0x69 },
- .border = .{ 0x48, 0x61, 0x52 },
- .sel_bg = .{ 0x3c, 0x61, 0x4a },
- .sel_fg = .{ 0xf5, 0xf7, 0xee },
- .search_bg = .{ 0x5e, 0x49, 0x23 },
- .search_fg = .{ 0xf7, 0xe4, 0xa5 },
- .diagnostic_error = .{ 0xfe, 0x98, 0x8e },
- .diagnostic_warning = .{ 0xf9, 0xcb, 0x70 },
- .diagnostic_info = .{ 0x92, 0xd1, 0xde },
- .diagnostic_hint = .{ 0xb7, 0xcb, 0x98 },
- .palette = .{
+ .line_number = .{ 0x59, 0x67, 0x5c },
+ .line_number_current = .{ 0x61, 0x6f, 0x64 },
+ .rail = .{ 0x15, 0x20, 0x19 },
+ .rail_thumb = .{ 0x60, 0x82, 0x69 },
+ .rule = .{ 0x48, 0x61, 0x52 },
+ .selection = .{ 0x3c, 0x61, 0x4a },
+ .selection_text = .{ 0xf5, 0xf7, 0xee },
+ .hit = .{ 0x5e, 0x49, 0x23 },
+ .@"error" = .{ 0xfe, 0x98, 0x8e },
+ .warning = .{ 0xf9, 0xcb, 0x70 },
+ .info = .{ 0x92, 0xd1, 0xde },
+ .hint = .{ 0xb7, 0xcb, 0x98 },
+ .ansi = .{
.{ 0x0d, 0x14, 0x10 },
.{ 0xf1, 0xa3, 0x9b },
.{ 0xb6, 0xce, 0x94 },
diff --git a/core/themes/orchard_black.zig b/core/themes/orchard_black.zig
index d9e026bd..86e39627 100644
--- a/core/themes/orchard_black.zig
+++ b/core/themes/orchard_black.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "orchard_black",
- .bg = .{ 0x00, 0x00, 0x00 },
- .fg = .{ 0xf2, 0xf8, 0xef },
- .tag_bg = .{ 0x1d, 0x28, 0x24 },
- .tag_fg = .{ 0xb2, 0xc3, 0xb8 },
- .tag_name_fg = .{ 0xd3, 0xb0, 0xd9 },
- .tag_active_name_fg = .{ 0xdf, 0xbc, 0xe5 },
- .tag_active_bg = .{ 0x26, 0x36, 0x2d },
- .tag_active_fg = .{ 0xbe, 0xcf, 0xc4 },
- .box = .{ 0xad, 0xd3, 0x8a },
- .box_dim = .{ 0x49, 0x66, 0x56 },
- .column_box = .{ 0xf4, 0xc0, 0x86 },
- .column_box_dim = .{ 0x88, 0x74, 0x55 },
- .kw = .{ 0xc9, 0xa7, 0xed },
- .str = .{ 0xb8, 0xd8, 0x8a },
- .num = .{ 0xf8, 0xc0, 0x82 },
+ .page = .{ 0x00, 0x00, 0x00 },
+ .text = .{ 0xf2, 0xf8, 0xef },
+ .tag = .{ 0x1d, 0x28, 0x24 },
+ .tag_text = .{ 0xb2, 0xc3, 0xb8 },
+ .tag_name = .{ 0xd3, 0xb0, 0xd9 },
+ .tag_focus = .{ 0x26, 0x36, 0x2d },
+ .tag_focus_text = .{ 0xbe, 0xcf, 0xc4 },
+ .accent = .{ 0xad, 0xd3, 0x8a },
+ .column_grip = .{ 0xf4, 0xc0, 0x86 },
+ .keyword = .{ 0xc9, 0xa7, 0xed },
+ .string = .{ 0xb8, 0xd8, 0x8a },
+ .number = .{ 0xf8, 0xc0, 0x82 },
.comment = .{ 0xb9, 0xf4, 0x80 },
- .lineno = .{ 0x59, 0x67, 0x5c },
- .lineno_active = .{ 0x61, 0x6f, 0x64 },
- .scroll_track = .{ 0x11, 0x18, 0x13 },
- .scroll_thumb = .{ 0x60, 0x82, 0x69 },
- .border = .{ 0x48, 0x61, 0x52 },
- .sel_bg = .{ 0x3c, 0x61, 0x4a },
- .sel_fg = .{ 0xf5, 0xf7, 0xee },
- .search_bg = .{ 0x5e, 0x49, 0x23 },
- .search_fg = .{ 0xf7, 0xe4, 0xa5 },
- .diagnostic_error = .{ 0xfe, 0x98, 0x8e },
- .diagnostic_warning = .{ 0xf9, 0xcb, 0x70 },
- .diagnostic_info = .{ 0x92, 0xd1, 0xde },
- .diagnostic_hint = .{ 0xb7, 0xcb, 0x98 },
- .palette = .{
+ .line_number = .{ 0x59, 0x67, 0x5c },
+ .line_number_current = .{ 0x61, 0x6f, 0x64 },
+ .rail = .{ 0x11, 0x18, 0x13 },
+ .rail_thumb = .{ 0x60, 0x82, 0x69 },
+ .rule = .{ 0x48, 0x61, 0x52 },
+ .selection = .{ 0x3c, 0x61, 0x4a },
+ .selection_text = .{ 0xf5, 0xf7, 0xee },
+ .hit = .{ 0x5e, 0x49, 0x23 },
+ .@"error" = .{ 0xfe, 0x98, 0x8e },
+ .warning = .{ 0xf9, 0xcb, 0x70 },
+ .info = .{ 0x92, 0xd1, 0xde },
+ .hint = .{ 0xb7, 0xcb, 0x98 },
+ .ansi = .{
.{ 0x00, 0x00, 0x00 },
.{ 0xf1, 0xa3, 0x9b },
.{ 0xb6, 0xce, 0x94 },
diff --git a/core/themes/paper.zig b/core/themes/paper.zig
index c86482f7..a9ace49a 100644
--- a/core/themes/paper.zig
+++ b/core/themes/paper.zig
@@ -3,36 +3,32 @@
//! designed together. See docs/typ/themes.typ for the shared role contract.
pub const theme = .{
.name = "paper",
- .bg = .{ 0xf5, 0xf3, 0xed },
- .fg = .{ 0x30, 0x3b, 0x3b },
- .tag_bg = .{ 0xe8, 0xea, 0xe3 },
- .tag_fg = .{ 0x52, 0x62, 0x5a },
- .tag_name_fg = .{ 0x72, 0x4c, 0x83 },
- .tag_active_name_fg = .{ 0x69, 0x44, 0x7a },
- .tag_active_bg = .{ 0xdc, 0xe5, 0xdc },
- .tag_active_fg = .{ 0x4a, 0x5a, 0x52 },
- .box = .{ 0x36, 0x71, 0x57 },
- .box_dim = .{ 0x8f, 0xa5, 0x94 },
- .column_box = .{ 0x93, 0x58, 0x1a },
- .column_box_dim = .{ 0xbd, 0xa2, 0x7e },
- .kw = .{ 0x74, 0x46, 0x9b },
- .str = .{ 0x3a, 0x6f, 0x44 },
- .num = .{ 0x98, 0x59, 0x15 },
+ .page = .{ 0xf5, 0xf3, 0xed },
+ .text = .{ 0x30, 0x3b, 0x3b },
+ .tag = .{ 0xe8, 0xea, 0xe3 },
+ .tag_text = .{ 0x52, 0x62, 0x5a },
+ .tag_name = .{ 0x72, 0x4c, 0x83 },
+ .tag_focus = .{ 0xdc, 0xe5, 0xdc },
+ .tag_focus_text = .{ 0x4a, 0x5a, 0x52 },
+ .accent = .{ 0x36, 0x71, 0x57 },
+ .column_grip = .{ 0x93, 0x58, 0x1a },
+ .keyword = .{ 0x74, 0x46, 0x9b },
+ .string = .{ 0x3a, 0x6f, 0x44 },
+ .number = .{ 0x98, 0x59, 0x15 },
.comment = .{ 0x20, 0x75, 0x56 },
- .lineno = .{ 0x8b, 0x91, 0x85 },
- .lineno_active = .{ 0x83, 0x89, 0x7d },
- .scroll_track = .{ 0xe5, 0xe8, 0xdf },
- .scroll_thumb = .{ 0x86, 0x9d, 0x8a },
- .border = .{ 0xfb, 0xfb, 0xfb },
- .sel_bg = .{ 0xc5, 0xe2, 0xd0 },
- .sel_fg = .{ 0x20, 0x3e, 0x31 },
- .search_bg = .{ 0xfb, 0xe2, 0x9d },
- .search_fg = .{ 0x61, 0x46, 0x1c },
- .diagnostic_error = .{ 0xb3, 0x29, 0x28 },
- .diagnostic_warning = .{ 0x8c, 0x5b, 0x00 },
- .diagnostic_info = .{ 0x26, 0x6b, 0x7f },
- .diagnostic_hint = .{ 0x51, 0x74, 0x37 },
- .palette = .{
+ .line_number = .{ 0x8b, 0x91, 0x85 },
+ .line_number_current = .{ 0x83, 0x89, 0x7d },
+ .rail = .{ 0xe5, 0xe8, 0xdf },
+ .rail_thumb = .{ 0x86, 0x9d, 0x8a },
+ .rule = .{ 0xfb, 0xfb, 0xfb },
+ .selection = .{ 0xc5, 0xe2, 0xd0 },
+ .selection_text = .{ 0x20, 0x3e, 0x31 },
+ .hit = .{ 0xfb, 0xe2, 0x9d },
+ .@"error" = .{ 0xb3, 0x29, 0x28 },
+ .warning = .{ 0x8c, 0x5b, 0x00 },
+ .info = .{ 0x26, 0x6b, 0x7f },
+ .hint = .{ 0x51, 0x74, 0x37 },
+ .ansi = .{
.{ 0x30, 0x3b, 0x3b },
.{ 0xa3, 0x39, 0x38 },
.{ 0x41, 0x68, 0x48 },
diff --git a/core/themes/rose_pine.zig b/core/themes/rose_pine.zig
index 8409af9b..168cc9a5 100644
--- a/core/themes/rose_pine.zig
+++ b/core/themes/rose_pine.zig
@@ -27,63 +27,61 @@
//! git 'changed' colour (also GitSignsChange/SignChange). keyword: Keyword =
//! pine exists directly (Statement is also pine). constant: Constant gold;
//! Boolean differs (rose).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - selection #332d41 -> #372e51: 1.34:1 off the page, now 1.41:1 (R7)
pub const theme = .{
.name = "rose_pine",
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:111 Normal bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:5 main.base
- .bg = .{ 0x19, 0x17, 0x24 },
+ .page = .{ 0x19, 0x17, 0x24 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:111 Normal fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:10 main.text
- .fg = .{ 0xe0, 0xde, 0xf4 },
+ .text = .{ 0xe0, 0xde, 0xf4 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:146 Visual bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:16 main.iris, blend = 15 -> composited over palette.base #191724 at alpha 0.15 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #332d41
- .sel_bg = .{ 0x33, 0x2d, 0x41 },
+ .selection = .{ 0x33, 0x2d, 0x41 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xe0, 0xde, 0xf4 },
+ .selection_text = .{ 0xe0, 0xde, 0xf4 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:137 StatusLineNC bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:6 main.surface, blend = 60 -> composited over palette.base #191724 at alpha 0.60 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #1d1b2a
- .tag_bg = .{ 0x1d, 0x1b, 0x2a },
+ .tag = .{ 0x1d, 0x1b, 0x2a },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:137 StatusLineNC fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:8 main.muted #6e6a86, adjusted
- .tag_fg = .{ 0x85, 0x82, 0x99 },
+ .tag_text = .{ 0x85, 0x82, 0x99 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:136 StatusLine bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:6 main.surface #1f1d2e, adjusted
- .tag_active_bg = .{ 0x3c, 0x3a, 0x4e },
+ .tag_focus = .{ 0x3c, 0x3a, 0x4e },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:136 StatusLine fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:9 main.subtle #908caa, adjusted
- .tag_active_fg = .{ 0xa8, 0xa5, 0xbd },
+ .tag_focus_text = .{ 0xa8, 0xa5, 0xbd },
// the focused grip: ~/05-genizah/rose-pine-neovim/lua/lualine/themes/rose-pine.lua:11 lualine theme normal.a bg = p.rose -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:13 main.rose
- .box = .{ 0xeb, 0xbc, 0xba },
- // derived: the grip at rest, the accent #ebbcba faded toward the unfocused tag #1d1b2a as far as 1.6:1 off it (0.22 of the way)
- .box_dim = .{ 0x4a, 0x3e, 0x4a },
+ .accent = .{ 0xeb, 0xbc, 0xba },
// an unsaved grip: the original's warning colour, ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:159 DiagnosticWarn fg = groups.warn = "gold" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:51) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:12 main.gold
- .box_dirty = .{ 0xf6, 0xc1, 0x77 },
+ .dirty = .{ 0xf6, 0xc1, 0x77 },
// derived: the column grip, the original's type colour, ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:223 Type fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:15 main.foam
- .column_box = .{ 0x9c, 0xcf, 0xd8 },
+ .column_grip = .{ 0x9c, 0xcf, 0xd8 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:200 Keyword fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:14 main.pine
- .kw = .{ 0x31, 0x74, 0x8f },
+ .keyword = .{ 0x31, 0x74, 0x8f },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:219 String fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:12 main.gold
- .str = .{ 0xf6, 0xc1, 0x77 },
+ .string = .{ 0xf6, 0xc1, 0x77 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:209 Number fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:12 main.gold
- .num = .{ 0xf6, 0xc1, 0x77 },
+ .number = .{ 0xf6, 0xc1, 0x77 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:188 Comment fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:9 main.subtle
.comment = .{ 0x90, 0x8c, 0xaa },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:106 LineNr fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:8 main.muted
- .lineno = .{ 0x6e, 0x6a, 0x86 },
+ .line_number = .{ 0x6e, 0x6a, 0x86 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:88 CursorLineNr fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:10 main.text
- .lineno_active = .{ 0xe0, 0xde, 0xf4 },
+ .line_number_current = .{ 0xe0, 0xde, 0xf4 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:120 PmenuSbar bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:6 main.surface
- .scroll_track = .{ 0x1f, 0x1d, 0x2e },
+ .rail = .{ 0x1f, 0x1d, 0x2e },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:122 PmenuThumb bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:8 main.muted
- .scroll_thumb = .{ 0x6e, 0x6a, 0x86 },
+ .rail_thumb = .{ 0x6e, 0x6a, 0x86 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:153 WinSeparator fg = groups.border = "muted" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:43) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:8 main.muted
- .border = .{ 0x6e, 0x6a, 0x86 },
+ .rule = .{ 0x6e, 0x6a, 0x86 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:129 Search bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:12 main.gold, blend = 20 -> composited over palette.base #191724 at alpha 0.20 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #453935
- .search_bg = .{ 0x45, 0x39, 0x35 },
- // ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:129 Search fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:10 main.text
- .search_fg = .{ 0xe0, 0xde, 0xf4 },
+ .hit = .{ 0x45, 0x39, 0x35 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:155 DiagnosticError fg = groups.error = "love" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:47) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:11 main.love
- .diagnostic_error = .{ 0xeb, 0x6f, 0x92 },
+ .@"error" = .{ 0xeb, 0x6f, 0x92 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:159 DiagnosticWarn fg = groups.warn = "gold" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:51) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:12 main.gold
- .diagnostic_warning = .{ 0xf6, 0xc1, 0x77 },
+ .warning = .{ 0xf6, 0xc1, 0x77 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:157 DiagnosticInfo fg = groups.info = "foam" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:49) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:15 main.foam
- .diagnostic_info = .{ 0x9c, 0xcf, 0xd8 },
+ .info = .{ 0x9c, 0xcf, 0xd8 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:156 DiagnosticHint fg = groups.hint = "iris" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:48) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:16 main.iris
- .diagnostic_hint = .{ 0xc4, 0xa7, 0xe7 },
- .palette = .{
+ .hint = .{ 0xc4, 0xa7, 0xe7 },
+ .ansi = .{
.{ 0x26, 0x23, 0x3a }, // 0: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1191 vim.g.terminal_color_0 = palette.overlay -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:7 main.overlay
.{ 0xeb, 0x6f, 0x92 }, // 1: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1193 vim.g.terminal_color_1 = palette.love -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:11 main.love
.{ 0x31, 0x74, 0x8f }, // 2: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1195 vim.g.terminal_color_2 = palette.pine -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:14 main.pine
diff --git a/core/themes/rose_pine_dawn.zig b/core/themes/rose_pine_dawn.zig
index 304df52b..04bc7828 100644
--- a/core/themes/rose_pine_dawn.zig
+++ b/core/themes/rose_pine_dawn.zig
@@ -27,63 +27,70 @@
//! git 'changed' colour (also GitSignsChange/SignChange). keyword: Keyword =
//! pine exists directly (Statement is also pine). constant: Constant gold;
//! Boolean differs (rose).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #fdf8f1 -> #eee9e2: 1.03:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - focused tag ground #e2ddde -> #d6d1ca: 1.11:1 off the tag, now 1.26:1 (R4, H: a focus step off the tag, and the loudest)
+//! - focused grip #d7827e -> #af5e5b: 1.87:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - unsaved grip #ea9d34 -> #a56800: 1.86:1 on the tag, now 3.80:1 (R6: 3:1 on both tags)
+//! - selection #eae2e3 -> #e7d9d3: 1.17:1 off the page, now 1.26:1 (R7)
+//! - search hit #f7e3c8 -> #fabe78: 1.15:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #b4637a -> #a7576e: 3.84:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #ea9d34 -> #9e6300: 2.05:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - info #56949f -> #3b7984: 3.14:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #907aa9 -> #7d6795: 3.47:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "rose_pine_dawn",
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:111 Normal bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:45 dawn.base
- .bg = .{ 0xfa, 0xf4, 0xed },
+ .page = .{ 0xfa, 0xf4, 0xed },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:111 Normal fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:50 dawn.text
- .fg = .{ 0x46, 0x42, 0x61 },
+ .text = .{ 0x46, 0x42, 0x61 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:146 Visual bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:56 dawn.iris, blend = 15 -> composited over palette.base #faf4ed at alpha 0.15 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #eae2e3
- .sel_bg = .{ 0xea, 0xe2, 0xe3 },
+ .selection = .{ 0xea, 0xe2, 0xe3 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x46, 0x42, 0x61 },
+ .selection_text = .{ 0x46, 0x42, 0x61 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:137 StatusLineNC bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:46 dawn.surface, blend = 60 -> composited over palette.base #faf4ed at alpha 0.60 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #fdf8f1
- .tag_bg = .{ 0xfd, 0xf8, 0xf1 },
+ .tag = .{ 0xfd, 0xf8, 0xf1 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:137 StatusLineNC fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:48 dawn.muted #9893a5, adjusted
- .tag_fg = .{ 0x74, 0x70, 0x7d },
+ .tag_text = .{ 0x74, 0x70, 0x7d },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:136 StatusLine bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:46 dawn.surface #fffaf3, adjusted
- .tag_active_bg = .{ 0xe2, 0xdd, 0xde },
+ .tag_focus = .{ 0xe2, 0xdd, 0xde },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:136 StatusLine fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:49 dawn.subtle #797593, adjusted
- .tag_active_fg = .{ 0x61, 0x5e, 0x76 },
+ .tag_focus_text = .{ 0x61, 0x5e, 0x76 },
// the focused grip: ~/05-genizah/rose-pine-neovim/lua/lualine/themes/rose-pine.lua:11 lualine theme normal.a bg = p.rose -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:53 dawn.rose
- .box = .{ 0xd7, 0x82, 0x7e },
- // derived: the grip at rest, the accent #d7827e faded toward the unfocused tag #fdf8f1 as far as 1.6:1 off it (0.52 of the way)
- .box_dim = .{ 0xe9, 0xbb, 0xb5 },
+ .accent = .{ 0xd7, 0x82, 0x7e },
// an unsaved grip: the original's warning colour, ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:159 DiagnosticWarn fg = groups.warn = "gold" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:51) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:52 dawn.gold
- .box_dirty = .{ 0xea, 0x9d, 0x34 },
+ .dirty = .{ 0xea, 0x9d, 0x34 },
// derived: the column grip, the original's type colour, ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:223 Type fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:55 dawn.foam
- .column_box = .{ 0x56, 0x94, 0x9f },
+ .column_grip = .{ 0x56, 0x94, 0x9f },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:200 Keyword fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:54 dawn.pine
- .kw = .{ 0x28, 0x69, 0x83 },
+ .keyword = .{ 0x28, 0x69, 0x83 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:219 String fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:52 dawn.gold
- .str = .{ 0xea, 0x9d, 0x34 },
+ .string = .{ 0xea, 0x9d, 0x34 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:209 Number fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:52 dawn.gold
- .num = .{ 0xea, 0x9d, 0x34 },
+ .number = .{ 0xea, 0x9d, 0x34 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:188 Comment fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:49 dawn.subtle
.comment = .{ 0x79, 0x75, 0x93 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:106 LineNr fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:48 dawn.muted
- .lineno = .{ 0x98, 0x93, 0xa5 },
+ .line_number = .{ 0x98, 0x93, 0xa5 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:88 CursorLineNr fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:50 dawn.text
- .lineno_active = .{ 0x46, 0x42, 0x61 },
+ .line_number_current = .{ 0x46, 0x42, 0x61 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:120 PmenuSbar bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:46 dawn.surface
- .scroll_track = .{ 0xff, 0xfa, 0xf3 },
+ .rail = .{ 0xff, 0xfa, 0xf3 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:122 PmenuThumb bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:48 dawn.muted
- .scroll_thumb = .{ 0x98, 0x93, 0xa5 },
+ .rail_thumb = .{ 0x98, 0x93, 0xa5 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:153 WinSeparator fg = groups.border = "muted" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:43) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:48 dawn.muted
- .border = .{ 0x98, 0x93, 0xa5 },
+ .rule = .{ 0x98, 0x93, 0xa5 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:129 Search bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:52 dawn.gold, blend = 20 -> composited over palette.base #faf4ed at alpha 0.20 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #f7e3c8
- .search_bg = .{ 0xf7, 0xe3, 0xc8 },
- // ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:129 Search fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:50 dawn.text
- .search_fg = .{ 0x46, 0x42, 0x61 },
+ .hit = .{ 0xf7, 0xe3, 0xc8 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:155 DiagnosticError fg = groups.error = "love" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:47) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:51 dawn.love
- .diagnostic_error = .{ 0xb4, 0x63, 0x7a },
+ .@"error" = .{ 0xb4, 0x63, 0x7a },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:159 DiagnosticWarn fg = groups.warn = "gold" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:51) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:52 dawn.gold
- .diagnostic_warning = .{ 0xea, 0x9d, 0x34 },
+ .warning = .{ 0xea, 0x9d, 0x34 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:157 DiagnosticInfo fg = groups.info = "foam" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:49) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:55 dawn.foam
- .diagnostic_info = .{ 0x56, 0x94, 0x9f },
+ .info = .{ 0x56, 0x94, 0x9f },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:156 DiagnosticHint fg = groups.hint = "iris" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:48) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:56 dawn.iris
- .diagnostic_hint = .{ 0x90, 0x7a, 0xa9 },
- .palette = .{
+ .hint = .{ 0x90, 0x7a, 0xa9 },
+ .ansi = .{
.{ 0xf2, 0xe9, 0xe1 }, // 0: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1191 vim.g.terminal_color_0 = palette.overlay -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:47 dawn.overlay
.{ 0xb4, 0x63, 0x7a }, // 1: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1193 vim.g.terminal_color_1 = palette.love -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:51 dawn.love
.{ 0x28, 0x69, 0x83 }, // 2: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1195 vim.g.terminal_color_2 = palette.pine -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:54 dawn.pine
diff --git a/core/themes/rose_pine_moon.zig b/core/themes/rose_pine_moon.zig
index f90975f1..a730284e 100644
--- a/core/themes/rose_pine_moon.zig
+++ b/core/themes/rose_pine_moon.zig
@@ -27,63 +27,61 @@
//! git 'changed' colour (also GitSignsChange/SignChange). keyword: Keyword =
//! pine exists directly (Statement is also pine). constant: Constant gold;
//! Boolean differs (rose).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - selection #3b3551 -> #3f3468: 1.35:1 off the page, now 1.42:1 (R7)
pub const theme = .{
.name = "rose_pine_moon",
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:111 Normal bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:25 moon.base
- .bg = .{ 0x23, 0x21, 0x36 },
+ .page = .{ 0x23, 0x21, 0x36 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:111 Normal fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:30 moon.text
- .fg = .{ 0xe0, 0xde, 0xf4 },
+ .text = .{ 0xe0, 0xde, 0xf4 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:146 Visual bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:36 moon.iris, blend = 15 -> composited over palette.base #232136 at alpha 0.15 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #3b3551
- .sel_bg = .{ 0x3b, 0x35, 0x51 },
+ .selection = .{ 0x3b, 0x35, 0x51 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xe0, 0xde, 0xf4 },
+ .selection_text = .{ 0xe0, 0xde, 0xf4 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:137 StatusLineNC bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:26 moon.surface, blend = 60 -> composited over palette.base #232136 at alpha 0.60 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #27253b
- .tag_bg = .{ 0x27, 0x25, 0x3b },
+ .tag = .{ 0x27, 0x25, 0x3b },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:137 StatusLineNC fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:28 moon.muted #6e6a86, adjusted
- .tag_fg = .{ 0x91, 0x8e, 0xa3 },
+ .tag_text = .{ 0x91, 0x8e, 0xa3 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:136 StatusLine bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:26 moon.surface #2a273f, adjusted
- .tag_active_bg = .{ 0x45, 0x41, 0x5b },
+ .tag_focus = .{ 0x45, 0x41, 0x5b },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:136 StatusLine fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:29 moon.subtle #908caa, adjusted
- .tag_active_fg = .{ 0xb1, 0xaf, 0xc4 },
+ .tag_focus_text = .{ 0xb1, 0xaf, 0xc4 },
// the focused grip: ~/05-genizah/rose-pine-neovim/lua/lualine/themes/rose-pine.lua:11 lualine theme normal.a bg = p.rose -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:33 moon.rose
- .box = .{ 0xea, 0x9a, 0x97 },
- // derived: the grip at rest, the accent #ea9a97 faded toward the unfocused tag #27253b as far as 1.6:1 off it (0.26 of the way)
- .box_dim = .{ 0x5a, 0x43, 0x53 },
+ .accent = .{ 0xea, 0x9a, 0x97 },
// an unsaved grip: the original's warning colour, ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:159 DiagnosticWarn fg = groups.warn = "gold" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:51) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:32 moon.gold
- .box_dirty = .{ 0xf6, 0xc1, 0x77 },
+ .dirty = .{ 0xf6, 0xc1, 0x77 },
// derived: the column grip, the original's type colour, ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:223 Type fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:35 moon.foam
- .column_box = .{ 0x9c, 0xcf, 0xd8 },
+ .column_grip = .{ 0x9c, 0xcf, 0xd8 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:200 Keyword fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:34 moon.pine
- .kw = .{ 0x3e, 0x8f, 0xb0 },
+ .keyword = .{ 0x3e, 0x8f, 0xb0 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:219 String fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:32 moon.gold
- .str = .{ 0xf6, 0xc1, 0x77 },
+ .string = .{ 0xf6, 0xc1, 0x77 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:209 Number fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:32 moon.gold
- .num = .{ 0xf6, 0xc1, 0x77 },
+ .number = .{ 0xf6, 0xc1, 0x77 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:188 Comment fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:29 moon.subtle
.comment = .{ 0x90, 0x8c, 0xaa },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:106 LineNr fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:28 moon.muted
- .lineno = .{ 0x6e, 0x6a, 0x86 },
+ .line_number = .{ 0x6e, 0x6a, 0x86 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:88 CursorLineNr fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:30 moon.text
- .lineno_active = .{ 0xe0, 0xde, 0xf4 },
+ .line_number_current = .{ 0xe0, 0xde, 0xf4 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:120 PmenuSbar bg = groups.panel = "surface" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:45) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:26 moon.surface
- .scroll_track = .{ 0x2a, 0x27, 0x3f },
+ .rail = .{ 0x2a, 0x27, 0x3f },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:122 PmenuThumb bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:28 moon.muted
- .scroll_thumb = .{ 0x6e, 0x6a, 0x86 },
+ .rail_thumb = .{ 0x6e, 0x6a, 0x86 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:153 WinSeparator fg = groups.border = "muted" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:43) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:28 moon.muted
- .border = .{ 0x6e, 0x6a, 0x86 },
+ .rule = .{ 0x6e, 0x6a, 0x86 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:129 Search bg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:32 moon.gold, blend = 20 -> composited over palette.base #232136 at alpha 0.20 by utilities.blend (~/05-genizah/rose-pine-neovim/lua/rose-pine/utilities.lua:55, called at ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1176) = #4d4143
- .search_bg = .{ 0x4d, 0x41, 0x43 },
- // ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:129 Search fg = ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:30 moon.text
- .search_fg = .{ 0xe0, 0xde, 0xf4 },
+ .hit = .{ 0x4d, 0x41, 0x43 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:155 DiagnosticError fg = groups.error = "love" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:47) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:31 moon.love
- .diagnostic_error = .{ 0xeb, 0x6f, 0x92 },
+ .@"error" = .{ 0xeb, 0x6f, 0x92 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:159 DiagnosticWarn fg = groups.warn = "gold" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:51) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:32 moon.gold
- .diagnostic_warning = .{ 0xf6, 0xc1, 0x77 },
+ .warning = .{ 0xf6, 0xc1, 0x77 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:157 DiagnosticInfo fg = groups.info = "foam" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:49) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:35 moon.foam
- .diagnostic_info = .{ 0x9c, 0xcf, 0xd8 },
+ .info = .{ 0x9c, 0xcf, 0xd8 },
// ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:156 DiagnosticHint fg = groups.hint = "iris" (~/05-genizah/rose-pine-neovim/lua/rose-pine/config.lua:48) -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:36 moon.iris
- .diagnostic_hint = .{ 0xc4, 0xa7, 0xe7 },
- .palette = .{
+ .hint = .{ 0xc4, 0xa7, 0xe7 },
+ .ansi = .{
.{ 0x39, 0x35, 0x52 }, // 0: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1191 vim.g.terminal_color_0 = palette.overlay -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:27 moon.overlay
.{ 0xeb, 0x6f, 0x92 }, // 1: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1193 vim.g.terminal_color_1 = palette.love -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:31 moon.love
.{ 0x3e, 0x8f, 0xb0 }, // 2: ~/05-genizah/rose-pine-neovim/lua/rose-pine.lua:1195 vim.g.terminal_color_2 = palette.pine -> ~/05-genizah/rose-pine-neovim/lua/rose-pine/palette.lua:34 moon.pine
diff --git a/core/themes/rosebones_dark.zig b/core/themes/rosebones_dark.zig
index bd3ae169..0954e615 100644
--- a/core/themes/rosebones_dark.zig
+++ b/core/themes/rosebones_dark.zig
@@ -16,63 +16,61 @@
//! only), so it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #5d5978 -> #8c88aa: 1.53:1 on the focused tag, now 3.01:1 (R6: 3:1)
pub const theme = .{
.name = "rosebones_dark",
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:33 Normal guibg
- .bg = .{ 0x1a, 0x18, 0x25 },
+ .page = .{ 0x1a, 0x18, 0x25 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:33 Normal guifg
- .fg = .{ 0xe1, 0xd4, 0xd4 },
+ .text = .{ 0xe1, 0xd4, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:211 Visual guibg
- .sel_bg = .{ 0x52, 0x3a, 0x39 },
+ .selection = .{ 0x52, 0x3a, 0x39 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xe1, 0xd4, 0xd4 },
+ .selection_text = .{ 0xe1, 0xd4, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:198 StatusLineNC guibg
- .tag_bg = .{ 0x24, 0x22, 0x32 },
+ .tag = .{ 0x24, 0x22, 0x32 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:198 StatusLineNC guifg
- .tag_fg = .{ 0xe9, 0xe0, 0xe0 },
+ .tag_text = .{ 0xe9, 0xe0, 0xe0 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:195 StatusLine guibg #312e43, adjusted
- .tag_active_bg = .{ 0x42, 0x3e, 0x59 },
+ .tag_focus = .{ 0x42, 0x3e, 0x59 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:195 StatusLine guifg
- .tag_active_fg = .{ 0xe1, 0xd4, 0xd4 },
+ .tag_focus_text = .{ 0xe1, 0xd4, 0xd4 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/rosebones_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x5d, 0x59, 0x78 },
- // derived: the grip at rest, the accent #534e6f faded toward the unfocused tag #242232 as far as 1.6:1 off it (0.72 of the way)
- .box_dim = .{ 0x46, 0x42, 0x5e },
+ .accent = .{ 0x5d, 0x59, 0x78 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/rosebones.vim:41 Changed guifg
- .box_dirty = .{ 0x9c, 0xcf, 0xd8 },
+ .dirty = .{ 0x9c, 0xcf, 0xd8 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/rosebones.vim:207 Type guifg
- .column_box = .{ 0xdf, 0xde, 0xf1 },
+ .column_grip = .{ 0xdf, 0xde, 0xf1 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:191 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x31, 0x74, 0x90 },
+ .keyword = .{ 0x31, 0x74, 0x90 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:201 String guifg
- .str = .{ 0xbc, 0x94, 0x93 },
+ .string = .{ 0xbc, 0x94, 0x93 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:164 Number guifg
- .num = .{ 0xbc, 0x94, 0x93 },
+ .number = .{ 0xbc, 0x94, 0x93 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:47 Comment guifg
.comment = .{ 0x69, 0x65, 0x7e },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:150 LineNr guifg
- .lineno = .{ 0x62, 0x5d, 0x7f },
+ .line_number = .{ 0x62, 0x5d, 0x7f },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:62 CursorLineNr guifg
- .lineno_active = .{ 0xe1, 0xd4, 0xd4 },
+ .line_number_current = .{ 0xe1, 0xd4, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:167 PmenuSbar guibg
- .scroll_track = .{ 0x5a, 0x55, 0x78 },
+ .rail = .{ 0x5a, 0x55, 0x78 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:169 PmenuThumb guibg
- .scroll_thumb = .{ 0x84, 0x80, 0x9d },
+ .rail_thumb = .{ 0x84, 0x80, 0x9d },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:218 WinSeparator guifg
- .border = .{ 0x62, 0x5d, 0x7f },
+ .rule = .{ 0x62, 0x5d, 0x7f },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:172 Search guibg
- .search_bg = .{ 0x67, 0x35, 0x92 },
- // ~/05-genizah/zenbones.nvim/colors/rosebones.vim:172 Search guifg
- .search_fg = .{ 0xe1, 0xd4, 0xd4 },
+ .hit = .{ 0x67, 0x35, 0x92 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:113 Error guifg via DiagnosticError->Error (link :114)
- .diagnostic_error = .{ 0xeb, 0x71, 0x93 },
+ .@"error" = .{ 0xeb, 0x71, 0x93 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:212 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :213)
- .diagnostic_warning = .{ 0xf6, 0xc0, 0x74 },
+ .warning = .{ 0xf6, 0xc0, 0x74 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:72 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x9c, 0xcf, 0xd8 },
+ .info = .{ 0x9c, 0xcf, 0xd8 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:67 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xc4, 0xa7, 0xe7 },
- .palette = .{
+ .hint = .{ 0xc4, 0xa7, 0xe7 },
+ .ansi = .{
.{ 0x1a, 0x18, 0x25 }, // 0: ~/05-genizah/zenbones.nvim/colors/rosebones.vim:17 g:terminal_color_0
.{ 0xeb, 0x71, 0x93 }, // 1: ~/05-genizah/zenbones.nvim/colors/rosebones.vim:18 g:terminal_color_1
.{ 0x31, 0x74, 0x90 }, // 2: ~/05-genizah/zenbones.nvim/colors/rosebones.vim:19 g:terminal_color_2
diff --git a/core/themes/rosebones_light.zig b/core/themes/rosebones_light.zig
index 314424a6..0d8b4fa0 100644
--- a/core/themes/rosebones_light.zig
+++ b/core/themes/rosebones_light.zig
@@ -17,63 +17,67 @@
//! only), so it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #bea174 -> #896e42: 1.54:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - unsaved grip #5795a0 -> #3d7b86: 2.69:1 on the tag, now 3.82:1 (R6: 3:1 on both tags)
+//! - selection #eadddc -> #ecdad3: 1.23:1 off the page, now 1.26:1 (R7)
+//! - error #b5637a -> #a9586f: 3.88:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #ec9d33 -> #a16400: 2.07:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
+//! - info #5795a0 -> #3c7a85: 3.15:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #917ba9 -> #7e6995: 3.48:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "rosebones_light",
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:267 Normal guibg
- .bg = .{ 0xfb, 0xf6, 0xf0 },
+ .page = .{ 0xfb, 0xf6, 0xf0 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:267 Normal guifg
- .fg = .{ 0x72, 0x43, 0x41 },
+ .text = .{ 0x72, 0x43, 0x41 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:445 Visual guibg
- .sel_bg = .{ 0xea, 0xdd, 0xdc },
+ .selection = .{ 0xea, 0xdd, 0xdc },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x72, 0x43, 0x41 },
+ .selection_text = .{ 0x72, 0x43, 0x41 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:432 StatusLineNC guibg
- .tag_bg = .{ 0xf3, 0xe3, 0xcf },
+ .tag = .{ 0xf3, 0xe3, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:432 StatusLineNC guifg #ae6966, adjusted
- .tag_fg = .{ 0x8f, 0x56, 0x54 },
+ .tag_text = .{ 0x8f, 0x56, 0x54 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:429 StatusLine guibg #ecd0a9, adjusted
- .tag_active_bg = .{ 0xe9, 0xc8, 0x9a },
+ .tag_focus = .{ 0xe9, 0xc8, 0x9a },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:429 StatusLine guifg
- .tag_active_fg = .{ 0x72, 0x43, 0x41 },
+ .tag_focus_text = .{ 0x72, 0x43, 0x41 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/rosebones_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0xbe, 0xa1, 0x74 },
- // derived: the grip at rest, the accent #ceaf7e faded toward the unfocused tag #f3e3cf as far as 1.6:1 off it (0.96 of the way)
- .box_dim = .{ 0xcf, 0xb1, 0x81 },
+ .accent = .{ 0xbe, 0xa1, 0x74 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/rosebones.vim:275 Changed guifg
- .box_dirty = .{ 0x57, 0x95, 0xa0 },
+ .dirty = .{ 0x57, 0x95, 0xa0 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/rosebones.vim:441 Type guifg
- .column_box = .{ 0x57, 0x52, 0x7a },
+ .column_grip = .{ 0x57, 0x52, 0x7a },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:425 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x28, 0x6a, 0x84 },
+ .keyword = .{ 0x28, 0x6a, 0x84 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:435 String guifg
- .str = .{ 0xab, 0x67, 0x63 },
+ .string = .{ 0xab, 0x67, 0x63 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:398 Number guifg
- .num = .{ 0xab, 0x67, 0x63 },
+ .number = .{ 0xab, 0x67, 0x63 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:281 Comment guifg
.comment = .{ 0xa1, 0x8e, 0x72 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:384 LineNr guifg
- .lineno = .{ 0xb6, 0x9a, 0x6e },
+ .line_number = .{ 0xb6, 0x9a, 0x6e },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:296 CursorLineNr guifg
- .lineno_active = .{ 0x72, 0x43, 0x41 },
+ .line_number_current = .{ 0x72, 0x43, 0x41 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:401 PmenuSbar guibg
- .scroll_track = .{ 0xc5, 0xa7, 0x78 },
+ .rail = .{ 0xc5, 0xa7, 0x78 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:403 PmenuThumb guibg
- .scroll_thumb = .{ 0xfe, 0xfc, 0xfa },
+ .rail_thumb = .{ 0xfe, 0xfc, 0xfa },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:452 WinSeparator guifg
- .border = .{ 0xb6, 0x9a, 0x6e },
+ .rule = .{ 0xb6, 0x9a, 0x6e },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:406 Search guibg
- .search_bg = .{ 0xd1, 0xc9, 0xdc },
- // ~/05-genizah/zenbones.nvim/colors/rosebones.vim:406 Search guifg
- .search_fg = .{ 0x72, 0x43, 0x41 },
+ .hit = .{ 0xd1, 0xc9, 0xdc },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:347 Error guifg via DiagnosticError->Error (link :348)
- .diagnostic_error = .{ 0xb5, 0x63, 0x7a },
+ .@"error" = .{ 0xb5, 0x63, 0x7a },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:446 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :447)
- .diagnostic_warning = .{ 0xec, 0x9d, 0x33 },
+ .warning = .{ 0xec, 0x9d, 0x33 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:306 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x57, 0x95, 0xa0 },
+ .info = .{ 0x57, 0x95, 0xa0 },
// ~/05-genizah/zenbones.nvim/colors/rosebones.vim:301 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x91, 0x7b, 0xa9 },
- .palette = .{
+ .hint = .{ 0x91, 0x7b, 0xa9 },
+ .ansi = .{
.{ 0xfb, 0xf6, 0xf0 }, // 0: ~/05-genizah/zenbones.nvim/colors/rosebones.vim:251 g:terminal_color_0
.{ 0xb5, 0x63, 0x7a }, // 1: ~/05-genizah/zenbones.nvim/colors/rosebones.vim:252 g:terminal_color_1
.{ 0x28, 0x6a, 0x84 }, // 2: ~/05-genizah/zenbones.nvim/colors/rosebones.vim:253 g:terminal_color_2
diff --git a/core/themes/seoul256.zig b/core/themes/seoul256.zig
index d51ec310..5940d485 100644
--- a/core/themes/seoul256.zig
+++ b/core/themes/seoul256.zig
@@ -1,7 +1,8 @@
//! Seoul256 (junegunn/seoul256.vim), as close to the original as pardes
-//! can draw it: its dark style at each of its backgrounds 233 to 239 and its
-//! light one at 252 to 256, a theme each (`dark`, `light`; colors.zig rings
-//! them as seoul256_<style>_<level>). Every value is the original's own,
+//! can draw it: its dark style at each of its backgrounds 233 to 237 and its
+//! light one at 254 to 256, a theme each (`dark`, `light`; colors.zig rings
+//! them as seoul256_<style>_<level>; 238, 239, 252 and 253 retired, DESIGN.md
+//! E: their text leaves the hits no room). Every value is the original's own,
//! cited on its line (path:line key), once for the family: a value every
//! level shares where it is set below, one a level changes in that level's
//! row of `dark_levels` or `light_levels`, with what pardes adjusted there.
@@ -35,164 +36,151 @@
//! so, its tabline_fg or tabline_bg role lands on an xterm index missing
//! from the default s:rgb_map, so Vim emits gui*=NONE and it inherits
//! Normal (given as such).
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - dark_233: focused tag ground #9a7372 -> #4e4d4e: 3.08:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest)
+//! - dark_233: focused grip #006a6c -> #55a8aa: 1.31:1 on the focused tag, now 3.03:1 (R6: 3:1)
+//! - dark_233, dark_234, dark_235, dark_236, dark_237: selection text #d9d9d9 -> #e3e3e3: 4.12:1 on the selection, now 4.53:1 (R7: 4.5:1)
+//! - dark_233: search hit #007299 -> #582929: 3.30:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - dark_233: error #e12672 -> #eb337a: 4.03:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - dark_234: focused tag ground #9a7372 -> #595959: 2.54:1 off the tag, now 1.50:1 (R4, H: a focus step off the tag, and the loudest)
+//! - dark_234: focused grip #006a6c -> #64b7b8: 1.09:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - dark_234: unsaved grip #719cdf -> #80acf0: 3.77:1 on the tag, now 4.55:1 (R6: 3:1 on both tags)
+//! - dark_234: search hit #007299 -> #643333: 2.82:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - dark_234: error #e12672 -> #fa4386: 3.45:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - dark_235: focused tag ground #9a7372 -> #666666: 2.11:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest)
+//! - dark_235: focused grip #006a6c -> #76c9ca: 1.12:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - dark_235: unsaved grip #719cdf -> #94befe: 3.13:1 on the tag, now 4.59:1 (R6: 3:1 on both tags)
+//! - dark_235: search hit #007299 -> #723f3f: 2.35:1 off the page, now 1.52:1 (R8: 1.5:1, the text reading on it)
+//! - dark_235: error #e12672 -> #ff6395: 2.87:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - dark_236: focused tag ground #9a7372 -> #717171: 1.77:1 off the tag, now 1.50:1 (R4, H: a focus step off the tag, and the loudest)
+//! - dark_236: focused grip #006a6c -> #86d9da: 1.31:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - dark_236: unsaved grip #719cdf -> #adcdfe: 2.63:1 on the tag, now 4.52:1 (R6: 3:1 on both tags)
+//! - dark_236: search hit #007299 -> #7e4b4a: 1.94:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
+//! - dark_236: error #e12672 -> #ff82a5: 2.37:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - dark_237: tag ground #616161 -> #545454: 1.41:1 off the page, now 1.15:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - dark_237: focused tag ground #9d7473 -> #6f6f6f: 1.87:1 off the tag, now 1.51:1 (R4, H: a focus step off the tag, and the loudest)
+//! - dark_237: focused grip #006c6e -> #82d6d8: 1.24:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - dark_237: unsaved grip #719cdf -> #a8cafe: 2.71:1 on the tag, now 4.52:1 (R6: 3:1 on both tags)
+//! - dark_237: search hit #007299 -> #7a5932: 1.61:1 off the page, now 1.37:1 (R8: 1.5:1, the text reading on it)
+//! - dark_237: error #e12672 -> #fe9fb7: 1.96:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - dark_237: warning #e09b99 -> #deb565: 3.87:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - light_254, light_255, light_256: focused grip #4b6465 -> #213839: 1.53:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - light_254: unsaved grip #719cdf -> #0b326c: 1.98:1 on the tag, now 8.82:1 (R6: 3:1 on both tags)
+//! - light_254: selection #bcdede -> #b7d8d8: 1.18:1 off the page, now 1.25:1 (R7)
+//! - light_254: selection text #616161 -> #5a5a5a: 4.08:1 on the selection, now 4.54:1 (R7: 4.5:1)
+//! - light_254: error #e12672 -> #cf0064: 3.66:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - light_254: warning #be7572 -> #9b5553: 2.89:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - light_255: unsaved grip #719cdf -> #0b326c: 2.13:1 on the tag, now 9.52:1 (R6: 3:1 on both tags)
+//! - light_255, light_256: selection text #616161 -> #5e5e5e: 4.32:1 on the selection, now 4.52:1 (R7: 4.5:1)
+//! - light_255: error #e12672 -> #d51169: 3.94:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - light_255: warning #be7572 -> #a05a58: 3.11:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - light_256: unsaved grip #719cdf -> #0b326c: 2.30:1 on the tag, now 10.25:1 (R6: 3:1 on both tags)
+//! - light_256: error #e12672 -> #df2471: 4.45:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - light_256: warning #be7572 -> #aa6361: 3.51:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
const std = @import("std");
/// What a dark level changes; each row cites where its values come from.
const Dark = struct {
level: u16,
- bg: [3]u8,
- tag_bg: [3]u8,
- tag_fg: [3]u8,
- tag_active_bg: [3]u8,
- tag_active_fg: [3]u8,
- box: [3]u8,
- box_dim: [3]u8,
- border: [3]u8,
+ page: [3]u8,
+ tag: [3]u8,
+ tag_text: [3]u8,
+ tag_focus: [3]u8,
+ tag_focus_text: [3]u8,
+ accent: [3]u8,
+ rule: [3]u8,
};
const dark_levels = [_]Dark{
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 233 -> s:rgb_map[233] S:132
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 235 -> s:rgb_map[235] S:132
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #333233 as far as 1.6:1 off it (0.66 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 16 -> s:rgb_map[16] S:120 #000000, adjusted
+ // page: S:206 Normal guibg = s:hi arg s:dark_bg = 233 -> s:rgb_map[233] S:132
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 235 -> s:rgb_map[235] S:132
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
+ // tag_focus: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
+ // rule: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 16 -> s:rgb_map[16] S:120 #000000, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #007173 -> #006a6c: 1.40:1 on the focused tag #9a7372
// adjusted: rules between panes #000000 -> #3d3d3d: 1.17:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 233, .bg = .{ 0x17, 0x17, 0x17 }, .tag_bg = .{ 0x33, 0x32, 0x33 }, .tag_fg = .{ 0xdf, 0xde, 0xbd }, .tag_active_bg = .{ 0x9a, 0x73, 0x72 }, .tag_active_fg = .{ 0x12, 0x12, 0x0f }, .box = .{ 0x00, 0x6a, 0x6c }, .box_dim = .{ 0x11, 0x5c, 0x5d }, .border = .{ 0x3d, 0x3d, 0x3d } },
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 234 -> s:rgb_map[234] S:132
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 236 -> s:rgb_map[236] S:132
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #3f3f3f as far as 1.6:1 off it (0.84 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 232 -> s:rgb_map[232] S:131 #060606, adjusted
+ .{ .level = 233, .page = .{ 0x17, 0x17, 0x17 }, .tag = .{ 0x33, 0x32, 0x33 }, .tag_text = .{ 0xdf, 0xde, 0xbd }, .tag_focus = .{ 0x9a, 0x73, 0x72 }, .tag_focus_text = .{ 0x12, 0x12, 0x0f }, .accent = .{ 0x00, 0x6a, 0x6c }, .rule = .{ 0x3d, 0x3d, 0x3d } },
+ // page: S:206 Normal guibg = s:hi arg s:dark_bg = 234 -> s:rgb_map[234] S:132
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 236 -> s:rgb_map[236] S:132
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
+ // tag_focus: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
+ // rule: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 232 -> s:rgb_map[232] S:131 #060606, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #007173 -> #006a6c: 1.40:1 on the focused tag #9a7372
// adjusted: rules between panes #060606 -> #4a4a4a: 1.32:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 234, .bg = .{ 0x25, 0x25, 0x25 }, .tag_bg = .{ 0x3f, 0x3f, 0x3f }, .tag_fg = .{ 0xdf, 0xde, 0xbd }, .tag_active_bg = .{ 0x9a, 0x73, 0x72 }, .tag_active_fg = .{ 0x12, 0x12, 0x0f }, .box = .{ 0x00, 0x6a, 0x6c }, .box_dim = .{ 0x0a, 0x69, 0x6b }, .border = .{ 0x4a, 0x4a, 0x4a } },
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 235 -> s:rgb_map[235] S:132
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 237 -> s:rgb_map[237] S:132
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #4b4b4b as far as 1.6:1 off it (1.00 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 233 -> s:rgb_map[233] S:132 #171717, adjusted
+ .{ .level = 234, .page = .{ 0x25, 0x25, 0x25 }, .tag = .{ 0x3f, 0x3f, 0x3f }, .tag_text = .{ 0xdf, 0xde, 0xbd }, .tag_focus = .{ 0x9a, 0x73, 0x72 }, .tag_focus_text = .{ 0x12, 0x12, 0x0f }, .accent = .{ 0x00, 0x6a, 0x6c }, .rule = .{ 0x4a, 0x4a, 0x4a } },
+ // page: S:206 Normal guibg = s:hi arg s:dark_bg = 235 -> s:rgb_map[235] S:132
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 237 -> s:rgb_map[237] S:132
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
+ // tag_focus: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
+ // rule: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 233 -> s:rgb_map[233] S:132 #171717, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #007173 -> #006a6c: 1.40:1 on the focused tag #9a7372
// adjusted: rules between panes #171717 -> #515151: 1.40:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 235, .bg = .{ 0x33, 0x32, 0x33 }, .tag_bg = .{ 0x4b, 0x4b, 0x4b }, .tag_fg = .{ 0xdf, 0xde, 0xbd }, .tag_active_bg = .{ 0x9a, 0x73, 0x72 }, .tag_active_fg = .{ 0x12, 0x12, 0x0f }, .box = .{ 0x00, 0x6a, 0x6c }, .box_dim = .{ 0x0a, 0x77, 0x79 }, .border = .{ 0x51, 0x51, 0x51 } },
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 236 -> s:rgb_map[236] S:132
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 238 -> s:rgb_map[238] S:133
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #565656 as far as 1.6:1 off it (1.00 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 234 -> s:rgb_map[234] S:132 #252525, adjusted
+ .{ .level = 235, .page = .{ 0x33, 0x32, 0x33 }, .tag = .{ 0x4b, 0x4b, 0x4b }, .tag_text = .{ 0xdf, 0xde, 0xbd }, .tag_focus = .{ 0x9a, 0x73, 0x72 }, .tag_focus_text = .{ 0x12, 0x12, 0x0f }, .accent = .{ 0x00, 0x6a, 0x6c }, .rule = .{ 0x51, 0x51, 0x51 } },
+ // page: S:206 Normal guibg = s:hi arg s:dark_bg = 236 -> s:rgb_map[236] S:132
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 238 -> s:rgb_map[238] S:133
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
+ // tag_focus: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
+ // rule: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 234 -> s:rgb_map[234] S:132 #252525, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #007173 -> #006a6c: 1.40:1 on the focused tag #9a7372
// adjusted: rules between panes #252525 -> #5f5f5f: 1.46:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 236, .bg = .{ 0x3f, 0x3f, 0x3f }, .tag_bg = .{ 0x56, 0x56, 0x56 }, .tag_fg = .{ 0xdf, 0xde, 0xbd }, .tag_active_bg = .{ 0x9a, 0x73, 0x72 }, .tag_active_fg = .{ 0x12, 0x12, 0x0f }, .box = .{ 0x00, 0x6a, 0x6c }, .box_dim = .{ 0x24, 0x85, 0x87 }, .border = .{ 0x5f, 0x5f, 0x5f } },
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 237 -> s:rgb_map[237] S:132
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 239 -> s:rgb_map[239] S:133
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124 #9a7372, adjusted
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #616161 as far as 1.6:1 off it (1.00 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 235 -> s:rgb_map[235] S:132 #333233, adjusted
+ .{ .level = 236, .page = .{ 0x3f, 0x3f, 0x3f }, .tag = .{ 0x56, 0x56, 0x56 }, .tag_text = .{ 0xdf, 0xde, 0xbd }, .tag_focus = .{ 0x9a, 0x73, 0x72 }, .tag_focus_text = .{ 0x12, 0x12, 0x0f }, .accent = .{ 0x00, 0x6a, 0x6c }, .rule = .{ 0x5f, 0x5f, 0x5f } },
+ // page: S:206 Normal guibg = s:hi arg s:dark_bg = 237 -> s:rgb_map[237] S:132
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 239 -> s:rgb_map[239] S:133
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129
+ // tag_focus: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124 #9a7372, adjusted
+ // rule: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 235 -> s:rgb_map[235] S:132 #333233, adjusted
// adjusted: focused tag ground #9a7372 -> #9d7473: 1.50:1 off the unfocused #616161, pardes needs 1.5:1 on a dark page
// adjusted: focused tag text #dfdebd -> #12120f: 2.96:1 on #9d7473, tag text needs 4.5:1
// adjusted: focused grip #007173 -> #006c6e: 1.43:1 on the focused tag #9d7473
// adjusted: rules between panes #333233 -> #6b6b6b: 1.46:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
- .{ .level = 237, .bg = .{ 0x4b, 0x4b, 0x4b }, .tag_bg = .{ 0x61, 0x61, 0x61 }, .tag_fg = .{ 0xdf, 0xde, 0xbd }, .tag_active_bg = .{ 0x9d, 0x74, 0x73 }, .tag_active_fg = .{ 0x12, 0x12, 0x0f }, .box = .{ 0x00, 0x6c, 0x6e }, .box_dim = .{ 0x38, 0x90, 0x92 }, .border = .{ 0x6b, 0x6b, 0x6b } },
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 238 -> s:rgb_map[238] S:133
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 240 -> s:rgb_map[240] S:133
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129 #dfdebd, adjusted
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124 #9a7372, adjusted
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #6b6b6b as far as 1.6:1 off it (1.00 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 236 -> s:rgb_map[236] S:132 #3f3f3f, adjusted
- // adjusted: focused tag ground #9a7372 -> #b97877: 1.29:1 off the unfocused #6b6b6b, pardes needs 1.5:1 on a dark page
- // adjusted: unfocused tag text #dfdebd -> #eeeddb: 3.89:1 on #6b6b6b, tag text needs 4.5:1 to be read and run
- // adjusted: focused tag text #dfdebd -> #1f1f1a: 2.55:1 on #b97877, tag text needs 4.5:1
- // adjusted: rules between panes #3f3f3f -> #767676: 1.43:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
- // index gap: tabline_bg inherits Normal
- .{ .level = 238, .bg = .{ 0x56, 0x56, 0x56 }, .tag_bg = .{ 0x6b, 0x6b, 0x6b }, .tag_fg = .{ 0xee, 0xed, 0xdb }, .tag_active_bg = .{ 0xb9, 0x78, 0x77 }, .tag_active_fg = .{ 0x1f, 0x1f, 0x1a }, .box = .{ 0x00, 0x71, 0x73 }, .box_dim = .{ 0x4d, 0x9c, 0x9d }, .border = .{ 0x76, 0x76, 0x76 } },
- // bg: S:206 Normal guibg = s:hi arg s:dark_bg = 239 -> s:rgb_map[239] S:133
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 241 -> s:rgb_map[241] S:133
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129 #dfdebd, adjusted
- // tag_active_bg: S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124 #9a7372, adjusted
- // box_dim: derived: the grip at rest, the accent #007173 faded toward the unfocused tag #757575 as far as 1.6:1 off it (1.00 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:dark_bg_2 = 237 -> s:rgb_map[237] S:132 #4b4b4b, adjusted
- // adjusted: focused tag ground #9a7372 -> #ac8f86: 1.11:1 off the unfocused #757575, pardes needs 1.5:1 on a dark page
- // adjusted: unfocused tag text #dfdebd -> #fdfdfb: 3.36:1 on #757575, tag text needs 4.5:1 to be read and run
- // adjusted: focused tag text #dfdebd -> #2d2c26: 2.18:1 on #ac8f86, tag text needs 4.5:1
- // adjusted: rules between panes #4b4b4b -> #848484: 1.41:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
- // index gap: tabline_bg inherits Normal
- .{ .level = 239, .bg = .{ 0x61, 0x61, 0x61 }, .tag_bg = .{ 0x75, 0x75, 0x75 }, .tag_fg = .{ 0xfd, 0xfd, 0xfb }, .tag_active_bg = .{ 0xac, 0x8f, 0x86 }, .tag_active_fg = .{ 0x2d, 0x2c, 0x26 }, .box = .{ 0x00, 0x71, 0x73 }, .box_dim = .{ 0x61, 0xa7, 0xa8 }, .border = .{ 0x84, 0x84, 0x84 } },
+ .{ .level = 237, .page = .{ 0x4b, 0x4b, 0x4b }, .tag = .{ 0x61, 0x61, 0x61 }, .tag_text = .{ 0xdf, 0xde, 0xbd }, .tag_focus = .{ 0x9d, 0x74, 0x73 }, .tag_focus_text = .{ 0x12, 0x12, 0x0f }, .accent = .{ 0x00, 0x6c, 0x6e }, .rule = .{ 0x6b, 0x6b, 0x6b } },
};
/// What a light level changes; each row cites where its values come from.
const Light = struct {
level: u16,
- bg: [3]u8,
- tag_bg: [3]u8,
- tag_fg: [3]u8,
- box_dim: [3]u8,
- border: [3]u8,
+ page: [3]u8,
+ tag: [3]u8,
+ tag_text: [3]u8,
+ rule: [3]u8,
};
const light_levels = [_]Light{
- // bg: S:206 Normal guibg = s:hi arg s:light_bg = 252 -> s:rgb_map[252] S:134
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 250 -> s:rgb_map[250] S:134
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133 #565656, adjusted
- // box_dim: derived: the grip at rest, the accent #719899 faded toward the unfocused tag #c8c8c8 as far as 1.6:1 off it (0.78 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 249 -> s:rgb_map[249] S:133 #bfbfbf, adjusted
- // adjusted: unfocused tag text #565656 -> #545454: 4.39:1 on #c8c8c8, tag text needs 4.5:1 to be read and run
- // adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
- // adjusted: focused grip #719899 -> #4b6465: 1.31:1 on the focused tag #9a7372
- // adjusted: rules between panes #bfbfbf -> #acacac: 1.30:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
- // index gap: tabline_bg inherits Normal
- .{ .level = 252, .bg = .{ 0xd9, 0xd9, 0xd9 }, .tag_bg = .{ 0xc8, 0xc8, 0xc8 }, .tag_fg = .{ 0x54, 0x54, 0x54 }, .box_dim = .{ 0x84, 0xa3, 0xa3 }, .border = .{ 0xac, 0xac, 0xac } },
- // bg: S:206 Normal guibg = s:hi arg s:light_bg = 253 -> s:rgb_map[253] S:134
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 251 -> s:rgb_map[251] S:134
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
- // box_dim: derived: the grip at rest, the accent #719899 faded toward the unfocused tag #d1d0d1 as far as 1.6:1 off it (0.70 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 250 -> s:rgb_map[250] S:134 #c8c8c8, adjusted
- // adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
- // adjusted: focused grip #719899 -> #4b6465: 1.31:1 on the focused tag #9a7372
- // adjusted: rules between panes #c8c8c8 -> #b3b3b3: 1.28:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
- .{ .level = 253, .bg = .{ 0xe1, 0xe1, 0xe1 }, .tag_bg = .{ 0xd1, 0xd0, 0xd1 }, .tag_fg = .{ 0x56, 0x56, 0x56 }, .box_dim = .{ 0x8e, 0xa9, 0xaa }, .border = .{ 0xb3, 0xb3, 0xb3 } },
- // bg: S:206 Normal guibg = s:hi arg s:light_bg = 254 -> s:rgb_map[254] S:134
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 252 -> s:rgb_map[252] S:134
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
- // box_dim: derived: the grip at rest, the accent #719899 faded toward the unfocused tag #d9d9d9 as far as 1.6:1 off it (0.64 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 251 -> s:rgb_map[251] S:134 #d1d0d1, adjusted
+ // page: S:206 Normal guibg = s:hi arg s:light_bg = 254 -> s:rgb_map[254] S:134
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 252 -> s:rgb_map[252] S:134
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
+ // rule: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 251 -> s:rgb_map[251] S:134 #d1d0d1, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #719899 -> #4b6465: 1.31:1 on the focused tag #9a7372
// adjusted: rules between panes #d1d0d1 -> #b8b8b8: 1.27:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 254, .bg = .{ 0xe9, 0xe9, 0xe9 }, .tag_bg = .{ 0xd9, 0xd9, 0xd9 }, .tag_fg = .{ 0x56, 0x56, 0x56 }, .box_dim = .{ 0x96, 0xaf, 0xb0 }, .border = .{ 0xb8, 0xb8, 0xb8 } },
- // bg: S:206 Normal guibg = s:hi arg s:light_bg = 255 -> s:rgb_map[255] S:135
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 253 -> s:rgb_map[253] S:134
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
- // box_dim: derived: the grip at rest, the accent #719899 faded toward the unfocused tag #e1e1e1 as far as 1.6:1 off it (0.58 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 252 -> s:rgb_map[252] S:134 #d9d9d9, adjusted
+ .{ .level = 254, .page = .{ 0xe9, 0xe9, 0xe9 }, .tag = .{ 0xd9, 0xd9, 0xd9 }, .tag_text = .{ 0x56, 0x56, 0x56 }, .rule = .{ 0xb8, 0xb8, 0xb8 } },
+ // page: S:206 Normal guibg = s:hi arg s:light_bg = 255 -> s:rgb_map[255] S:135
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 253 -> s:rgb_map[253] S:134
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
+ // rule: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 252 -> s:rgb_map[252] S:134 #d9d9d9, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #719899 -> #4b6465: 1.31:1 on the focused tag #9a7372
// adjusted: rules between panes #d9d9d9 -> #bfbfbf: 1.25:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 255, .bg = .{ 0xf1, 0xf1, 0xf1 }, .tag_bg = .{ 0xe1, 0xe1, 0xe1 }, .tag_fg = .{ 0x56, 0x56, 0x56 }, .box_dim = .{ 0xa0, 0xb7, 0xb7 }, .border = .{ 0xbf, 0xbf, 0xbf } },
- // bg: S:206 Normal guibg = s:hi arg s:light_bg = 256 (256>255 -> 231 per S:184-185) -> s:rgb_map[231] S:131
- // tag_bg: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 254 -> s:rgb_map[254] S:134
- // tag_fg: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
- // box_dim: derived: the grip at rest, the accent #719899 faded toward the unfocused tag #e9e9e9 as far as 1.6:1 off it (0.54 of the way)
- // border: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 253 -> s:rgb_map[253] S:134 #e1e1e1, adjusted
+ .{ .level = 255, .page = .{ 0xf1, 0xf1, 0xf1 }, .tag = .{ 0xe1, 0xe1, 0xe1 }, .tag_text = .{ 0x56, 0x56, 0x56 }, .rule = .{ 0xbf, 0xbf, 0xbf } },
+ // page: S:206 Normal guibg = s:hi arg s:light_bg = 256 (256>255 -> 231 per S:184-185) -> s:rgb_map[231] S:131
+ // tag: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 254 -> s:rgb_map[254] S:134
+ // tag_text: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133
+ // rule: S:287 VertSplit guifg = s:hi arg s:light_bg - 3 = 253 -> s:rgb_map[253] S:134 #e1e1e1, adjusted
// adjusted: focused tag text #dfdebd -> #12120f: 3.02:1 on #9a7372, tag text needs 4.5:1
// adjusted: focused grip #719899 -> #4b6465: 1.31:1 on the focused tag #9a7372
// adjusted: rules between panes #e1e1e1 -> #cacaca: 1.31:1 off the page, lifted toward the text to 1.6:1 (as colors.zig separatorOf does)
// index gap: tabline_fg inherits Normal
- .{ .level = 256, .bg = .{ 0xff, 0xff, 0xff }, .tag_bg = .{ 0xe9, 0xe9, 0xe9 }, .tag_fg = .{ 0x56, 0x56, 0x56 }, .box_dim = .{ 0xa8, 0xbd, 0xbe }, .border = .{ 0xca, 0xca, 0xca } },
+ .{ .level = 256, .page = .{ 0xff, 0xff, 0xff }, .tag = .{ 0xe9, 0xe9, 0xe9 }, .tag_text = .{ 0x56, 0x56, 0x56 }, .rule = .{ 0xca, 0xca, 0xca } },
};
/// The dark style at background `level` (233 to 239).
@@ -204,58 +192,55 @@ pub fn dark(comptime level: u16) type {
pub const theme = .{
.name = std.fmt.comptimePrint("seoul256_dark_{d}", .{level}),
// the level's own, cited in its row of dark_levels
- .bg = own.bg,
+ .page = own.page,
// S:206 Normal guifg = s:hi arg s:dark_fg = 252 -> s:rgb_map[252] S:134
- .fg = .{ 0xd9, 0xd9, 0xd9 },
+ .text = .{ 0xd9, 0xd9, 0xd9 },
// S:209 Visual guibg = s:hi arg 23 = 23 -> s:rgb_map[23] S:121
- .sel_bg = .{ 0x00, 0x71, 0x73 },
+ .selection = .{ 0x00, 0x71, 0x73 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xd9, 0xd9, 0xd9 },
+ .selection_text = .{ 0xd9, 0xd9, 0xd9 },
// the level's own, cited in its row of dark_levels
- .tag_bg = own.tag_bg,
+ .tag = own.tag,
// the level's own, cited in its row of dark_levels
- .tag_fg = own.tag_fg,
+ .tag_text = own.tag_text,
// the level's own, cited in its row of dark_levels
- .tag_active_bg = own.tag_active_bg,
+ .tag_focus = own.tag_focus,
// S:350 StatusLine guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129; rendered as the bar text because S:354 sets gui=bold,reverse #dfdebd, adjusted
- .tag_active_fg = own.tag_active_fg,
+ .tag_focus_text = own.tag_focus_text,
// the focused grip: S:359 TabLineSel guibg = s:hi arg 23 = 23 -> s:rgb_map[23] S:121 (accent: the selected-tab background, TabLineSel, the file's only coloured focus marker; the airline/lightline seoul256 themes live outside this repo)
- .box = own.box,
+ .accent = own.accent,
// the level's own, cited in its row of dark_levels
- .box_dim = own.box_dim,
// an unsaved grip: the original's modified colour, S:396 GitGutterChange guifg = s:hi arg 68 = 68 -> s:rgb_map[68] S:123 (modified: vim-gitgutter Changed sign)
- .box_dirty = .{ 0x71, 0x9c, 0xdf },
+ .dirty = .{ 0x71, 0x9c, 0xdf },
// derived: the column grip, the original's type colour, S:247 Type guifg = s:hi arg 179 = 179 -> s:rgb_map[179] S:129
- .column_box = .{ 0xdf, 0xbc, 0x72 },
+ .column_grip = .{ 0xdf, 0xbc, 0x72 },
// S:253 Keyword guifg = s:hi arg 168 = 168 -> s:rgb_map[168] S:128
- .kw = .{ 0xe1, 0x78, 0x99 },
+ .keyword = .{ 0xe1, 0x78, 0x99 },
// S:216 String guifg = s:hi arg 109 = 109 -> s:rgb_map[109] S:125
- .str = .{ 0x98, 0xbc, 0xbd },
+ .string = .{ 0x98, 0xbc, 0xbd },
// S:213 Number guifg = s:hi arg 222 = 222 -> s:rgb_map[222] S:131
- .num = .{ 0xff, 0xde, 0x99 },
+ .number = .{ 0xff, 0xde, 0x99 },
// S:212 Comment guifg = s:hi arg 65 = 65 -> s:rgb_map[65] S:123
.comment = .{ 0x71, 0x98, 0x72 },
// S:208 LineNr guifg = s:hi arg 101 = 101 -> s:rgb_map[101] S:125
- .lineno = .{ 0x99, 0x98, 0x72 },
+ .line_number = .{ 0x99, 0x98, 0x72 },
// S:276 CursorLineNr guifg = s:hi arg 131 = 131 -> s:rgb_map[131] S:126
- .lineno_active = .{ 0xbe, 0x75, 0x72 },
+ .line_number_current = .{ 0xbe, 0x75, 0x72 },
// S:306 PmenuSbar guibg = s:hi arg 65 = 65 -> s:rgb_map[65] S:123
- .scroll_track = .{ 0x71, 0x98, 0x72 },
+ .rail = .{ 0x71, 0x98, 0x72 },
// S:307 PmenuThumb guibg = s:hi arg 23 = 23 -> s:rgb_map[23] S:121
- .scroll_thumb = .{ 0x00, 0x71, 0x73 },
+ .rail_thumb = .{ 0x00, 0x71, 0x73 },
// the level's own, cited in its row of dark_levels
- .border = own.border,
+ .rule = own.rule,
// S:309 Search guibg = s:hi arg 24 = 24 -> s:rgb_map[24] S:121
- .search_bg = .{ 0x00, 0x72, 0x99 },
- // S:309 Search guifg = s:hi arg s:dark_fg = 252 -> s:rgb_map[252] S:134
- .search_fg = .{ 0xd9, 0xd9, 0xd9 },
+ .hit = .{ 0x00, 0x72, 0x99 },
// S:402 ALEErrorSign guifg = s:hi arg 161 = 161 -> s:rgb_map[161] S:128 (no Diagnostic* groups; ALE error sign used)
- .diagnostic_error = .{ 0xe1, 0x26, 0x72 },
+ .@"error" = .{ 0xe1, 0x26, 0x72 },
// S:403 ALEWarningSign guifg = s:hi arg 174 = 174 -> s:rgb_map[174] S:128 (no Diagnostic* groups; ALE warning sign used)
- .diagnostic_warning = .{ 0xe0, 0x9b, 0x99 },
+ .warning = .{ 0xe0, 0x9b, 0x99 },
// The official urxvt port (the vim colorscheme sets no terminal
// colours), U = ~/05-genizah/seoul256.vim/urxvt/seoul256.
- .palette = .{
+ .ansi = .{
.{ 0x4e, 0x4e, 0x4e }, // 0: U:5 URxvt*color0
.{ 0xd6, 0x87, 0x87 }, // 1: U:6 URxvt*color1
.{ 0x5f, 0x86, 0x5f }, // 2: U:7 URxvt*color2
@@ -286,58 +271,56 @@ pub fn light(comptime level: u16) type {
pub const theme = .{
.name = std.fmt.comptimePrint("seoul256_light_{d}", .{level}),
// the level's own, cited in its row of light_levels
- .bg = own.bg,
+ .page = own.page,
// S:206 Normal guifg = s:hi arg s:light_fg = 239 -> s:rgb_map[239] S:133
- .fg = .{ 0x61, 0x61, 0x61 },
+ .text = .{ 0x61, 0x61, 0x61 },
// S:209 Visual guibg = s:hi arg 152 = 152 -> s:rgb_map[152] S:127
- .sel_bg = .{ 0xbc, 0xde, 0xde },
+ .selection = .{ 0xbc, 0xde, 0xde },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x61, 0x61, 0x61 },
+ .selection_text = .{ 0x61, 0x61, 0x61 },
// the level's own, cited in its row of light_levels
- .tag_bg = own.tag_bg,
+ .tag = own.tag,
// the level's own, cited in its row of light_levels
- .tag_fg = own.tag_fg,
+ .tag_text = own.tag_text,
// S:350 StatusLine guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124; rendered as the bar background because S:354 sets gui=bold,reverse
- .tag_active_bg = .{ 0x9a, 0x73, 0x72 },
+ .tag_focus = .{ 0x9a, 0x73, 0x72 },
// S:350 StatusLine guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129; rendered as the bar text because S:354 sets gui=bold,reverse #dfdebd, adjusted
- .tag_active_fg = .{ 0x12, 0x12, 0x0f },
+ .tag_focus_text = .{ 0x12, 0x12, 0x0f },
// the focused grip: S:359 TabLineSel guibg = s:hi arg 66 = 66 -> s:rgb_map[66] S:123 (accent: the selected-tab background, TabLineSel, the file's only coloured focus marker; the airline/lightline seoul256 themes live outside this repo)
- .box = .{ 0x4b, 0x64, 0x65 },
+ .accent = .{ 0x4b, 0x64, 0x65 },
// the level's own, cited in its row of light_levels
- .box_dim = own.box_dim,
// an unsaved grip: the original's modified colour, S:396 GitGutterChange guifg = s:hi arg 68 = 68 -> s:rgb_map[68] S:123 (modified: vim-gitgutter Changed sign)
- .box_dirty = .{ 0x71, 0x9c, 0xdf },
+ .dirty = .{ 0x71, 0x9c, 0xdf },
// derived: the column grip, the original's type colour, S:247 Type guifg = s:hi arg 94 = 94 -> s:rgb_map[94] S:124
- .column_box = .{ 0x9a, 0x72, 0x00 },
+ .column_grip = .{ 0x9a, 0x72, 0x00 },
// S:253 Keyword guifg = s:hi arg 168 = 168 -> s:rgb_map[168] S:128
- .kw = .{ 0xe1, 0x78, 0x99 },
+ .keyword = .{ 0xe1, 0x78, 0x99 },
// S:216 String guifg = s:hi arg 30 = 30 -> s:rgb_map[30] S:121
- .str = .{ 0x00, 0x97, 0x99 },
+ .string = .{ 0x00, 0x97, 0x99 },
// S:213 Number guifg = s:hi arg 95 = 95 -> s:rgb_map[95] S:124
- .num = .{ 0x9a, 0x73, 0x72 },
+ .number = .{ 0x9a, 0x73, 0x72 },
// S:212 Comment guifg = s:hi arg 65 = 65 -> s:rgb_map[65] S:123
.comment = .{ 0x71, 0x98, 0x72 },
// S:208 LineNr guifg = s:hi arg 101 = 101 -> s:rgb_map[101] S:125
- .lineno = .{ 0x99, 0x98, 0x72 },
+ .line_number = .{ 0x99, 0x98, 0x72 },
// S:276 CursorLineNr guifg = s:hi arg 131 = 131 -> s:rgb_map[131] S:126
- .lineno_active = .{ 0xbe, 0x75, 0x72 },
+ .line_number_current = .{ 0xbe, 0x75, 0x72 },
// S:306 PmenuSbar guibg = s:hi arg 65 = 65 -> s:rgb_map[65] S:123
- .scroll_track = .{ 0x71, 0x98, 0x72 },
+ .rail = .{ 0x71, 0x98, 0x72 },
// S:307 PmenuThumb guibg = s:hi arg 23 = 23 -> s:rgb_map[23] S:121
- .scroll_thumb = .{ 0x00, 0x71, 0x73 },
+ .rail_thumb = .{ 0x00, 0x71, 0x73 },
// the level's own, cited in its row of light_levels
- .border = own.border,
- // S:309 Search guibg = s:hi arg 74 = 74 -> s:rgb_map[74] S:124
- .search_bg = .{ 0x70, 0xbd, 0xdf },
- // S:309 Search guifg = s:hi arg 255 = 255 -> s:rgb_map[255] S:135
- .search_fg = .{ 0xf1, 0xf1, 0xf1 },
+ .rule = own.rule,
+ // S:309 Search guibg = s:hi arg 74 = 74 -> s:rgb_map[74] S:124 #70bddf, adjusted
+ // adjusted: search hit #70bddf -> #a6e6fe: the text #616161 reads 2.96:1 on #70bddf; its sky blue lighter, 1.13:1 off the page at 254 and 1.21:1 at 255, 0.08 OKLab, the text 4.53:1 on it (DESIGN.md R0, R8)
+ .hit = .{ 0xa6, 0xe6, 0xfe },
// S:402 ALEErrorSign guifg = s:hi arg 161 = 161 -> s:rgb_map[161] S:128 (no Diagnostic* groups; ALE error sign used)
- .diagnostic_error = .{ 0xe1, 0x26, 0x72 },
+ .@"error" = .{ 0xe1, 0x26, 0x72 },
// S:403 ALEWarningSign guifg = s:hi arg 131 = 131 -> s:rgb_map[131] S:126 (no Diagnostic* groups; ALE warning sign used)
- .diagnostic_warning = .{ 0xbe, 0x75, 0x72 },
+ .warning = .{ 0xbe, 0x75, 0x72 },
// The official urxvt port (the vim colorscheme sets no terminal
// colours), U = ~/05-genizah/seoul256.vim/urxvt/seoul256-light.
- .palette = .{
+ .ansi = .{
.{ 0x4e, 0x4e, 0x4e }, // 0: U:5 URxvt*color0
.{ 0xaf, 0x5f, 0x5f }, // 1: U:6 URxvt*color1
.{ 0x5f, 0x88, 0x5f }, // 2: U:7 URxvt*color2
diff --git a/core/themes/seoulbones_dark.zig b/core/themes/seoulbones_dark.zig
index 74cdf1ff..8b2c40ce 100644
--- a/core/themes/seoulbones_dark.zig
+++ b/core/themes/seoulbones_dark.zig
@@ -18,63 +18,67 @@
//! it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #919191 -> #cdcdcd: 1.53:1 on the focused tag, now 3.03:1 (R6: 3:1)
+//! - unsaved grip #97bdde -> #aad1f2: 3.78:1 on the tag, now 4.65:1 (R6: 3:1 on both tags)
+//! - selection text #dddddd -> #060606: 3.30:1 on the selection, now 4.52:1 (R7: 4.5:1)
+//! - search hit #8283ad -> #7c5b34: 2.41:1 off the page, now 1.41:1 (R8: 1.5:1, the text reading on it)
+//! - error #e388a3 -> #fd9fba: 3.45:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - info #97bdde -> #99bfe0: 4.42:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #a5a6c5 -> #9ec49f: 3.68:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "seoulbones_dark",
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:33 Normal guibg
- .bg = .{ 0x4b, 0x4b, 0x4b },
+ .page = .{ 0x4b, 0x4b, 0x4b },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:33 Normal guifg
- .fg = .{ 0xdd, 0xdd, 0xdd },
+ .text = .{ 0xdd, 0xdd, 0xdd },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:213 Visual guibg
- .sel_bg = .{ 0x77, 0x77, 0x77 },
+ .selection = .{ 0x77, 0x77, 0x77 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xdd, 0xdd, 0xdd },
+ .selection_text = .{ 0xdd, 0xdd, 0xdd },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:200 StatusLineNC guibg
- .tag_bg = .{ 0x55, 0x55, 0x55 },
+ .tag = .{ 0x55, 0x55, 0x55 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:200 StatusLineNC guifg
- .tag_fg = .{ 0xe5, 0xe5, 0xe5 },
+ .tag_text = .{ 0xe5, 0xe5, 0xe5 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:197 StatusLine guibg #5e5e5e, adjusted
- .tag_active_bg = .{ 0x72, 0x72, 0x72 },
+ .tag_focus = .{ 0x72, 0x72, 0x72 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:197 StatusLine guifg #dddddd, adjusted
- .tag_active_fg = .{ 0xf8, 0xf8, 0xf8 },
+ .tag_focus_text = .{ 0xf8, 0xf8, 0xf8 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/seoulbones_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x91, 0x91, 0x91 },
- // derived: the grip at rest, the accent #797979 faded toward the unfocused tag #555555 as far as 1.6:1 off it (0.88 of the way)
- .box_dim = .{ 0x75, 0x75, 0x75 },
+ .accent = .{ 0x91, 0x91, 0x91 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:41 Changed guifg
- .box_dirty = .{ 0x97, 0xbd, 0xde },
+ .dirty = .{ 0x97, 0xbd, 0xde },
// derived: the column grip, the original's function colour, ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:122 Function guifg
- .column_box = .{ 0xdf, 0xdf, 0xc1 },
+ .column_grip = .{ 0xdf, 0xdf, 0xc1 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:150 Keyword guifg
- .kw = .{ 0xdc, 0x8c, 0xa3 },
+ .keyword = .{ 0xdc, 0x8c, 0xa3 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:203 String guifg
- .str = .{ 0xab, 0xc4, 0xdb },
+ .string = .{ 0xab, 0xc4, 0xdb },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:166 Number guifg
- .num = .{ 0xf7, 0xe0, 0xb3 },
+ .number = .{ 0xf7, 0xe0, 0xb3 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:47 Comment guifg
.comment = .{ 0x71, 0x98, 0x71 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:152 LineNr guifg
- .lineno = .{ 0x86, 0x86, 0x86 },
+ .line_number = .{ 0x86, 0x86, 0x86 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:62 CursorLineNr guifg
- .lineno_active = .{ 0xdd, 0xdd, 0xdd },
+ .line_number_current = .{ 0xdd, 0xdd, 0xdd },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:169 PmenuSbar guibg
- .scroll_track = .{ 0x81, 0x81, 0x81 },
+ .rail = .{ 0x81, 0x81, 0x81 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:171 PmenuThumb guibg #a0a0a0, adjusted
- .scroll_thumb = .{ 0xa1, 0xa1, 0xa1 },
+ .rail_thumb = .{ 0xa1, 0xa1, 0xa1 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:220 WinSeparator guifg
- .border = .{ 0x86, 0x86, 0x86 },
+ .rule = .{ 0x86, 0x86, 0x86 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:175 Search guibg
- .search_bg = .{ 0x82, 0x83, 0xad },
- // ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:175 Search guifg
- .search_fg = .{ 0xdd, 0xdd, 0xdd },
+ .hit = .{ 0x82, 0x83, 0xad },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:113 Error guifg via DiagnosticError->Error (link :114)
- .diagnostic_error = .{ 0xe3, 0x88, 0xa3 },
+ .@"error" = .{ 0xe3, 0x88, 0xa3 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:214 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :215)
- .diagnostic_warning = .{ 0xff, 0xdf, 0x9b },
+ .warning = .{ 0xff, 0xdf, 0x9b },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:72 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x97, 0xbd, 0xde },
+ .info = .{ 0x97, 0xbd, 0xde },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:67 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xa5, 0xa6, 0xc5 },
- .palette = .{
+ .hint = .{ 0xa5, 0xa6, 0xc5 },
+ .ansi = .{
.{ 0x4b, 0x4b, 0x4b }, // 0: ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:17 g:terminal_color_0
.{ 0xe3, 0x88, 0xa3 }, // 1: ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:18 g:terminal_color_1
.{ 0x98, 0xbd, 0x99 }, // 2: ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:19 g:terminal_color_2
diff --git a/core/themes/seoulbones_light.zig b/core/themes/seoulbones_light.zig
index 7b897be5..b509996c 100644
--- a/core/themes/seoulbones_light.zig
+++ b/core/themes/seoulbones_light.zig
@@ -18,63 +18,68 @@
//! it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #999999 -> #676767: 1.52:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - unsaved grip #0084a3 -> #07708a: 2.93:1 on the tag, now 3.84:1 (R6: 3:1 on both tags)
+//! - selection #cccccc -> #cbcbcb: 1.24:1 off the page, now 1.25:1 (R7)
+//! - search hit #cbb1ca -> #ffba94: 1.52:1 off the page, now 1.28:1 (R8: 1.5:1, the text reading on it)
+//! - error #dc5284 -> #b72e65: 2.90:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #c48562 -> #915634: 2.36:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - info #0084a3 -> #026e88: 3.36:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #896788 -> #7b5a7a: 3.72:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "seoulbones_light",
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:269 Normal guibg
- .bg = .{ 0xe2, 0xe2, 0xe2 },
+ .page = .{ 0xe2, 0xe2, 0xe2 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:269 Normal guifg
- .fg = .{ 0x55, 0x55, 0x55 },
+ .text = .{ 0x55, 0x55, 0x55 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:449 Visual guibg
- .sel_bg = .{ 0xcc, 0xcc, 0xcc },
+ .selection = .{ 0xcc, 0xcc, 0xcc },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x55, 0x55, 0x55 },
+ .selection_text = .{ 0x55, 0x55, 0x55 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:436 StatusLineNC guibg
- .tag_bg = .{ 0xd4, 0xd4, 0xd4 },
+ .tag = .{ 0xd4, 0xd4, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:436 StatusLineNC guifg #818181, adjusted
- .tag_fg = .{ 0x5a, 0x5a, 0x5a },
+ .tag_text = .{ 0x5a, 0x5a, 0x5a },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:433 StatusLine guibg #c4c4c4, adjusted
- .tag_active_bg = .{ 0xbd, 0xbd, 0xbd },
+ .tag_focus = .{ 0xbd, 0xbd, 0xbd },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:433 StatusLine guifg #555555, adjusted
- .tag_active_fg = .{ 0x4b, 0x4b, 0x4b },
+ .tag_focus_text = .{ 0x4b, 0x4b, 0x4b },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/seoulbones_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x99, 0x99, 0x99 },
- // derived: the grip at rest, the accent #a6a6a6 faded toward the unfocused tag #d4d4d4 as far as 1.6:1 off it (0.98 of the way)
- .box_dim = .{ 0xa7, 0xa7, 0xa7 },
+ .accent = .{ 0x99, 0x99, 0x99 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:277 Changed guifg
- .box_dirty = .{ 0x00, 0x84, 0xa3 },
+ .dirty = .{ 0x00, 0x84, 0xa3 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:445 Type guifg
- .column_box = .{ 0x6d, 0x4c, 0x52 },
+ .column_grip = .{ 0x6d, 0x4c, 0x52 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:386 Keyword guifg
- .kw = .{ 0xca, 0x62, 0x84 },
+ .keyword = .{ 0xca, 0x62, 0x84 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:439 String guifg
- .str = .{ 0x4a, 0x75, 0x87 },
+ .string = .{ 0x4a, 0x75, 0x87 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:402 Number guifg
- .num = .{ 0x89, 0x65, 0x00 },
+ .number = .{ 0x89, 0x65, 0x00 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:283 Comment guifg
.comment = .{ 0x62, 0x85, 0x62 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:388 LineNr guifg
- .lineno = .{ 0x91, 0x91, 0x91 },
+ .line_number = .{ 0x91, 0x91, 0x91 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:298 CursorLineNr guifg
- .lineno_active = .{ 0x55, 0x55, 0x55 },
+ .line_number_current = .{ 0x55, 0x55, 0x55 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:405 PmenuSbar guibg
- .scroll_track = .{ 0x9e, 0x9e, 0x9e },
+ .rail = .{ 0x9e, 0x9e, 0x9e },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:407 PmenuThumb guibg
- .scroll_thumb = .{ 0xf3, 0xf3, 0xf3 },
+ .rail_thumb = .{ 0xf3, 0xf3, 0xf3 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:456 WinSeparator guifg
- .border = .{ 0x91, 0x91, 0x91 },
+ .rule = .{ 0x91, 0x91, 0x91 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:411 Search guibg
- .search_bg = .{ 0xcb, 0xb1, 0xca },
- // ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:411 Search guifg
- .search_fg = .{ 0x55, 0x55, 0x55 },
+ .hit = .{ 0xcb, 0xb1, 0xca },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:349 Error guifg via DiagnosticError->Error (link :350)
- .diagnostic_error = .{ 0xdc, 0x52, 0x84 },
+ .@"error" = .{ 0xdc, 0x52, 0x84 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:450 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :451)
- .diagnostic_warning = .{ 0xc4, 0x85, 0x62 },
+ .warning = .{ 0xc4, 0x85, 0x62 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:308 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x00, 0x84, 0xa3 },
+ .info = .{ 0x00, 0x84, 0xa3 },
// ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:303 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x89, 0x67, 0x88 },
- .palette = .{
+ .hint = .{ 0x89, 0x67, 0x88 },
+ .ansi = .{
.{ 0xe2, 0xe2, 0xe2 }, // 0: ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:253 g:terminal_color_0
.{ 0xdc, 0x52, 0x84 }, // 1: ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:254 g:terminal_color_1
.{ 0x62, 0x85, 0x62 }, // 2: ~/05-genizah/zenbones.nvim/colors/seoulbones.vim:255 g:terminal_color_2
diff --git a/core/themes/sepia.zig b/core/themes/sepia.zig
new file mode 100644
index 00000000..06cf96c1
--- /dev/null
+++ b/core/themes/sepia.zig
@@ -0,0 +1,30 @@
+//! pardes sepia: long reading by daylight (DESIGN.md part D). Warm paper,
+//! brown-black ink, earth hues, a calm comment that still reads 5.9:1, and a
+//! cool grey-blue selection so the hits keep their amber. For prose, docs and
+//! PDFs side by side, and long sessions where white paper glares.
+pub const theme = .{
+ .name = "sepia",
+ .page = .{ 0xf4, 0xec, 0xdb },
+ .text = .{ 0x3a, 0x2e, 0x22 },
+ .tag = .{ 0xe6, 0xd8, 0xba },
+ .tag_text = .{ 0x4b, 0x3d, 0x2b },
+ .accent = .{ 0xa0, 0x56, 0x2a },
+ .selection = .{ 0xc9, 0xd4, 0xdc },
+ .selection_text = .{ 0x23, 0x1a, 0x10 },
+ .keyword = .{ 0x94, 0x35, 0x1c },
+ .string = .{ 0x4c, 0x6a, 0x1f },
+ .number = .{ 0x7b, 0x4b, 0x9a },
+ .comment = .{ 0x6a, 0x57, 0x3e },
+ .line_number = .{ 0xa8, 0x98, 0x7c },
+ .line_number_current = .{ 0x76, 0x65, 0x4b },
+ .@"error" = .{ 0xb3, 0x26, 0x1e },
+ .warning = .{ 0x8a, 0x5a, 0x00 },
+ .info = .{ 0x2f, 0x5f, 0x8f },
+ .hint = .{ 0x3f, 0x6f, 0x5f },
+ .ansi = .{
+ .{ 0xe6, 0xd8, 0xba }, .{ 0xb3, 0x26, 0x1e }, .{ 0x4c, 0x6a, 0x1f }, .{ 0x8a, 0x5a, 0x00 },
+ .{ 0x2f, 0x5f, 0x8f }, .{ 0x7b, 0x4b, 0x9a }, .{ 0x2f, 0x6f, 0x6a }, .{ 0x5a, 0x4a, 0x36 },
+ .{ 0x7a, 0x68, 0x4b }, .{ 0xc1, 0x39, 0x28 }, .{ 0x52, 0x75, 0x17 }, .{ 0x8f, 0x60, 0x00 },
+ .{ 0x36, 0x6d, 0xa2 }, .{ 0x88, 0x54, 0xa7 }, .{ 0x29, 0x76, 0x71 }, .{ 0x23, 0x1a, 0x10 },
+ },
+};
diff --git a/core/themes/solarium.zig b/core/themes/solarium.zig
index 316113eb..cbc5df96 100644
--- a/core/themes/solarium.zig
+++ b/core/themes/solarium.zig
@@ -4,36 +4,32 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "solarium",
- .bg = .{ 0x17, 0x3e, 0x45 },
- .fg = .{ 0xa7, 0xb7, 0xae },
- .tag_bg = .{ 0x12, 0x3f, 0x43 },
- .tag_fg = .{ 0xc7, 0xd4, 0xbd },
- .tag_name_fg = .{ 0xe9, 0xc1, 0xe0 },
- .tag_active_name_fg = .{ 0xf5, 0xcd, 0xec },
- .tag_active_bg = .{ 0x21, 0x4e, 0x50 },
- .tag_active_fg = .{ 0xd3, 0xe0, 0xc9 },
- .box = .{ 0xe1, 0xc2, 0x66 },
- .box_dim = .{ 0x46, 0x7f, 0x76 },
- .column_box = .{ 0x5c, 0xb1, 0xeb },
- .column_box_dim = .{ 0x34, 0x7a, 0x9a },
- .kw = .{ 0x56, 0xb2, 0xf1 },
- .str = .{ 0xbd, 0xd0, 0x3f },
- .num = .{ 0xef, 0x99, 0x48 },
+ .page = .{ 0x17, 0x3e, 0x45 },
+ .text = .{ 0xa7, 0xb7, 0xae },
+ .tag = .{ 0x12, 0x3f, 0x43 },
+ .tag_text = .{ 0xc7, 0xd4, 0xbd },
+ .tag_name = .{ 0xe9, 0xc1, 0xe0 },
+ .tag_focus = .{ 0x21, 0x4e, 0x50 },
+ .tag_focus_text = .{ 0xd3, 0xe0, 0xc9 },
+ .accent = .{ 0xe1, 0xc2, 0x66 },
+ .column_grip = .{ 0x5c, 0xb1, 0xeb },
+ .keyword = .{ 0x56, 0xb2, 0xf1 },
+ .string = .{ 0xbd, 0xd0, 0x3f },
+ .number = .{ 0xef, 0x99, 0x48 },
.comment = .{ 0xf6, 0xce, 0x5a },
- .lineno = .{ 0x64, 0x7e, 0x7c },
- .lineno_active = .{ 0x6c, 0x86, 0x84 },
- .scroll_track = .{ 0x1c, 0x45, 0x4c },
- .scroll_thumb = .{ 0x65, 0x97, 0x8c },
- .border = .{ 0x4c, 0x88, 0x80 },
- .sel_bg = .{ 0x1f, 0x5c, 0x64 },
- .sel_fg = .{ 0xee, 0xe8, 0xd5 },
- .search_bg = .{ 0x6d, 0x57, 0x1d },
- .search_fg = .{ 0xff, 0xf0, 0xb9 },
- .diagnostic_error = .{ 0xff, 0x7a, 0x6a },
- .diagnostic_warning = .{ 0xf3, 0xbe, 0x47 },
- .diagnostic_info = .{ 0x59, 0xb1, 0xee },
- .diagnostic_hint = .{ 0x5c, 0xca, 0xb9 },
- .palette = .{
+ .line_number = .{ 0x64, 0x7e, 0x7c },
+ .line_number_current = .{ 0x6c, 0x86, 0x84 },
+ .rail = .{ 0x1c, 0x45, 0x4c },
+ .rail_thumb = .{ 0x65, 0x97, 0x8c },
+ .rule = .{ 0x4c, 0x88, 0x80 },
+ .selection = .{ 0x1f, 0x5c, 0x64 },
+ .selection_text = .{ 0xee, 0xe8, 0xd5 },
+ .hit = .{ 0x6d, 0x57, 0x1d },
+ .@"error" = .{ 0xff, 0x7a, 0x6a },
+ .warning = .{ 0xf3, 0xbe, 0x47 },
+ .info = .{ 0x59, 0xb1, 0xee },
+ .hint = .{ 0x5c, 0xca, 0xb9 },
+ .ansi = .{
.{ 0x17, 0x3e, 0x45 },
.{ 0xed, 0x84, 0x77 },
.{ 0xaf, 0xbd, 0x52 },
diff --git a/core/themes/solarized_dark.zig b/core/themes/solarized_dark.zig
index c7c43892..e013a060 100644
--- a/core/themes/solarized_dark.zig
+++ b/core/themes/solarized_dark.zig
@@ -10,57 +10,60 @@
//! - focused grip #268bd2 -> #2483c5: 1.38:1 on the focused tag #93a1a1
//! Upstream notes: green is the canonical #859900 (README), not
//! solarized.vim:261's "experimental" #719e07.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #2483c5 -> #025384: 1.53:1 on the focused tag, now 3.05:1 (R6: 3:1)
+//! - unsaved grip #b58900 -> #3e2c00: 1.39:1 on the tag, now 3.01:1 (R6: 3:1 on both tags)
+//! - selection text #002b36 -> #cbf2ff: 2.79:1 on the selection, now 4.53:1 (R7: 4.5:1)
+//! - error #dc322f -> #f95148: 3.25:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #dc322f -> #b58900: 3.25:1 on the page, now 4.68:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "solarized_dark",
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:539 Normal bg_back: base03 = ~/05-genizah/solarized/README.md:354 base03
- .bg = .{ 0x00, 0x2b, 0x36 },
+ .page = .{ 0x00, 0x2b, 0x36 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:539 Normal fg: base0 = ~/05-genizah/solarized/README.md:358 base0
- .fg = .{ 0x83, 0x94, 0x96 },
+ .text = .{ 0x83, 0x94, 0x96 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:614 Visual fg_base01 reversed: base01 = ~/05-genizah/solarized/README.md:356 base01
- .sel_bg = .{ 0x58, 0x6e, 0x75 },
+ .selection = .{ 0x58, 0x6e, 0x75 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:614 Visual bg_base03 reversed: base03 = ~/05-genizah/solarized/README.md:354 base03
- .sel_fg = .{ 0x00, 0x2b, 0x36 },
+ .selection_text = .{ 0x00, 0x2b, 0x36 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:613 StatusLineNC fg_base00 reversed: base00 = ~/05-genizah/solarized/README.md:357 base00
- .tag_bg = .{ 0x65, 0x7b, 0x83 },
+ .tag = .{ 0x65, 0x7b, 0x83 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:613 StatusLineNC bg_base02 reversed: base02 = ~/05-genizah/solarized/README.md:355 base02 #073642, adjusted
- .tag_fg = .{ 0x01, 0x09, 0x0b },
+ .tag_text = .{ 0x01, 0x09, 0x0b },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:612 StatusLine fg_base1 reversed: base1 = ~/05-genizah/solarized/README.md:359 base1
- .tag_active_bg = .{ 0x93, 0xa1, 0xa1 },
+ .tag_focus = .{ 0x93, 0xa1, 0xa1 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:612 StatusLine bg_base02 reversed: base02 = ~/05-genizah/solarized/README.md:355 base02
- .tag_active_fg = .{ 0x07, 0x36, 0x42 },
+ .tag_focus_text = .{ 0x07, 0x36, 0x42 },
// the focused grip: no UI accent in solarized.vim; Identifier blue, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:552 Identifier: blue = ~/05-genizah/solarized/README.md:367 blue
- .box = .{ 0x24, 0x83, 0xc5 },
- // derived: the grip at rest, the accent #268bd2 faded toward the unfocused tag #657b83 as far as 1.6:1 off it (1.00 of the way)
- .box_dim = .{ 0x18, 0x59, 0x86 },
+ .accent = .{ 0x24, 0x83, 0xc5 },
// an unsaved grip: the original's modified colour, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:636 DiffChange fg_yellow: yellow = ~/05-genizah/solarized/README.md:362 yellow
- .box_dirty = .{ 0xb5, 0x89, 0x00 },
+ .dirty = .{ 0xb5, 0x89, 0x00 },
// derived: the column grip, the original's keyword colour, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:556 Statement fg (Keyword links to Statement): green = ~/05-genizah/solarized/README.md:369 green
- .column_box = .{ 0x85, 0x99, 0x00 },
+ .column_grip = .{ 0x85, 0x99, 0x00 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:556 Statement fg (Keyword links to Statement): green = ~/05-genizah/solarized/README.md:369 green
- .kw = .{ 0x85, 0x99, 0x00 },
+ .keyword = .{ 0x85, 0x99, 0x00 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:544 Constant fg (String links to Constant): cyan = ~/05-genizah/solarized/README.md:368 cyan
- .str = .{ 0x2a, 0xa1, 0x98 },
+ .string = .{ 0x2a, 0xa1, 0x98 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:544 Constant fg (Number links to Constant): cyan = ~/05-genizah/solarized/README.md:368 cyan
- .num = .{ 0x2a, 0xa1, 0x98 },
+ .number = .{ 0x2a, 0xa1, 0x98 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:541 Comment fg: base01 = ~/05-genizah/solarized/README.md:356 base01
.comment = .{ 0x58, 0x6e, 0x75 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:621 LineNr fg: base01 = ~/05-genizah/solarized/README.md:356 base01
- .lineno = .{ 0x58, 0x6e, 0x75 },
+ .line_number = .{ 0x58, 0x6e, 0x75 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:665 PmenuSbar fg_base2 reversed: base2 = ~/05-genizah/solarized/README.md:360 base2
- .scroll_track = .{ 0xee, 0xe8, 0xd5 },
+ .rail = .{ 0xee, 0xe8, 0xd5 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:666 PmenuThumb fg_base0 reversed: base0 = ~/05-genizah/solarized/README.md:358 base0
- .scroll_thumb = .{ 0x83, 0x94, 0x96 },
+ .rail_thumb = .{ 0x83, 0x94, 0x96 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:624 VertSplit fg_base00 bg_base00: base00 = ~/05-genizah/solarized/README.md:357 base00
- .border = .{ 0x65, 0x7b, 0x83 },
- // ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:618 Search fg_yellow reversed: yellow = ~/05-genizah/solarized/README.md:362 yellow
- .search_bg = .{ 0xb5, 0x89, 0x00 },
- // ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:618 Search bg_none reversed: the page: base03 = ~/05-genizah/solarized/README.md:354 base03
- .search_fg = .{ 0x00, 0x2b, 0x36 },
+ .rule = .{ 0x65, 0x7b, 0x83 },
+ // ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:618 Search fg_yellow reversed: yellow = ~/05-genizah/solarized/README.md:362 yellow #b58900, adjusted
+ // adjusted: search hit #b58900 -> #1d180e: the original reverses yellow under base03 ink; pardes keeps the text's own ink on a hit, which reads 1.02:1 on #b58900; its yellow a ground 1.18:1 off the page, 0.09 OKLab, the text 5.58:1 on it (DESIGN.md R0, R8)
+ .hit = .{ 0x1d, 0x18, 0x0e },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:592 Error fg: red = ~/05-genizah/solarized/README.md:364 red
- .diagnostic_error = .{ 0xdc, 0x32, 0x2f },
+ .@"error" = .{ 0xdc, 0x32, 0x2f },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:630 WarningMsg fg: red = ~/05-genizah/solarized/README.md:364 red
- .diagnostic_warning = .{ 0xdc, 0x32, 0x2f },
- .palette = .{
+ .warning = .{ 0xdc, 0x32, 0x2f },
+ .ansi = .{
.{ 0x07, 0x36, 0x42 }, // 0: ~/05-genizah/solarized/README.md:355 base02 ANSI 0 (README TERMCOL column)
.{ 0xdc, 0x32, 0x2f }, // 1: ~/05-genizah/solarized/README.md:364 red ANSI 1 (README TERMCOL column)
.{ 0x85, 0x99, 0x00 }, // 2: ~/05-genizah/solarized/README.md:369 green ANSI 2 (README TERMCOL column)
diff --git a/core/themes/solarized_light.zig b/core/themes/solarized_light.zig
index 124d6d59..801c1693 100644
--- a/core/themes/solarized_light.zig
+++ b/core/themes/solarized_light.zig
@@ -11,57 +11,61 @@
//! - focused grip #268bd2 -> #2f90d4: 1.46:1 on the focused tag #586e75
//! Upstream notes: green is the canonical #859900 (README), not
//! solarized.vim:261's "experimental" #719e07.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused tag ground #586e75 -> #728284: 1.70:1 off the tag, now 1.27:1 (R4, H: a focus step off the tag, and the loudest)
+//! - focused grip #2f90d4 -> #00395e: 1.16:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - unsaved grip #b58900 -> #473300: 1.02:1 on the tag, now 3.81:1 (R6: 3:1 on both tags)
+//! - selection text #fdf6e3 -> #3b3526: 2.48:1 on the selection, now 4.56:1 (R7: 4.5:1)
+//! - error #dc322f -> #d72c2b: 4.29:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #dc322f -> #8e6c07: 4.29:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "solarized_light",
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:539 Normal bg_back: base03 = ~/05-genizah/solarized/README.md:361 base3 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .bg = .{ 0xfd, 0xf6, 0xe3 },
+ .page = .{ 0xfd, 0xf6, 0xe3 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:539 Normal fg: base0 = ~/05-genizah/solarized/README.md:357 base00 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .fg = .{ 0x65, 0x7b, 0x83 },
+ .text = .{ 0x65, 0x7b, 0x83 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:614 Visual fg_base01 reversed: base01 = ~/05-genizah/solarized/README.md:359 base1 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .sel_bg = .{ 0x93, 0xa1, 0xa1 },
+ .selection = .{ 0x93, 0xa1, 0xa1 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:614 Visual bg_base03 reversed: base03 = ~/05-genizah/solarized/README.md:361 base3 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .sel_fg = .{ 0xfd, 0xf6, 0xe3 },
+ .selection_text = .{ 0xfd, 0xf6, 0xe3 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:613 StatusLineNC fg_base00 reversed: base00 = ~/05-genizah/solarized/README.md:358 base0 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .tag_bg = .{ 0x83, 0x94, 0x96 },
+ .tag = .{ 0x83, 0x94, 0x96 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:613 StatusLineNC bg_base02 reversed: base02 = ~/05-genizah/solarized/README.md:360 base2 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391) #eee8d5, adjusted
- .tag_fg = .{ 0x2b, 0x2a, 0x26 },
+ .tag_text = .{ 0x2b, 0x2a, 0x26 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:612 StatusLine fg_base1 reversed: base1 = ~/05-genizah/solarized/README.md:356 base01 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .tag_active_bg = .{ 0x58, 0x6e, 0x75 },
+ .tag_focus = .{ 0x58, 0x6e, 0x75 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:612 StatusLine bg_base02 reversed: base02 = ~/05-genizah/solarized/README.md:360 base2 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391) #eee8d5, adjusted
- .tag_active_fg = .{ 0xf0, 0xeb, 0xda },
+ .tag_focus_text = .{ 0xf0, 0xeb, 0xda },
// the focused grip: no UI accent in solarized.vim; Identifier blue, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:552 Identifier: blue = ~/05-genizah/solarized/README.md:367 blue
- .box = .{ 0x2f, 0x90, 0xd4 },
- // derived: the grip at rest, the accent #268bd2 faded toward the unfocused tag #839496 as far as 1.6:1 off it (1.00 of the way)
- .box_dim = .{ 0x1f, 0x72, 0xac },
+ .accent = .{ 0x2f, 0x90, 0xd4 },
// an unsaved grip: the original's modified colour, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:636 DiffChange fg_yellow: yellow = ~/05-genizah/solarized/README.md:362 yellow
- .box_dirty = .{ 0xb5, 0x89, 0x00 },
+ .dirty = .{ 0xb5, 0x89, 0x00 },
// derived: the column grip, the original's keyword colour, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:556 Statement fg (Keyword links to Statement): green = ~/05-genizah/solarized/README.md:369 green
- .column_box = .{ 0x85, 0x99, 0x00 },
+ .column_grip = .{ 0x85, 0x99, 0x00 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:556 Statement fg (Keyword links to Statement): green = ~/05-genizah/solarized/README.md:369 green
- .kw = .{ 0x85, 0x99, 0x00 },
+ .keyword = .{ 0x85, 0x99, 0x00 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:544 Constant fg (String links to Constant): cyan = ~/05-genizah/solarized/README.md:368 cyan
- .str = .{ 0x2a, 0xa1, 0x98 },
+ .string = .{ 0x2a, 0xa1, 0x98 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:544 Constant fg (Number links to Constant): cyan = ~/05-genizah/solarized/README.md:368 cyan
- .num = .{ 0x2a, 0xa1, 0x98 },
+ .number = .{ 0x2a, 0xa1, 0x98 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:541 Comment fg: base01 = ~/05-genizah/solarized/README.md:359 base1 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
.comment = .{ 0x93, 0xa1, 0xa1 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:621 LineNr fg: base01 = ~/05-genizah/solarized/README.md:359 base1 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .lineno = .{ 0x93, 0xa1, 0xa1 },
+ .line_number = .{ 0x93, 0xa1, 0xa1 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:665 PmenuSbar fg_base2 reversed: base2 = ~/05-genizah/solarized/README.md:355 base02 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .scroll_track = .{ 0x07, 0x36, 0x42 },
+ .rail = .{ 0x07, 0x36, 0x42 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:666 PmenuThumb fg_base0 reversed: base0 = ~/05-genizah/solarized/README.md:357 base00 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .scroll_thumb = .{ 0x65, 0x7b, 0x83 },
+ .rail_thumb = .{ 0x65, 0x7b, 0x83 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:624 VertSplit fg_base00 bg_base00: base00 = ~/05-genizah/solarized/README.md:358 base0 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .border = .{ 0x83, 0x94, 0x96 },
+ .rule = .{ 0x83, 0x94, 0x96 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:618 Search fg_yellow reversed: yellow = ~/05-genizah/solarized/README.md:362 yellow
- .search_bg = .{ 0xb5, 0x89, 0x00 },
- // ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:618 Search bg_none reversed: the page: base03 = ~/05-genizah/solarized/README.md:361 base3 (swapped for background=light, ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:379-391)
- .search_fg = .{ 0xfd, 0xf6, 0xe3 },
+ // adjusted: search hit #b58900 -> #ffeb99: the original reverses yellow under base3 ink; pardes keeps the text's own ink on a hit, which reads 1.39:1 on #b58900; its yellow a ground 1.11:1 off the page, 0.09 OKLab, the text 3.73:1 on it (its own is 4.13:1; DESIGN.md R0, R8)
+ .hit = .{ 0xff, 0xeb, 0x99 },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:592 Error fg: red = ~/05-genizah/solarized/README.md:364 red
- .diagnostic_error = .{ 0xdc, 0x32, 0x2f },
+ .@"error" = .{ 0xdc, 0x32, 0x2f },
// ~/05-genizah/solarized/vim-colors-solarized/colors/solarized.vim:630 WarningMsg fg: red = ~/05-genizah/solarized/README.md:364 red
- .diagnostic_warning = .{ 0xdc, 0x32, 0x2f },
- .palette = .{
+ .warning = .{ 0xdc, 0x32, 0x2f },
+ .ansi = .{
.{ 0x07, 0x36, 0x42 }, // 0: ~/05-genizah/solarized/README.md:355 base02 ANSI 0 (README TERMCOL column)
.{ 0xdc, 0x32, 0x2f }, // 1: ~/05-genizah/solarized/README.md:364 red ANSI 1 (README TERMCOL column)
.{ 0x85, 0x99, 0x00 }, // 2: ~/05-genizah/solarized/README.md:369 green ANSI 2 (README TERMCOL column)
diff --git a/core/themes/spectrum.zig b/core/themes/spectrum.zig
index f7c25c3d..cb95fe87 100644
--- a/core/themes/spectrum.zig
+++ b/core/themes/spectrum.zig
@@ -4,36 +4,32 @@
//! Pardes-specific tag, search, diagnostic and ANSI roles; see docs/typ/themes.typ.
pub const theme = .{
.name = "spectrum",
- .bg = .{ 0x10, 0x0e, 0x11 },
- .fg = .{ 0xfc, 0xfc, 0xfa },
- .tag_bg = .{ 0x3b, 0x38, 0x30 },
- .tag_fg = .{ 0xdd, 0xd8, 0xbb },
- .tag_name_fg = .{ 0xc5, 0xd7, 0xff },
- .tag_active_name_fg = .{ 0xd7, 0xe3, 0xff },
- .tag_active_bg = .{ 0x4d, 0x47, 0x36 },
- .tag_active_fg = .{ 0xe9, 0xe4, 0xc7 },
- .box = .{ 0xff, 0xd8, 0x66 },
- .box_dim = .{ 0x92, 0x84, 0x4f },
- .column_box = .{ 0xa4, 0x92, 0xfd },
- .column_box_dim = .{ 0x70, 0x65, 0x96 },
- .kw = .{ 0xff, 0x61, 0x88 },
- .str = .{ 0xa9, 0xee, 0x64 },
- .num = .{ 0xa2, 0x90, 0xff },
+ .page = .{ 0x10, 0x0e, 0x11 },
+ .text = .{ 0xfc, 0xfc, 0xfa },
+ .tag = .{ 0x3b, 0x38, 0x30 },
+ .tag_text = .{ 0xdd, 0xd8, 0xbb },
+ .tag_name = .{ 0xc5, 0xd7, 0xff },
+ .tag_focus = .{ 0x4d, 0x47, 0x36 },
+ .tag_focus_text = .{ 0xe9, 0xe4, 0xc7 },
+ .accent = .{ 0xff, 0xd8, 0x66 },
+ .column_grip = .{ 0xa4, 0x92, 0xfd },
+ .keyword = .{ 0xff, 0x61, 0x88 },
+ .string = .{ 0xa9, 0xee, 0x64 },
+ .number = .{ 0xa2, 0x90, 0xff },
.comment = .{ 0xff, 0xe0, 0x9b },
- .lineno = .{ 0x68, 0x61, 0x6b },
- .lineno_active = .{ 0x70, 0x69, 0x73 },
- .scroll_track = .{ 0x21, 0x1d, 0x23 },
- .scroll_thumb = .{ 0x94, 0x8d, 0x6f },
- .border = .{ 0x8f, 0x87, 0x6c },
- .sel_bg = .{ 0x51, 0x3f, 0x60 },
- .sel_fg = .{ 0xfc, 0xfc, 0xfa },
- .search_bg = .{ 0x6f, 0x5b, 0x1e },
- .search_fg = .{ 0xff, 0xf0, 0xb0 },
- .diagnostic_error = .{ 0xff, 0x79, 0x9b },
- .diagnostic_warning = .{ 0xff, 0xd8, 0x66 },
- .diagnostic_info = .{ 0x67, 0xe9, 0xf9 },
- .diagnostic_hint = .{ 0xa9, 0xeb, 0x67 },
- .palette = .{
+ .line_number = .{ 0x68, 0x61, 0x6b },
+ .line_number_current = .{ 0x70, 0x69, 0x73 },
+ .rail = .{ 0x21, 0x1d, 0x23 },
+ .rail_thumb = .{ 0x94, 0x8d, 0x6f },
+ .rule = .{ 0x8f, 0x87, 0x6c },
+ .selection = .{ 0x51, 0x3f, 0x60 },
+ .selection_text = .{ 0xfc, 0xfc, 0xfa },
+ .hit = .{ 0x6f, 0x5b, 0x1e },
+ .@"error" = .{ 0xff, 0x79, 0x9b },
+ .warning = .{ 0xff, 0xd8, 0x66 },
+ .info = .{ 0x67, 0xe9, 0xf9 },
+ .hint = .{ 0xa9, 0xeb, 0x67 },
+ .ansi = .{
.{ 0x10, 0x0e, 0x11 },
.{ 0xff, 0x79, 0x9b },
.{ 0xa9, 0xdc, 0x76 },
diff --git a/core/themes/tokyobones_dark.zig b/core/themes/tokyobones_dark.zig
index 6a05e456..ec33b244 100644
--- a/core/themes/tokyobones_dark.zig
+++ b/core/themes/tokyobones_dark.zig
@@ -16,63 +16,61 @@
//! only), so it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #5b5d76 -> #898ca7: 1.55:1 on the focused tag, now 3.02:1 (R6: 3:1)
pub const theme = .{
.name = "tokyobones_dark",
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:33 Normal guibg
- .bg = .{ 0x1a, 0x1b, 0x26 },
+ .page = .{ 0x1a, 0x1b, 0x26 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:33 Normal guifg
- .fg = .{ 0xc0, 0xca, 0xf5 },
+ .text = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:214 Visual guibg
- .sel_bg = .{ 0x2c, 0x40, 0x75 },
+ .selection = .{ 0x2c, 0x40, 0x75 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xc0, 0xca, 0xf5 },
+ .selection_text = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:198 StatusLineNC guibg
- .tag_bg = .{ 0x24, 0x25, 0x32 },
+ .tag = .{ 0x24, 0x25, 0x32 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:198 StatusLineNC guifg
- .tag_fg = .{ 0xd2, 0xd9, 0xf8 },
+ .tag_text = .{ 0xd2, 0xd9, 0xf8 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:195 StatusLine guibg #303142, adjusted
- .tag_active_bg = .{ 0x40, 0x41, 0x57 },
+ .tag_focus = .{ 0x40, 0x41, 0x57 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:195 StatusLine guifg
- .tag_active_fg = .{ 0xc0, 0xca, 0xf5 },
+ .tag_focus_text = .{ 0xc0, 0xca, 0xf5 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/tokyobones_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x5b, 0x5d, 0x76 },
- // derived: the grip at rest, the accent #51536d faded toward the unfocused tag #242532 as far as 1.6:1 off it (0.70 of the way)
- .box_dim = .{ 0x44, 0x45, 0x5b },
+ .accent = .{ 0x5b, 0x5d, 0x76 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:41 Changed guifg
- .box_dirty = .{ 0x7b, 0xa2, 0xf7 },
+ .dirty = .{ 0x7b, 0xa2, 0xf7 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:210 Type guifg
- .column_box = .{ 0x93, 0x94, 0xaa },
+ .column_grip = .{ 0x93, 0x94, 0xaa },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:192 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xbb, 0x9b, 0xf7 },
+ .keyword = .{ 0xbb, 0x9b, 0xf7 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:201 String guifg
- .str = .{ 0x75, 0x92, 0xea },
+ .string = .{ 0x75, 0x92, 0xea },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:164 Number guifg
- .num = .{ 0x2b, 0xc4, 0xde },
+ .number = .{ 0x2b, 0xc4, 0xde },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:47 Comment guifg
.comment = .{ 0x65, 0x67, 0x7d },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:150 LineNr guifg
- .lineno = .{ 0x5f, 0x61, 0x7e },
+ .line_number = .{ 0x5f, 0x61, 0x7e },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:62 CursorLineNr guifg
- .lineno_active = .{ 0xc0, 0xca, 0xf5 },
+ .line_number_current = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:167 PmenuSbar guibg
- .scroll_track = .{ 0x58, 0x5a, 0x76 },
+ .rail = .{ 0x58, 0x5a, 0x76 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:169 PmenuThumb guibg
- .scroll_thumb = .{ 0x80, 0x82, 0x9b },
+ .rail_thumb = .{ 0x80, 0x82, 0x9b },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:221 WinSeparator guifg
- .border = .{ 0x5f, 0x61, 0x7e },
+ .rule = .{ 0x5f, 0x61, 0x7e },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:173 Search guibg
- .search_bg = .{ 0x6e, 0x20, 0xbd },
- // ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:173 Search guifg
- .search_fg = .{ 0xc0, 0xca, 0xf5 },
+ .hit = .{ 0x6e, 0x20, 0xbd },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:113 Error guifg via DiagnosticError->Error (link :114)
- .diagnostic_error = .{ 0xf7, 0x78, 0x90 },
+ .@"error" = .{ 0xf7, 0x78, 0x90 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:215 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :216)
- .diagnostic_warning = .{ 0xe1, 0xb0, 0x68 },
+ .warning = .{ 0xe1, 0xb0, 0x68 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:72 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x7b, 0xa2, 0xf7 },
+ .info = .{ 0x7b, 0xa2, 0xf7 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:67 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xbb, 0x9b, 0xf7 },
- .palette = .{
+ .hint = .{ 0xbb, 0x9b, 0xf7 },
+ .ansi = .{
.{ 0x1a, 0x1b, 0x26 }, // 0: ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:17 g:terminal_color_0
.{ 0xf7, 0x78, 0x90 }, // 1: ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:18 g:terminal_color_1
.{ 0x74, 0xdb, 0xcb }, // 2: ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:19 g:terminal_color_2
diff --git a/core/themes/tokyobones_light.zig b/core/themes/tokyobones_light.zig
index f57287ce..9db586e4 100644
--- a/core/themes/tokyobones_light.zig
+++ b/core/themes/tokyobones_light.zig
@@ -17,63 +17,62 @@
//! only), so it inherits Normal. TabLine links to StatusLine, TabLineFill to
//! StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral (the
//! theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #8f909b -> #5e5f6a: 1.51:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - warning #8f5e14 -> #845300: 3.87:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "tokyobones_light",
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:271 Normal guibg
- .bg = .{ 0xd6, 0xd7, 0xdc },
+ .page = .{ 0xd6, 0xd7, 0xdc },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:271 Normal guifg
- .fg = .{ 0x33, 0x3a, 0x57 },
+ .text = .{ 0x33, 0x3a, 0x57 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:452 Visual guibg
- .sel_bg = .{ 0xbb, 0xc0, 0xd8 },
+ .selection = .{ 0xbb, 0xc0, 0xd8 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x33, 0x3a, 0x57 },
+ .selection_text = .{ 0x33, 0x3a, 0x57 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:436 StatusLineNC guibg
- .tag_bg = .{ 0xc8, 0xc9, 0xcf },
+ .tag = .{ 0xc8, 0xc9, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:436 StatusLineNC guifg #5f6b9b, adjusted
- .tag_fg = .{ 0x4a, 0x53, 0x79 },
+ .tag_text = .{ 0x4a, 0x53, 0x79 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:433 StatusLine guibg #b9bbc3, adjusted
- .tag_active_bg = .{ 0xb1, 0xb3, 0xbc },
+ .tag_focus = .{ 0xb1, 0xb3, 0xbc },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:433 StatusLine guifg
- .tag_active_fg = .{ 0x33, 0x3a, 0x57 },
+ .tag_focus_text = .{ 0x33, 0x3a, 0x57 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/tokyobones_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x8f, 0x90, 0x9b },
- // derived: the grip at rest, the accent #9b9da9 faded toward the unfocused tag #c8c9cf as far as 1.6:1 off it (0.98 of the way)
- .box_dim = .{ 0x9c, 0x9e, 0xaa },
+ .accent = .{ 0x8f, 0x90, 0x9b },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:279 Changed guifg
- .box_dirty = .{ 0x34, 0x54, 0x8c },
+ .dirty = .{ 0x34, 0x54, 0x8c },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:448 Type guifg
- .column_box = .{ 0x48, 0x4f, 0x6b },
+ .column_grip = .{ 0x48, 0x4f, 0x6b },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:430 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x5a, 0x4a, 0x79 },
+ .keyword = .{ 0x5a, 0x4a, 0x79 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:439 String guifg
- .str = .{ 0x5b, 0x66, 0x94 },
+ .string = .{ 0x5b, 0x66, 0x94 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:402 Number guifg
- .num = .{ 0x17, 0x67, 0x75 },
+ .number = .{ 0x17, 0x67, 0x75 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:285 Comment guifg
.comment = .{ 0x7c, 0x7e, 0x89 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:388 LineNr guifg
- .lineno = .{ 0x88, 0x8b, 0x99 },
+ .line_number = .{ 0x88, 0x8b, 0x99 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:300 CursorLineNr guifg
- .lineno_active = .{ 0x33, 0x3a, 0x57 },
+ .line_number_current = .{ 0x33, 0x3a, 0x57 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:405 PmenuSbar guibg
- .scroll_track = .{ 0x93, 0x95, 0xa2 },
+ .rail = .{ 0x93, 0x95, 0xa2 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:407 PmenuThumb guibg
- .scroll_thumb = .{ 0xed, 0xee, 0xf0 },
+ .rail_thumb = .{ 0xed, 0xee, 0xf0 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:459 WinSeparator guifg
- .border = .{ 0x88, 0x8b, 0x99 },
+ .rule = .{ 0x88, 0x8b, 0x99 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:411 Search guibg
- .search_bg = .{ 0xb3, 0xa9, 0xc9 },
- // ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:411 Search guifg
- .search_fg = .{ 0x33, 0x3a, 0x57 },
+ .hit = .{ 0xb3, 0xa9, 0xc9 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:351 Error guifg via DiagnosticError->Error (link :352)
- .diagnostic_error = .{ 0x8b, 0x43, 0x51 },
+ .@"error" = .{ 0x8b, 0x43, 0x51 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:453 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :454)
- .diagnostic_warning = .{ 0x8f, 0x5e, 0x14 },
+ .warning = .{ 0x8f, 0x5e, 0x14 },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:310 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x34, 0x54, 0x8c },
+ .info = .{ 0x34, 0x54, 0x8c },
// ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:305 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x5a, 0x4a, 0x79 },
- .palette = .{
+ .hint = .{ 0x5a, 0x4a, 0x79 },
+ .ansi = .{
.{ 0xd6, 0xd7, 0xdc }, // 0: ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:255 g:terminal_color_0
.{ 0x8b, 0x43, 0x51 }, // 1: ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:256 g:terminal_color_1
.{ 0x34, 0x64, 0x5d }, // 2: ~/05-genizah/zenbones.nvim/colors/tokyobones.vim:257 g:terminal_color_2
diff --git a/core/themes/tokyonight_day.zig b/core/themes/tokyonight_day.zig
index 3d188454..5e0fab0c 100644
--- a/core/themes/tokyonight_day.zig
+++ b/core/themes/tokyonight_day.zig
@@ -23,63 +23,68 @@
//! computed at run time by Util.invert() of the night palette plus blended
//! bg_dark/bg_dark1 (lua/tokyonight/colors/day.lua); all values here come from
//! the generated extras for day.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #2e7de9 -> #0e64ce: 2.15:1 on the focused tag, now 3.01:1 (R6: 3:1)
+//! - unsaved grip #506d9c -> #4b6897: 3.57:1 on the tag, now 3.84:1 (R6: 3:1 on both tags)
+//! - selection text #3760bf -> #234aa7: 3.28:1 on the selection, now 4.50:1 (R7: 4.5:1)
+//! - search hit #7890dd -> #fed092: 2.38:1 off the page, now 1.11:1 (R8: 1.5:1, the text reading on it)
+//! - error #c64343 -> #b73537: 3.79:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #8c6c3e -> #7e5f31: 3.75:1 on the page, now 4.55:1 (R9: 4.5:1, told from the text and the others)
+//! - info #07879d -> #036f82: 3.27:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #118c74 -> #07725e: 3.23:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "tokyonight_day",
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:193 Normal guibg
- .bg = .{ 0xe1, 0xe2, 0xe7 },
+ .page = .{ 0xe1, 0xe2, 0xe7 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:193 Normal guifg
- .fg = .{ 0x37, 0x60, 0xbf },
+ .text = .{ 0x37, 0x60, 0xbf },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:245 Visual guibg
- .sel_bg = .{ 0xb7, 0xc1, 0xe3 },
+ .selection = .{ 0xb7, 0xc1, 0xe3 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x37, 0x60, 0xbf },
+ .selection_text = .{ 0x37, 0x60, 0xbf },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:220 StatusLineNC guibg
- .tag_bg = .{ 0xd0, 0xd5, 0xe3 },
+ .tag = .{ 0xd0, 0xd5, 0xe3 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:220 StatusLineNC guifg #a8aecb, adjusted
- .tag_fg = .{ 0x57, 0x5a, 0x6a },
+ .tag_text = .{ 0x57, 0x5a, 0x6a },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:219 StatusLine guibg #d0d5e3, adjusted
- .tag_active_bg = .{ 0xb5, 0xbd, 0xd7 },
+ .tag_focus = .{ 0xb5, 0xbd, 0xd7 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:219 StatusLine guifg #6172b0, adjusted
- .tag_active_fg = .{ 0x40, 0x4b, 0x74 },
+ .tag_focus_text = .{ 0x40, 0x4b, 0x74 },
// the focused grip: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_day.lua:15 blue; lualine normal-mode section a bg = colors.blue per ~/05-genizah/tokyonight.nvim/lua/lualine/themes/_tokyonight.lua:12 (tokyonight-day.lua calls it with style "day")
- .box = .{ 0x2e, 0x7d, 0xe9 },
- // derived: the grip at rest, the accent #2e7de9 faded toward the unfocused tag #d0d5e3 as far as 1.6:1 off it (0.50 of the way)
- .box_dim = .{ 0x7f, 0xa9, 0xe6 },
+ .accent = .{ 0x2e, 0x7d, 0xe9 },
// an unsaved grip: the original's modified colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:254 diffChanged guifg (= palette git.change)
- .box_dirty = .{ 0x50, 0x6d, 0x9c },
+ .dirty = .{ 0x50, 0x6d, 0x9c },
// derived: the column grip, the original's type colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:228 Type guifg
- .column_box = .{ 0x18, 0x80, 0x92 },
+ .column_grip = .{ 0x18, 0x80, 0x92 },
// ~/05-genizah/tokyonight.nvim/lua/tokyonight/groups/treesitter.lua:36 ["@keyword"] = c.purple, ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_day.lua:55 purple (vim's regex Keyword is #007197)
- .kw = .{ 0x78, 0x47, 0xbd },
+ .keyword = .{ 0x78, 0x47, 0xbd },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:221 String guifg
- .str = .{ 0x58, 0x75, 0x39 },
+ .string = .{ 0x58, 0x75, 0x39 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:27 Constant guifg (Number is not defined by the theme, so Neovim's default link Number->Constant applies)
- .num = .{ 0xb1, 0x5c, 0x00 },
+ .number = .{ 0xb1, 0x5c, 0x00 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:24 Comment guifg
.comment = .{ 0x84, 0x8c, 0xb5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:91 LineNr guifg
- .lineno = .{ 0xa8, 0xae, 0xcb },
+ .line_number = .{ 0xa8, 0xae, 0xcb },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:34 CursorLineNr guifg
- .lineno_active = .{ 0xb1, 0x5c, 0x00 },
+ .line_number_current = .{ 0xb1, 0x5c, 0x00 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:201 PmenuSbar guibg
- .scroll_track = .{ 0xc8, 0xcf, 0xe1 },
+ .rail = .{ 0xc8, 0xcf, 0xe1 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:203 PmenuThumb guibg #a8aecb, adjusted
- .scroll_thumb = .{ 0x9f, 0xa8, 0xca },
+ .rail_thumb = .{ 0x9f, 0xa8, 0xca },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:250 WinSeparator guifg
- .border = .{ 0xb4, 0xb5, 0xb9 },
+ .rule = .{ 0xb4, 0xb5, 0xb9 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:207 Search guibg
- .search_bg = .{ 0x78, 0x90, 0xdd },
- // ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:207 Search guifg
- .search_fg = .{ 0x37, 0x60, 0xbf },
+ .hit = .{ 0x78, 0x90, 0xdd },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:36 DiagnosticError guifg
- .diagnostic_error = .{ 0xc6, 0x43, 0x43 },
+ .@"error" = .{ 0xc6, 0x43, 0x43 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:48 DiagnosticWarn guifg
- .diagnostic_warning = .{ 0x8c, 0x6c, 0x3e },
+ .warning = .{ 0x8c, 0x6c, 0x3e },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:38 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x07, 0x87, 0x9d },
+ .info = .{ 0x07, 0x87, 0x9d },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-day.vim:37 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x11, 0x8c, 0x74 },
- .palette = .{
+ .hint = .{ 0x11, 0x8c, 0x74 },
+ .ansi = .{
.{ 0xb4, 0xb5, 0xb9 }, // 0: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_day.lua:61 terminal.black (vim.g.terminal_color_0 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0xf5, 0x2a, 0x65 }, // 1: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_day.lua:71 terminal.red (vim.g.terminal_color_1 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0x58, 0x75, 0x39 }, // 2: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_day.lua:67 terminal.green (vim.g.terminal_color_2 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
diff --git a/core/themes/tokyonight_moon.zig b/core/themes/tokyonight_moon.zig
index 04c1bccc..b96663e7 100644
--- a/core/themes/tokyonight_moon.zig
+++ b/core/themes/tokyonight_moon.zig
@@ -22,63 +22,63 @@
//! named colours); terminal.* omitted from palette since it is the ansi list.
//! ansi matches extras/kitty/tokyonight_moon.conf color0-15. Lowercased from
//! upstream uppercase hex: bg_dark1.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #1e2030 -> #1a1c2c: 1.05:1 off the page, now 1.10:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - search hit #3e68d7 -> #543d2d: 3.03:1 off the page, now 1.52:1 (R8: 1.5:1, the text reading on it)
+//! - error #c53b53 -> #e85c70: 3.00:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "tokyonight_moon",
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:193 Normal guibg
- .bg = .{ 0x22, 0x24, 0x36 },
+ .page = .{ 0x22, 0x24, 0x36 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:193 Normal guifg
- .fg = .{ 0xc8, 0xd3, 0xf5 },
+ .text = .{ 0xc8, 0xd3, 0xf5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:245 Visual guibg
- .sel_bg = .{ 0x2d, 0x3f, 0x76 },
+ .selection = .{ 0x2d, 0x3f, 0x76 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xc8, 0xd3, 0xf5 },
+ .selection_text = .{ 0xc8, 0xd3, 0xf5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:220 StatusLineNC guibg
- .tag_bg = .{ 0x1e, 0x20, 0x30 },
+ .tag = .{ 0x1e, 0x20, 0x30 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:220 StatusLineNC guifg #3b4261, adjusted
- .tag_fg = .{ 0x85, 0x8a, 0x9d },
+ .tag_text = .{ 0x85, 0x8a, 0x9d },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:219 StatusLine guibg #1e2030, adjusted
- .tag_active_bg = .{ 0x3a, 0x3e, 0x56 },
+ .tag_focus = .{ 0x3a, 0x3e, 0x56 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:219 StatusLine guifg #828bb8, adjusted
- .tag_active_fg = .{ 0xa3, 0xa9, 0xca },
+ .tag_focus_text = .{ 0xa3, 0xa9, 0xca },
// the focused grip: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_moon.lua:15 blue; lualine normal-mode section a bg = colors.blue per ~/05-genizah/tokyonight.nvim/lua/lualine/themes/_tokyonight.lua:12 (tokyonight-moon.lua calls it with style "moon")
- .box = .{ 0x82, 0xaa, 0xff },
- // derived: the grip at rest, the accent #82aaff faded toward the unfocused tag #1e2030 as far as 1.6:1 off it (0.26 of the way)
- .box_dim = .{ 0x38, 0x44, 0x66 },
+ .accent = .{ 0x82, 0xaa, 0xff },
// an unsaved grip: the original's warning colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:48 DiagnosticWarn guifg
- .box_dirty = .{ 0xff, 0xc7, 0x77 },
+ .dirty = .{ 0xff, 0xc7, 0x77 },
// derived: the column grip, the original's string colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:221 String guifg
- .column_box = .{ 0xc3, 0xe8, 0x8d },
+ .column_grip = .{ 0xc3, 0xe8, 0x8d },
// ~/05-genizah/tokyonight.nvim/lua/tokyonight/groups/treesitter.lua:36 ["@keyword"] = c.purple, ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_moon.lua:55 purple (vim's regex Keyword is #86e1fc)
- .kw = .{ 0xfc, 0xa7, 0xea },
+ .keyword = .{ 0xfc, 0xa7, 0xea },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:221 String guifg
- .str = .{ 0xc3, 0xe8, 0x8d },
+ .string = .{ 0xc3, 0xe8, 0x8d },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:27 Constant guifg (Number is not defined by the theme, so Neovim's default link Number->Constant applies)
- .num = .{ 0xff, 0x96, 0x6c },
+ .number = .{ 0xff, 0x96, 0x6c },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:24 Comment guifg
.comment = .{ 0x63, 0x6d, 0xa6 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:91 LineNr guifg
- .lineno = .{ 0x3b, 0x42, 0x61 },
+ .line_number = .{ 0x3b, 0x42, 0x61 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:34 CursorLineNr guifg
- .lineno_active = .{ 0xff, 0x96, 0x6c },
+ .line_number_current = .{ 0xff, 0x96, 0x6c },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:201 PmenuSbar guibg
- .scroll_track = .{ 0x27, 0x29, 0x3a },
+ .rail = .{ 0x27, 0x29, 0x3a },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:203 PmenuThumb guibg #3b4261, adjusted
- .scroll_thumb = .{ 0x3e, 0x45, 0x64 },
+ .rail_thumb = .{ 0x3e, 0x45, 0x64 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:250 WinSeparator guifg #1b1d2b, adjusted
- .border = .{ 0x41, 0x45, 0x57 },
+ .rule = .{ 0x41, 0x45, 0x57 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:207 Search guibg
- .search_bg = .{ 0x3e, 0x68, 0xd7 },
- // ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:207 Search guifg
- .search_fg = .{ 0xc8, 0xd3, 0xf5 },
+ .hit = .{ 0x3e, 0x68, 0xd7 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:36 DiagnosticError guifg
- .diagnostic_error = .{ 0xc5, 0x3b, 0x53 },
+ .@"error" = .{ 0xc5, 0x3b, 0x53 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:48 DiagnosticWarn guifg
- .diagnostic_warning = .{ 0xff, 0xc7, 0x77 },
+ .warning = .{ 0xff, 0xc7, 0x77 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:38 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x0d, 0xb9, 0xd7 },
+ .info = .{ 0x0d, 0xb9, 0xd7 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-moon.vim:37 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x4f, 0xd6, 0xbe },
- .palette = .{
+ .hint = .{ 0x4f, 0xd6, 0xbe },
+ .ansi = .{
.{ 0x1b, 0x1d, 0x2b }, // 0: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_moon.lua:61 terminal.black (vim.g.terminal_color_0 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0xff, 0x75, 0x7f }, // 1: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_moon.lua:71 terminal.red (vim.g.terminal_color_1 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0xc3, 0xe8, 0x8d }, // 2: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_moon.lua:67 terminal.green (vim.g.terminal_color_2 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
diff --git a/core/themes/tokyonight_night.zig b/core/themes/tokyonight_night.zig
index eeb7e5a5..792b1a25 100644
--- a/core/themes/tokyonight_night.zig
+++ b/core/themes/tokyonight_night.zig
@@ -20,63 +20,63 @@
//! named colours); terminal.* omitted from palette since it is the ansi list.
//! ansi matches extras/kitty/tokyonight_night.conf color0-15. Lowercased from
//! upstream uppercase hex: bg_dark1.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #16161e -> #101018: 1.05:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - search hit #3d59a1 -> #4e351d: 2.56:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #db4b4b -> #e25251: 4.17:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "tokyonight_night",
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:193 Normal guibg
- .bg = .{ 0x1a, 0x1b, 0x26 },
+ .page = .{ 0x1a, 0x1b, 0x26 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:193 Normal guifg
- .fg = .{ 0xc0, 0xca, 0xf5 },
+ .text = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:245 Visual guibg
- .sel_bg = .{ 0x28, 0x34, 0x57 },
+ .selection = .{ 0x28, 0x34, 0x57 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xc0, 0xca, 0xf5 },
+ .selection_text = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:220 StatusLineNC guibg
- .tag_bg = .{ 0x16, 0x16, 0x1e },
+ .tag = .{ 0x16, 0x16, 0x1e },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:220 StatusLineNC guifg #3b4261, adjusted
- .tag_fg = .{ 0x7e, 0x82, 0x97 },
+ .tag_text = .{ 0x7e, 0x82, 0x97 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:219 StatusLine guibg #16161e, adjusted
- .tag_active_bg = .{ 0x36, 0x38, 0x46 },
+ .tag_focus = .{ 0x36, 0x38, 0x46 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:219 StatusLine guifg
- .tag_active_fg = .{ 0xa9, 0xb1, 0xd6 },
+ .tag_focus_text = .{ 0xa9, 0xb1, 0xd6 },
// the focused grip: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_night.lua:15 blue; lualine normal-mode section a bg = colors.blue per ~/05-genizah/tokyonight.nvim/lua/lualine/themes/_tokyonight.lua:12 (tokyonight-night.lua calls it with style "night")
- .box = .{ 0x7a, 0xa2, 0xf7 },
- // derived: the grip at rest, the accent #7aa2f7 faded toward the unfocused tag #16161e as far as 1.6:1 off it (0.28 of the way)
- .box_dim = .{ 0x32, 0x3d, 0x5b },
+ .accent = .{ 0x7a, 0xa2, 0xf7 },
// an unsaved grip: the original's modified colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:254 diffChanged guifg (= palette git.change)
- .box_dirty = .{ 0x61, 0x83, 0xbb },
+ .dirty = .{ 0x61, 0x83, 0xbb },
// derived: the column grip, the original's type colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:228 Type guifg
- .column_box = .{ 0x2a, 0xc3, 0xde },
+ .column_grip = .{ 0x2a, 0xc3, 0xde },
// ~/05-genizah/tokyonight.nvim/lua/tokyonight/groups/treesitter.lua:36 ["@keyword"] = c.purple, ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_night.lua:55 purple (vim's regex Keyword is #7dcfff)
- .kw = .{ 0x9d, 0x7c, 0xd8 },
+ .keyword = .{ 0x9d, 0x7c, 0xd8 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:221 String guifg
- .str = .{ 0x9e, 0xce, 0x6a },
+ .string = .{ 0x9e, 0xce, 0x6a },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:27 Constant guifg (Number is not defined by the theme, so Neovim's default link Number->Constant applies)
- .num = .{ 0xff, 0x9e, 0x64 },
+ .number = .{ 0xff, 0x9e, 0x64 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:24 Comment guifg
.comment = .{ 0x56, 0x5f, 0x89 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:91 LineNr guifg
- .lineno = .{ 0x3b, 0x42, 0x61 },
+ .line_number = .{ 0x3b, 0x42, 0x61 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:34 CursorLineNr guifg
- .lineno_active = .{ 0xff, 0x9e, 0x64 },
+ .line_number_current = .{ 0xff, 0x9e, 0x64 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:201 PmenuSbar guibg
- .scroll_track = .{ 0x1f, 0x1f, 0x29 },
+ .rail = .{ 0x1f, 0x1f, 0x29 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:203 PmenuThumb guibg
- .scroll_thumb = .{ 0x3b, 0x42, 0x61 },
+ .rail_thumb = .{ 0x3b, 0x42, 0x61 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:250 WinSeparator guifg #15161e, adjusted
- .border = .{ 0x3b, 0x3e, 0x4d },
+ .rule = .{ 0x3b, 0x3e, 0x4d },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:207 Search guibg
- .search_bg = .{ 0x3d, 0x59, 0xa1 },
- // ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:207 Search guifg
- .search_fg = .{ 0xc0, 0xca, 0xf5 },
+ .hit = .{ 0x3d, 0x59, 0xa1 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:36 DiagnosticError guifg
- .diagnostic_error = .{ 0xdb, 0x4b, 0x4b },
+ .@"error" = .{ 0xdb, 0x4b, 0x4b },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:48 DiagnosticWarn guifg
- .diagnostic_warning = .{ 0xe0, 0xaf, 0x68 },
+ .warning = .{ 0xe0, 0xaf, 0x68 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:38 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x0d, 0xb9, 0xd7 },
+ .info = .{ 0x0d, 0xb9, 0xd7 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-night.vim:37 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x1a, 0xbc, 0x9c },
- .palette = .{
+ .hint = .{ 0x1a, 0xbc, 0x9c },
+ .ansi = .{
.{ 0x15, 0x16, 0x1e }, // 0: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_night.lua:61 terminal.black (vim.g.terminal_color_0 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0xf7, 0x76, 0x8e }, // 1: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_night.lua:71 terminal.red (vim.g.terminal_color_1 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0x9e, 0xce, 0x6a }, // 2: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_night.lua:67 terminal.green (vim.g.terminal_color_2 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
diff --git a/core/themes/tokyonight_storm.zig b/core/themes/tokyonight_storm.zig
index 5fadf177..f46dc56b 100644
--- a/core/themes/tokyonight_storm.zig
+++ b/core/themes/tokyonight_storm.zig
@@ -20,63 +20,65 @@
//! (colors.blue). Palette skips 'none' and the 'rainbow' list (duplicates of
//! named colours); terminal.* omitted from palette since it is the ansi list.
//! ansi matches extras/kitty/tokyonight_storm.conf color0-15.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - tag ground #1f2335 -> #1c2032: 1.07:1 off the page, now 1.11:1 (H: a band 1.1:1 off the page; R3: tone on tone)
+//! - unsaved grip #6183bb -> #6c8fc7: 4.20:1 on the tag, now 4.91:1 (R6: 3:1 on both tags)
+//! - selection #2e3c64 -> #2d3c7a: 1.35:1 off the page, now 1.41:1 (R7)
+//! - search hit #3d59a1 -> #554031: 2.18:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
+//! - error #db4b4b -> #f05f5c: 3.55:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "tokyonight_storm",
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:193 Normal guibg
- .bg = .{ 0x24, 0x28, 0x3b },
+ .page = .{ 0x24, 0x28, 0x3b },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:193 Normal guifg
- .fg = .{ 0xc0, 0xca, 0xf5 },
+ .text = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:245 Visual guibg
- .sel_bg = .{ 0x2e, 0x3c, 0x64 },
+ .selection = .{ 0x2e, 0x3c, 0x64 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xc0, 0xca, 0xf5 },
+ .selection_text = .{ 0xc0, 0xca, 0xf5 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:220 StatusLineNC guibg
- .tag_bg = .{ 0x1f, 0x23, 0x35 },
+ .tag = .{ 0x1f, 0x23, 0x35 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:220 StatusLineNC guifg #3b4261, adjusted
- .tag_fg = .{ 0x85, 0x8a, 0x9d },
+ .tag_text = .{ 0x85, 0x8a, 0x9d },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:219 StatusLine guibg #1f2335, adjusted
- .tag_active_bg = .{ 0x3d, 0x42, 0x58 },
+ .tag_focus = .{ 0x3d, 0x42, 0x58 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:219 StatusLine guifg
- .tag_active_fg = .{ 0xa9, 0xb1, 0xd6 },
+ .tag_focus_text = .{ 0xa9, 0xb1, 0xd6 },
// the focused grip: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_storm.lua:15 blue; lualine normal-mode section a bg = colors.blue per ~/05-genizah/tokyonight.nvim/lua/lualine/themes/_tokyonight.lua:12 (tokyonight-storm.lua calls it with style "storm")
- .box = .{ 0x7a, 0xa2, 0xf7 },
- // derived: the grip at rest, the accent #7aa2f7 faded toward the unfocused tag #1f2335 as far as 1.6:1 off it (0.26 of the way)
- .box_dim = .{ 0x37, 0x44, 0x67 },
+ .accent = .{ 0x7a, 0xa2, 0xf7 },
// an unsaved grip: the original's modified colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:254 diffChanged guifg (= palette git.change)
- .box_dirty = .{ 0x61, 0x83, 0xbb },
+ .dirty = .{ 0x61, 0x83, 0xbb },
// derived: the column grip, the original's type colour, ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:228 Type guifg
- .column_box = .{ 0x2a, 0xc3, 0xde },
+ .column_grip = .{ 0x2a, 0xc3, 0xde },
// ~/05-genizah/tokyonight.nvim/lua/tokyonight/groups/treesitter.lua:36 ["@keyword"] = c.purple, ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_storm.lua:55 purple (vim's regex Keyword is #7dcfff)
- .kw = .{ 0x9d, 0x7c, 0xd8 },
+ .keyword = .{ 0x9d, 0x7c, 0xd8 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:221 String guifg
- .str = .{ 0x9e, 0xce, 0x6a },
+ .string = .{ 0x9e, 0xce, 0x6a },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:27 Constant guifg (Number is not defined by the theme, so Neovim's default link Number->Constant applies)
- .num = .{ 0xff, 0x9e, 0x64 },
+ .number = .{ 0xff, 0x9e, 0x64 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:24 Comment guifg
.comment = .{ 0x56, 0x5f, 0x89 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:91 LineNr guifg
- .lineno = .{ 0x3b, 0x42, 0x61 },
+ .line_number = .{ 0x3b, 0x42, 0x61 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:34 CursorLineNr guifg
- .lineno_active = .{ 0xff, 0x9e, 0x64 },
+ .line_number_current = .{ 0xff, 0x9e, 0x64 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:201 PmenuSbar guibg
- .scroll_track = .{ 0x27, 0x2b, 0x3f },
+ .rail = .{ 0x27, 0x2b, 0x3f },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:203 PmenuThumb guibg #3b4261, adjusted
- .scroll_thumb = .{ 0x40, 0x47, 0x67 },
+ .rail_thumb = .{ 0x40, 0x47, 0x67 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:250 WinSeparator guifg #1d202f, adjusted
- .border = .{ 0x44, 0x49, 0x5f },
+ .rule = .{ 0x44, 0x49, 0x5f },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:207 Search guibg
- .search_bg = .{ 0x3d, 0x59, 0xa1 },
- // ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:207 Search guifg
- .search_fg = .{ 0xc0, 0xca, 0xf5 },
+ .hit = .{ 0x3d, 0x59, 0xa1 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:36 DiagnosticError guifg
- .diagnostic_error = .{ 0xdb, 0x4b, 0x4b },
+ .@"error" = .{ 0xdb, 0x4b, 0x4b },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:48 DiagnosticWarn guifg
- .diagnostic_warning = .{ 0xe0, 0xaf, 0x68 },
+ .warning = .{ 0xe0, 0xaf, 0x68 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:38 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x0d, 0xb9, 0xd7 },
+ .info = .{ 0x0d, 0xb9, 0xd7 },
// ~/05-genizah/tokyonight.nvim/extras/vim/colors/tokyonight-storm.vim:37 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x1a, 0xbc, 0x9c },
- .palette = .{
+ .hint = .{ 0x1a, 0xbc, 0x9c },
+ .ansi = .{
.{ 0x1d, 0x20, 0x2f }, // 0: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_storm.lua:61 terminal.black (vim.g.terminal_color_0 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0xf7, 0x76, 0x8e }, // 1: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_storm.lua:71 terminal.red (vim.g.terminal_color_1 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
.{ 0x9e, 0xce, 0x6a }, // 2: ~/05-genizah/tokyonight.nvim/extras/lua/tokyonight_storm.lua:67 terminal.green (vim.g.terminal_color_2 per ~/05-genizah/tokyonight.nvim/lua/tokyonight/theme.lua:33-57)
diff --git a/core/themes/vimbones.zig b/core/themes/vimbones.zig
index 1823c40d..e2f5ea34 100644
--- a/core/themes/vimbones.zig
+++ b/core/themes/vimbones.zig
@@ -18,63 +18,62 @@
//! links to StatusLine, TabLineFill to StatusLineNC. Accent is the lualine
//! normal-mode a bg, a muted neutral (the theme is contrast-based, not
//! hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #a2a287 -> #6e6e55: 1.51:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - selection #d7d7d7 -> #d8d8b3: 1.24:1 off the page, now 1.25:1 (R7)
pub const theme = .{
.name = "vimbones",
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:34 Normal guibg
- .bg = .{ 0xf0, 0xf0, 0xca },
+ .page = .{ 0xf0, 0xf0, 0xca },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:34 Normal guifg
- .fg = .{ 0x35, 0x35, 0x35 },
+ .text = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:212 Visual guibg
- .sel_bg = .{ 0xd7, 0xd7, 0xd7 },
+ .selection = .{ 0xd7, 0xd7, 0xd7 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x35, 0x35, 0x35 },
+ .selection_text = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:199 StatusLineNC guibg
- .tag_bg = .{ 0xdf, 0xdf, 0xbc },
+ .tag = .{ 0xdf, 0xdf, 0xbc },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:199 StatusLineNC guifg #686868, adjusted
- .tag_fg = .{ 0x60, 0x60, 0x60 },
+ .tag_text = .{ 0x60, 0x60, 0x60 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:196 StatusLine guibg #d1d1b0, adjusted
- .tag_active_bg = .{ 0xc7, 0xc7, 0xa8 },
+ .tag_focus = .{ 0xc7, 0xc7, 0xa8 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:196 StatusLine guifg
- .tag_active_fg = .{ 0x35, 0x35, 0x35 },
+ .tag_focus_text = .{ 0x35, 0x35, 0x35 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/vimbones_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0xa2, 0xa2, 0x87 },
- // derived: the grip at rest, the accent #b0b093 faded toward the unfocused tag #dfdfbc as far as 1.6:1 off it (1.00 of the way)
- .box_dim = .{ 0xb0, 0xb0, 0x93 },
+ .accent = .{ 0xa2, 0xa2, 0x87 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/vimbones.vim:42 Changed guifg
- .box_dirty = .{ 0x28, 0x64, 0x86 },
+ .dirty = .{ 0x28, 0x64, 0x86 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/vimbones.vim:208 Type guifg
- .column_box = .{ 0x5b, 0x5b, 0x42 },
+ .column_grip = .{ 0x5b, 0x5b, 0x42 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:193 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x15, 0x6a, 0x29 },
+ .keyword = .{ 0x15, 0x6a, 0x29 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:202 String guifg
- .str = .{ 0x63, 0x63, 0x63 },
+ .string = .{ 0x63, 0x63, 0x63 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:165 Number guifg
- .num = .{ 0x2a, 0x65, 0x35 },
+ .number = .{ 0x2a, 0x65, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:48 Comment guifg
.comment = .{ 0x8c, 0x8c, 0x7c },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:151 LineNr guifg
- .lineno = .{ 0x9a, 0x9a, 0x81 },
+ .line_number = .{ 0x9a, 0x9a, 0x81 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:63 CursorLineNr guifg
- .lineno_active = .{ 0x35, 0x35, 0x35 },
+ .line_number_current = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:168 PmenuSbar guibg
- .scroll_track = .{ 0xa7, 0xa7, 0x8d },
+ .rail = .{ 0xa7, 0xa7, 0x8d },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:170 PmenuThumb guibg
- .scroll_thumb = .{ 0xf9, 0xf9, 0xd2 },
+ .rail_thumb = .{ 0xf9, 0xf9, 0xd2 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:219 WinSeparator guifg
- .border = .{ 0x9a, 0x9a, 0x81 },
+ .rule = .{ 0x9a, 0x9a, 0x81 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:174 Search guibg
- .search_bg = .{ 0xde, 0xb9, 0xd6 },
- // ~/05-genizah/zenbones.nvim/colors/vimbones.vim:174 Search guifg
- .search_fg = .{ 0x35, 0x35, 0x35 },
+ .hit = .{ 0xde, 0xb9, 0xd6 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:114 Error guifg via DiagnosticError->Error (link :115)
- .diagnostic_error = .{ 0xa8, 0x33, 0x4c },
+ .@"error" = .{ 0xa8, 0x33, 0x4c },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:213 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :214)
- .diagnostic_warning = .{ 0x94, 0x49, 0x27 },
+ .warning = .{ 0x94, 0x49, 0x27 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:73 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x28, 0x64, 0x86 },
+ .info = .{ 0x28, 0x64, 0x86 },
// ~/05-genizah/zenbones.nvim/colors/vimbones.vim:68 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x88, 0x50, 0x7d },
- .palette = .{
+ .hint = .{ 0x88, 0x50, 0x7d },
+ .ansi = .{
.{ 0xf0, 0xf0, 0xca }, // 0: ~/05-genizah/zenbones.nvim/colors/vimbones.vim:18 g:terminal_color_0
.{ 0xa8, 0x33, 0x4c }, // 1: ~/05-genizah/zenbones.nvim/colors/vimbones.vim:19 g:terminal_color_1
.{ 0x4f, 0x6c, 0x31 }, // 2: ~/05-genizah/zenbones.nvim/colors/vimbones.vim:20 g:terminal_color_2
diff --git a/core/themes/zenbones_dark.zig b/core/themes/zenbones_dark.zig
index 89f5a934..6d5b5f55 100644
--- a/core/themes/zenbones_dark.zig
+++ b/core/themes/zenbones_dark.zig
@@ -15,63 +15,62 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #635b58 -> #928986: 1.55:1 on the focused tag, now 3.00:1 (R6: 3:1)
+//! - search hit #65435e -> #5a2c14: 2.10:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
pub const theme = .{
.name = "zenbones_dark",
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:33 Normal guibg
- .bg = .{ 0x1c, 0x19, 0x17 },
+ .page = .{ 0x1c, 0x19, 0x17 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:33 Normal guifg
- .fg = .{ 0xb4, 0xbd, 0xc3 },
+ .text = .{ 0xb4, 0xbd, 0xc3 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:211 Visual guibg
- .sel_bg = .{ 0x3d, 0x40, 0x42 },
+ .selection = .{ 0x3d, 0x40, 0x42 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xb4, 0xbd, 0xc3 },
+ .selection_text = .{ 0xb4, 0xbd, 0xc3 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:198 StatusLineNC guibg
- .tag_bg = .{ 0x27, 0x23, 0x21 },
+ .tag = .{ 0x27, 0x23, 0x21 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:198 StatusLineNC guifg
- .tag_fg = .{ 0xca, 0xd0, 0xd4 },
+ .tag_text = .{ 0xca, 0xd0, 0xd4 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:195 StatusLine guibg #352f2d, adjusted
- .tag_active_bg = .{ 0x47, 0x3f, 0x3d },
+ .tag_focus = .{ 0x47, 0x3f, 0x3d },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:195 StatusLine guifg
- .tag_active_fg = .{ 0xb4, 0xbd, 0xc3 },
+ .tag_focus_text = .{ 0xb4, 0xbd, 0xc3 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/zenbones_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x63, 0x5b, 0x58 },
- // derived: the grip at rest, the accent #59514d faded toward the unfocused tag #272321 as far as 1.6:1 off it (0.72 of the way)
- .box_dim = .{ 0x4b, 0x44, 0x41 },
+ .accent = .{ 0x63, 0x5b, 0x58 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/zenbones.vim:41 Changed guifg
- .box_dirty = .{ 0x60, 0x99, 0xc0 },
+ .dirty = .{ 0x60, 0x99, 0xc0 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/zenbones.vim:207 Type guifg
- .column_box = .{ 0xa1, 0x93, 0x8c },
+ .column_grip = .{ 0xa1, 0x93, 0x8c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:191 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xb4, 0xbd, 0xc3 },
+ .keyword = .{ 0xb4, 0xbd, 0xc3 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:201 String guifg
- .str = .{ 0x86, 0x8c, 0x91 },
+ .string = .{ 0x86, 0x8c, 0x91 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:164 Number guifg
- .num = .{ 0x86, 0x8c, 0x91 },
+ .number = .{ 0x86, 0x8c, 0x91 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:47 Comment guifg
.comment = .{ 0x6e, 0x67, 0x63 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:150 LineNr guifg
- .lineno = .{ 0x68, 0x5f, 0x5a },
+ .line_number = .{ 0x68, 0x5f, 0x5a },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:62 CursorLineNr guifg
- .lineno_active = .{ 0xb4, 0xbd, 0xc3 },
+ .line_number_current = .{ 0xb4, 0xbd, 0xc3 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:167 PmenuSbar guibg
- .scroll_track = .{ 0x61, 0x58, 0x53 },
+ .rail = .{ 0x61, 0x58, 0x53 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:169 PmenuThumb guibg
- .scroll_thumb = .{ 0x8e, 0x81, 0x7b },
+ .rail_thumb = .{ 0x8e, 0x81, 0x7b },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:218 WinSeparator guifg
- .border = .{ 0x68, 0x5f, 0x5a },
+ .rule = .{ 0x68, 0x5f, 0x5a },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:172 Search guibg
- .search_bg = .{ 0x65, 0x43, 0x5e },
- // ~/05-genizah/zenbones.nvim/colors/zenbones.vim:172 Search guifg
- .search_fg = .{ 0xb4, 0xbd, 0xc3 },
+ .hit = .{ 0x65, 0x43, 0x5e },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:113 Error guifg via DiagnosticError->Error (link :114)
- .diagnostic_error = .{ 0xde, 0x6e, 0x7c },
+ .@"error" = .{ 0xde, 0x6e, 0x7c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:212 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :213)
- .diagnostic_warning = .{ 0xb7, 0x7e, 0x64 },
+ .warning = .{ 0xb7, 0x7e, 0x64 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:72 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x60, 0x99, 0xc0 },
+ .info = .{ 0x60, 0x99, 0xc0 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:67 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xb2, 0x79, 0xa7 },
- .palette = .{
+ .hint = .{ 0xb2, 0x79, 0xa7 },
+ .ansi = .{
.{ 0x1c, 0x19, 0x17 }, // 0: ~/05-genizah/zenbones.nvim/colors/zenbones.vim:17 g:terminal_color_0
.{ 0xde, 0x6e, 0x7c }, // 1: ~/05-genizah/zenbones.nvim/colors/zenbones.vim:18 g:terminal_color_1
.{ 0x81, 0x9b, 0x69 }, // 2: ~/05-genizah/zenbones.nvim/colors/zenbones.vim:19 g:terminal_color_2
diff --git a/core/themes/zenbones_light.zig b/core/themes/zenbones_light.zig
index 8d5cc2b8..b60b6d54 100644
--- a/core/themes/zenbones_light.zig
+++ b/core/themes/zenbones_light.zig
@@ -16,63 +16,62 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #ac9d96 -> #786a64: 1.52:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - selection #cbd9e3 -> #ccd7e0: 1.24:1 off the page, now 1.26:1 (R7)
pub const theme = .{
.name = "zenbones_light",
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:267 Normal guibg
- .bg = .{ 0xf0, 0xed, 0xec },
+ .page = .{ 0xf0, 0xed, 0xec },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:267 Normal guifg
- .fg = .{ 0x2c, 0x36, 0x3c },
+ .text = .{ 0x2c, 0x36, 0x3c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:445 Visual guibg
- .sel_bg = .{ 0xcb, 0xd9, 0xe3 },
+ .selection = .{ 0xcb, 0xd9, 0xe3 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x2c, 0x36, 0x3c },
+ .selection_text = .{ 0x2c, 0x36, 0x3c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:432 StatusLineNC guibg
- .tag_bg = .{ 0xe1, 0xdc, 0xd9 },
+ .tag = .{ 0xe1, 0xdc, 0xd9 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:432 StatusLineNC guifg #596a76, adjusted
- .tag_fg = .{ 0x52, 0x62, 0x6d },
+ .tag_text = .{ 0x52, 0x62, 0x6d },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:429 StatusLine guibg #d6cdc9, adjusted
- .tag_active_bg = .{ 0xcf, 0xc3, 0xbf },
+ .tag_focus = .{ 0xcf, 0xc3, 0xbf },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:429 StatusLine guifg
- .tag_active_fg = .{ 0x2c, 0x36, 0x3c },
+ .tag_focus_text = .{ 0x2c, 0x36, 0x3c },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/zenbones_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0xac, 0x9d, 0x96 },
- // derived: the grip at rest, the accent #bbaba3 faded toward the unfocused tag #e1dcd9 as far as 1.6:1 off it (0.98 of the way)
- .box_dim = .{ 0xbc, 0xac, 0xa4 },
+ .accent = .{ 0xac, 0x9d, 0x96 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/zenbones.vim:275 Changed guifg
- .box_dirty = .{ 0x28, 0x64, 0x86 },
+ .dirty = .{ 0x28, 0x64, 0x86 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/zenbones.vim:441 Type guifg
- .column_box = .{ 0x6a, 0x55, 0x49 },
+ .column_grip = .{ 0x6a, 0x55, 0x49 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:425 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x2c, 0x36, 0x3c },
+ .keyword = .{ 0x2c, 0x36, 0x3c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:435 String guifg
- .str = .{ 0x55, 0x65, 0x70 },
+ .string = .{ 0x55, 0x65, 0x70 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:398 Number guifg
- .num = .{ 0x55, 0x65, 0x70 },
+ .number = .{ 0x55, 0x65, 0x70 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:281 Comment guifg
.comment = .{ 0x94, 0x89, 0x85 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:384 LineNr guifg
- .lineno = .{ 0xa4, 0x96, 0x8f },
+ .line_number = .{ 0xa4, 0x96, 0x8f },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:296 CursorLineNr guifg
- .lineno_active = .{ 0x2c, 0x36, 0x3c },
+ .line_number_current = .{ 0x2c, 0x36, 0x3c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:401 PmenuSbar guibg
- .scroll_track = .{ 0xb2, 0xa3, 0x9b },
+ .rail = .{ 0xb2, 0xa3, 0x9b },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:403 PmenuThumb guibg
- .scroll_thumb = .{ 0xf7, 0xf6, 0xf5 },
+ .rail_thumb = .{ 0xf7, 0xf6, 0xf5 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:452 WinSeparator guifg
- .border = .{ 0xa4, 0x96, 0x8f },
+ .rule = .{ 0xa4, 0x96, 0x8f },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:406 Search guibg
- .search_bg = .{ 0xde, 0xb9, 0xd6 },
- // ~/05-genizah/zenbones.nvim/colors/zenbones.vim:406 Search guifg
- .search_fg = .{ 0x2c, 0x36, 0x3c },
+ .hit = .{ 0xde, 0xb9, 0xd6 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:347 Error guifg via DiagnosticError->Error (link :348)
- .diagnostic_error = .{ 0xa8, 0x33, 0x4c },
+ .@"error" = .{ 0xa8, 0x33, 0x4c },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:446 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :447)
- .diagnostic_warning = .{ 0x94, 0x49, 0x27 },
+ .warning = .{ 0x94, 0x49, 0x27 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:306 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x28, 0x64, 0x86 },
+ .info = .{ 0x28, 0x64, 0x86 },
// ~/05-genizah/zenbones.nvim/colors/zenbones.vim:301 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x88, 0x50, 0x7d },
- .palette = .{
+ .hint = .{ 0x88, 0x50, 0x7d },
+ .ansi = .{
.{ 0xf0, 0xed, 0xec }, // 0: ~/05-genizah/zenbones.nvim/colors/zenbones.vim:251 g:terminal_color_0
.{ 0xa8, 0x33, 0x4c }, // 1: ~/05-genizah/zenbones.nvim/colors/zenbones.vim:252 g:terminal_color_1
.{ 0x4f, 0x6c, 0x31 }, // 2: ~/05-genizah/zenbones.nvim/colors/zenbones.vim:253 g:terminal_color_2
diff --git a/core/themes/zenburned.zig b/core/themes/zenburned.zig
index 3c8baa82..4e9df574 100644
--- a/core/themes/zenburned.zig
+++ b/core/themes/zenburned.zig
@@ -15,63 +15,68 @@
//! (bold only), so it inherits Normal. TabLine links to StatusLine, TabLineFill
//! to StatusLineNC. Accent is the lualine normal-mode a bg, a muted neutral
//! (the theme is contrast-based, not hue-accented). Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #838383 -> #b9b9b9: 1.56:1 on the focused tag, now 3.02:1 (R6: 3:1)
+//! - unsaved grip #6099c0 -> #86c0e8: 2.92:1 on the tag, now 4.60:1 (R6: 3:1 on both tags)
+//! - selection text #f0e4cf -> #f6ead4: 4.29:1 on the selection, now 4.53:1 (R7: 4.5:1)
+//! - search hit #9c6992 -> #7d4f3a: 2.39:1 off the page, now 1.51:1 (R8: 1.5:1, the text reading on it)
+//! - error #e3716e -> #fe8985: 3.38:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others)
+//! - warning #b77e64 -> #d99e83: 3.05:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - info #6099c0 -> #78b2da: 3.36:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others)
+//! - hint #b279a7 -> #d499c8: 3.05:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others)
pub const theme = .{
.name = "zenburned",
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:34 Normal guibg
- .bg = .{ 0x40, 0x40, 0x40 },
+ .page = .{ 0x40, 0x40, 0x40 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:34 Normal guifg
- .fg = .{ 0xf0, 0xe4, 0xcf },
+ .text = .{ 0xf0, 0xe4, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:212 Visual guibg
- .sel_bg = .{ 0x74, 0x69, 0x56 },
+ .selection = .{ 0x74, 0x69, 0x56 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xf0, 0xe4, 0xcf },
+ .selection_text = .{ 0xf0, 0xe4, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:199 StatusLineNC guibg
- .tag_bg = .{ 0x49, 0x49, 0x49 },
+ .tag = .{ 0x49, 0x49, 0x49 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:199 StatusLineNC guifg
- .tag_fg = .{ 0xf5, 0xed, 0xe0 },
+ .tag_text = .{ 0xf5, 0xed, 0xe0 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:196 StatusLine guibg #555555, adjusted
- .tag_active_bg = .{ 0x64, 0x64, 0x64 },
+ .tag_focus = .{ 0x64, 0x64, 0x64 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:196 StatusLine guifg
- .tag_active_fg = .{ 0xf0, 0xe4, 0xcf },
+ .tag_focus_text = .{ 0xf0, 0xe4, 0xcf },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/zenburned_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x83, 0x83, 0x83 },
- // derived: the grip at rest, the accent #6f6f6f faded toward the unfocused tag #494949 as far as 1.6:1 off it (0.82 of the way)
- .box_dim = .{ 0x68, 0x68, 0x68 },
+ .accent = .{ 0x83, 0x83, 0x83 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/zenburned.vim:42 Changed guifg
- .box_dirty = .{ 0x60, 0x99, 0xc0 },
+ .dirty = .{ 0x60, 0x99, 0xc0 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/zenburned.vim:208 Type guifg
- .column_box = .{ 0xa8, 0xa8, 0xa8 },
+ .column_grip = .{ 0xa8, 0xa8, 0xa8 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:193 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xdc, 0xa2, 0xa2 },
+ .keyword = .{ 0xdc, 0xa2, 0xa2 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:202 String guifg
- .str = .{ 0xba, 0xa6, 0x81 },
+ .string = .{ 0xba, 0xa6, 0x81 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:165 Number guifg
- .num = .{ 0xba, 0xa6, 0x81 },
+ .number = .{ 0xba, 0xa6, 0x81 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:48 Comment guifg
.comment = .{ 0x84, 0x84, 0x84 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:151 LineNr guifg
- .lineno = .{ 0x7f, 0x7f, 0x7f },
+ .line_number = .{ 0x7f, 0x7f, 0x7f },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:63 CursorLineNr guifg
- .lineno_active = .{ 0xf0, 0xe4, 0xcf },
+ .line_number_current = .{ 0xf0, 0xe4, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:168 PmenuSbar guibg
- .scroll_track = .{ 0x77, 0x77, 0x77 },
+ .rail = .{ 0x77, 0x77, 0x77 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:170 PmenuThumb guibg
- .scroll_thumb = .{ 0x9b, 0x9b, 0x9b },
+ .rail_thumb = .{ 0x9b, 0x9b, 0x9b },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:219 WinSeparator guifg
- .border = .{ 0x7f, 0x7f, 0x7f },
+ .rule = .{ 0x7f, 0x7f, 0x7f },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:174 Search guibg
- .search_bg = .{ 0x9c, 0x69, 0x92 },
- // ~/05-genizah/zenbones.nvim/colors/zenburned.vim:174 Search guifg
- .search_fg = .{ 0xf0, 0xe4, 0xcf },
+ .hit = .{ 0x9c, 0x69, 0x92 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:114 Error guifg via DiagnosticError->Error (link :115)
- .diagnostic_error = .{ 0xe3, 0x71, 0x6e },
+ .@"error" = .{ 0xe3, 0x71, 0x6e },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:213 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :214)
- .diagnostic_warning = .{ 0xb7, 0x7e, 0x64 },
+ .warning = .{ 0xb7, 0x7e, 0x64 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:73 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x60, 0x99, 0xc0 },
+ .info = .{ 0x60, 0x99, 0xc0 },
// ~/05-genizah/zenbones.nvim/colors/zenburned.vim:68 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xb2, 0x79, 0xa7 },
- .palette = .{
+ .hint = .{ 0xb2, 0x79, 0xa7 },
+ .ansi = .{
.{ 0x40, 0x40, 0x40 }, // 0: ~/05-genizah/zenbones.nvim/colors/zenburned.vim:18 g:terminal_color_0
.{ 0xe3, 0x71, 0x6e }, // 1: ~/05-genizah/zenbones.nvim/colors/zenburned.vim:19 g:terminal_color_1
.{ 0x81, 0x9b, 0x69 }, // 2: ~/05-genizah/zenbones.nvim/colors/zenburned.vim:20 g:terminal_color_2
diff --git a/core/themes/zenwritten_dark.zig b/core/themes/zenwritten_dark.zig
index 76b7047e..ec4db41d 100644
--- a/core/themes/zenwritten_dark.zig
+++ b/core/themes/zenwritten_dark.zig
@@ -15,63 +15,62 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #5c5c5c -> #8c8c8c: 1.53:1 on the focused tag, now 3.04:1 (R6: 3:1)
+//! - search hit #65435e -> #572d18: 2.11:1 off the page, now 1.50:1 (R8: 1.5:1, the text reading on it)
pub const theme = .{
.name = "zenwritten_dark",
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:33 Normal guibg
- .bg = .{ 0x19, 0x19, 0x19 },
+ .page = .{ 0x19, 0x19, 0x19 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:33 Normal guifg
- .fg = .{ 0xbb, 0xbb, 0xbb },
+ .text = .{ 0xbb, 0xbb, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:211 Visual guibg
- .sel_bg = .{ 0x40, 0x40, 0x40 },
+ .selection = .{ 0x40, 0x40, 0x40 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0xbb, 0xbb, 0xbb },
+ .selection_text = .{ 0xbb, 0xbb, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:198 StatusLineNC guibg
- .tag_bg = .{ 0x24, 0x24, 0x24 },
+ .tag = .{ 0x24, 0x24, 0x24 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:198 StatusLineNC guifg
- .tag_fg = .{ 0xcf, 0xcf, 0xcf },
+ .tag_text = .{ 0xcf, 0xcf, 0xcf },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:195 StatusLine guibg #303030, adjusted
- .tag_active_bg = .{ 0x41, 0x41, 0x41 },
+ .tag_focus = .{ 0x41, 0x41, 0x41 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:195 StatusLine guifg
- .tag_active_fg = .{ 0xbb, 0xbb, 0xbb },
+ .tag_focus_text = .{ 0xbb, 0xbb, 0xbb },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/zenwritten_dark_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0x5c, 0x5c, 0x5c },
- // derived: the grip at rest, the accent #525252 faded toward the unfocused tag #242424 as far as 1.6:1 off it (0.72 of the way)
- .box_dim = .{ 0x45, 0x45, 0x45 },
+ .accent = .{ 0x5c, 0x5c, 0x5c },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:41 Changed guifg
- .box_dirty = .{ 0x60, 0x99, 0xc0 },
+ .dirty = .{ 0x60, 0x99, 0xc0 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:207 Type guifg
- .column_box = .{ 0x96, 0x96, 0x96 },
+ .column_grip = .{ 0x96, 0x96, 0x96 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:191 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0xbb, 0xbb, 0xbb },
+ .keyword = .{ 0xbb, 0xbb, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:201 String guifg
- .str = .{ 0x8b, 0x8b, 0x8b },
+ .string = .{ 0x8b, 0x8b, 0x8b },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:164 Number guifg
- .num = .{ 0x8b, 0x8b, 0x8b },
+ .number = .{ 0x8b, 0x8b, 0x8b },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:47 Comment guifg
.comment = .{ 0x68, 0x68, 0x68 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:150 LineNr guifg
- .lineno = .{ 0x61, 0x61, 0x61 },
+ .line_number = .{ 0x61, 0x61, 0x61 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:62 CursorLineNr guifg
- .lineno_active = .{ 0xbb, 0xbb, 0xbb },
+ .line_number_current = .{ 0xbb, 0xbb, 0xbb },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:167 PmenuSbar guibg
- .scroll_track = .{ 0x59, 0x59, 0x59 },
+ .rail = .{ 0x59, 0x59, 0x59 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:169 PmenuThumb guibg
- .scroll_thumb = .{ 0x84, 0x84, 0x84 },
+ .rail_thumb = .{ 0x84, 0x84, 0x84 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:218 WinSeparator guifg
- .border = .{ 0x61, 0x61, 0x61 },
+ .rule = .{ 0x61, 0x61, 0x61 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:172 Search guibg
- .search_bg = .{ 0x65, 0x43, 0x5e },
- // ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:172 Search guifg
- .search_fg = .{ 0xbb, 0xbb, 0xbb },
+ .hit = .{ 0x65, 0x43, 0x5e },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:113 Error guifg via DiagnosticError->Error (link :114)
- .diagnostic_error = .{ 0xde, 0x6e, 0x7c },
+ .@"error" = .{ 0xde, 0x6e, 0x7c },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:212 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :213)
- .diagnostic_warning = .{ 0xb7, 0x7e, 0x64 },
+ .warning = .{ 0xb7, 0x7e, 0x64 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:72 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x60, 0x99, 0xc0 },
+ .info = .{ 0x60, 0x99, 0xc0 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:67 DiagnosticHint guifg
- .diagnostic_hint = .{ 0xb2, 0x79, 0xa7 },
- .palette = .{
+ .hint = .{ 0xb2, 0x79, 0xa7 },
+ .ansi = .{
.{ 0x19, 0x19, 0x19 }, // 0: ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:17 g:terminal_color_0
.{ 0xde, 0x6e, 0x7c }, // 1: ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:18 g:terminal_color_1
.{ 0x81, 0x9b, 0x69 }, // 2: ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:19 g:terminal_color_2
diff --git a/core/themes/zenwritten_light.zig b/core/themes/zenwritten_light.zig
index 42e1623a..4581b1a6 100644
--- a/core/themes/zenwritten_light.zig
+++ b/core/themes/zenwritten_light.zig
@@ -16,63 +16,62 @@
//! StatusLine, TabLineFill to StatusLineNC. Accent is the lualine normal-mode a
//! bg, a muted neutral (the theme is contrast-based, not hue-accented).
//! Modified = Changed fg.
+//! Moved by pardes as it loads, to meet its floors (DESIGN.md G4: that colour alone; colors.Chrome.of):
+//! - focused grip #a0a0a0 -> #6c6c6c: 1.52:1 on the focused tag, now 3.04:1 (R6: 3:1)
+//! - selection #d7d7d7 -> #d6d6d6: 1.24:1 off the page, now 1.25:1 (R7)
pub const theme = .{
.name = "zenwritten_light",
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:267 Normal guibg
- .bg = .{ 0xee, 0xee, 0xee },
+ .page = .{ 0xee, 0xee, 0xee },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:267 Normal guifg
- .fg = .{ 0x35, 0x35, 0x35 },
+ .text = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:445 Visual guibg
- .sel_bg = .{ 0xd7, 0xd7, 0xd7 },
+ .selection = .{ 0xd7, 0xd7, 0xd7 },
// the original keeps text colours over its selection; its text colour
- .sel_fg = .{ 0x35, 0x35, 0x35 },
+ .selection_text = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:432 StatusLineNC guibg
- .tag_bg = .{ 0xdd, 0xdd, 0xdd },
+ .tag = .{ 0xdd, 0xdd, 0xdd },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:432 StatusLineNC guifg #686868, adjusted
- .tag_fg = .{ 0x60, 0x60, 0x60 },
+ .tag_text = .{ 0x60, 0x60, 0x60 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:429 StatusLine guibg #cfcfcf, adjusted
- .tag_active_bg = .{ 0xc5, 0xc5, 0xc5 },
+ .tag_focus = .{ 0xc5, 0xc5, 0xc5 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:429 StatusLine guifg
- .tag_active_fg = .{ 0x35, 0x35, 0x35 },
+ .tag_focus_text = .{ 0x35, 0x35, 0x35 },
// the focused grip: ~/05-genizah/zenbones.nvim/lua/lualine/themes/zenwritten_light_default.lua:8 normal.a bg (lualine theme, default ness; generator derives it as PmenuSbar.bg.abs_da(3), lua/zenbones/shipwright/runners/lualine.lua:66)
- .box = .{ 0xa0, 0xa0, 0xa0 },
- // derived: the grip at rest, the accent #aeaeae faded toward the unfocused tag #dddddd as far as 1.6:1 off it (0.98 of the way)
- .box_dim = .{ 0xaf, 0xaf, 0xaf },
+ .accent = .{ 0xa0, 0xa0, 0xa0 },
// an unsaved grip: the original's modified colour, ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:275 Changed guifg
- .box_dirty = .{ 0x28, 0x64, 0x86 },
+ .dirty = .{ 0x28, 0x64, 0x86 },
// derived: the column grip, the original's type colour, ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:441 Type guifg
- .column_box = .{ 0x73, 0x50, 0x57 },
+ .column_grip = .{ 0x73, 0x50, 0x57 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:425 Statement guifg (no Keyword group defined; Vim default links Keyword to Statement)
- .kw = .{ 0x35, 0x35, 0x35 },
+ .keyword = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:435 String guifg
- .str = .{ 0x63, 0x63, 0x63 },
+ .string = .{ 0x63, 0x63, 0x63 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:398 Number guifg
- .num = .{ 0x63, 0x63, 0x63 },
+ .number = .{ 0x63, 0x63, 0x63 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:281 Comment guifg
.comment = .{ 0x8b, 0x8b, 0x8b },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:384 LineNr guifg
- .lineno = .{ 0x98, 0x98, 0x98 },
+ .line_number = .{ 0x98, 0x98, 0x98 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:296 CursorLineNr guifg
- .lineno_active = .{ 0x35, 0x35, 0x35 },
+ .line_number_current = .{ 0x35, 0x35, 0x35 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:401 PmenuSbar guibg
- .scroll_track = .{ 0xa6, 0xa6, 0xa6 },
+ .rail = .{ 0xa6, 0xa6, 0xa6 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:403 PmenuThumb guibg
- .scroll_thumb = .{ 0xf6, 0xf6, 0xf6 },
+ .rail_thumb = .{ 0xf6, 0xf6, 0xf6 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:452 WinSeparator guifg
- .border = .{ 0x98, 0x98, 0x98 },
+ .rule = .{ 0x98, 0x98, 0x98 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:406 Search guibg
- .search_bg = .{ 0xde, 0xb9, 0xd6 },
- // ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:406 Search guifg
- .search_fg = .{ 0x35, 0x35, 0x35 },
+ .hit = .{ 0xde, 0xb9, 0xd6 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:347 Error guifg via DiagnosticError->Error (link :348)
- .diagnostic_error = .{ 0xa8, 0x33, 0x4c },
+ .@"error" = .{ 0xa8, 0x33, 0x4c },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:446 WarningMsg guifg via DiagnosticWarn->WarningMsg (link :447)
- .diagnostic_warning = .{ 0x94, 0x49, 0x27 },
+ .warning = .{ 0x94, 0x49, 0x27 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:306 DiagnosticInfo guifg
- .diagnostic_info = .{ 0x28, 0x64, 0x86 },
+ .info = .{ 0x28, 0x64, 0x86 },
// ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:301 DiagnosticHint guifg
- .diagnostic_hint = .{ 0x88, 0x50, 0x7d },
- .palette = .{
+ .hint = .{ 0x88, 0x50, 0x7d },
+ .ansi = .{
.{ 0xee, 0xee, 0xee }, // 0: ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:251 g:terminal_color_0
.{ 0xa8, 0x33, 0x4c }, // 1: ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:252 g:terminal_color_1
.{ 0x4f, 0x6c, 0x31 }, // 2: ~/05-genizah/zenbones.nvim/colors/zenwritten.vim:253 g:terminal_color_2