From e793644c7192a96ae2e39e072708b059edafaeeb Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 01:30:32 -0300 Subject: jj, ansi, colors: the Changes layer and a terminal's diff draw their added and deleted rows, lanes and churn from the chrome (the themes programme's L2c; DESIGN.md R10, B6), worked out once a theme change by Chrome.of and read by `p.chrome()`, never derived again a frame, a row or a ghost line: a line a change added whole and a ghost line it added on `add.row`, a line taken away whole and a line going on `del.row`, its text in `line_number`, the words that went on `del.emph` and the words that came on `add.emph`, a description's id in the keyword's syntax ink where one change is pinned; one change pinned, its lane in the diff's own markers, `add.ink` beside a row it wrote and `del.ink` beside one it took away (the user's rulings of 2026-11-23); several, `lanes` (the sixteen's accents and the number and keyword hues, written and taken away left out, hue-sorted, R10); churn on `heat`'s eight steps from the line numbers' ink to the deleted hue, the step a count's log share of the hottest; a finished command pane's diff (ansi.recolorDiffOutput) on `add.row`/`del.row`, its markers `add.ink`/`del.ink`, its words the page's text; DELETED: jj.laneInks, laneColours and their HSV helpers (hue, hueApart, chroma, hue_apart), themeRed and its literal #cf222e and #2ea043 (the second copies of Grounds' fallbacks), heatColour's OKLab mix a row, the six Grounds.of a frame (one per ghost row, mark and going line); THE CAUSE where one moved: the old reds and greens were the palette's or two literals, so `dark` and every theme without a palette drew GitHub's red and green on rows mixed from the tag (the page's stand-in), the lane inks were pushed toward the text by 40 % steps to 3:1 on that page, and the markers on the patch view and the lanes disagreed (C1's surfaces.md §3.7); and a theme whose accents are all grey would divide by a lane count of 0 (colors: `lanes` now never empty: a theme with no accent draws its lanes in the line numbers' grey); the ring's `diff` check at B4's floor, 1.15:1 (was 1.1), unless the theme's text holds the row nearer (R10: never under its floor on the row: tokyonight_day's #3760bf on #e1e2e7, 4.9:1, leaves 1.11:1), and 0.05 apart; RUN (TEST FIRST): jj.zig's lane tests re-pinned to the chrome ("Changes draws a lane ...", "Changes draws what the text has not ...", "from the middle ...", "Churn counts ...", "Compare pins ...": the lanes `lanes[pin]`, a whole line's ground `add.row`, a going line's `del.row`, the ghost text `line_number`, the id `syntax[keyword]`, one change's lane `add.ink`/`del.ink`, churn's hottest `heat[7]` and 3-of-4's `heat[6]`), and "a diff's two lane inks in every theme" now asks every theme's markers apart and 4.5:1 on their row and words (as near as the theme reaches): on the base the four drawing tests fail (the old inks) and the ring fails tokyonight_day at 1.15, all pass now; diffview.golden re-recorded: rows 18-20 and 23-25 (the command pane's `cat change.diff`: its deleted row #302b25 -> #331a12, its added rows #263025 -> #132503: R10's rows 1.15:1 off orchard's page in the hue, where Grounds mixed the page 18 % toward the palette's colour; the markers #f1a39b and #b6ce94 unchanged, orchard's own red and green already 4.5:1 there), the diff pane's own rows (File.zig, L2b's) and diffstack.golden unchanged; GATES: core-test 1123/1296 (173 skipped; the base's count), process-test `diff` 2/2 after the update; load 3.5 to 6.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/colors.zig | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'core/colors.zig') diff --git a/core/colors.zig b/core/colors.zig index eefb2b67..4e4bd9ba 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -791,6 +791,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; } @@ -2602,7 +2607,14 @@ 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, unless the text holds it + // nearer (never under its floor there: tokyonight_day's text, 4.9:1, + // leaves 1.11:1), and the two 0.05 apart. + 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 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)); -- cgit v1.3 From 54cd21e1bd487276142e3b1d62f1556f05b7f978 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 02:04:56 -0300 Subject: gui, tui, macos, surface, draw: the frontends' colours from the chrome (the themes programme's L2e; DESIGN.md R1, R6, R11, R15, G1'): the window's one null page and text are colors.null_page and null_text (gui.zig's own bg_default and fg_default, the same values written twice, deleted; the tty's trail ink the same constant where it wrote #cccccc again); SGR faint in a window is its ink toward its own ground to the dim floor, 3.5:1 (R15; a terminal's faint on the page's text is the page's dim ink already, L2d's), where it was the ink at 60 % toward black, darker and stronger on a light page; InactiveDim's fade is worked out, not searched: luminance runs straight in linear light, which `blendLinear` mixes in, so the most of the setting that keeps a pair at its own contrast or 4.5 is one division (`fadeToward`, a hair inside the floor for the bytes' rounding), where each frame bisected every distinct (ink, paper) pair eight times into a 32-slot cache made again each frame (A7); the grips (G1', R6): a reading pane's button is ringed in the chrome's mode ink (`grip.mode`: sky, else mint, violet, paper, rose; 3:1 on both tag grounds), two logical pixels as acme's ButtonBorder, outside a pixel of band so its fill never touches it (an unfocused dirty one's gap, now a reading one's too), a held pane's ring the resting `grip.ring` and a focused one's `grip.focus`, dirty `grip.dirty`; the glyph and the mode's bars on a filled button (focused or dirty) in `grip.ink` (held 4.5:1 on every fill), on the band in the tag's own ink: gui.zig's inkOn (black or white past a luminance of 140, not WCAG) deleted; the window's rules: spines, column and stacked-pane rules in `rule` (R11), the topbar's in `rule` unless gui_topbar_pane_border_rgb, the tag rule `tag_rule` (half the tag toward the page in OKLab; acme's own #8888cc) where it was the sRGB average of the tag and the page, `rule_px` and `rail_px` the chrome's; surface.Chrome gains `grip_mode` and `grip_ink`, `tag_rule` is always given (null meant "mix it yourself"), and draw.zig fills them from `p.chrome()`; macOS: the two exports nothing reads, pardes_tagline_bg (the tag's ground, misnamed) and pardes_tag_active_bg, deleted with their header lines and ABI guards; the Mac's sixteen for an index are core/colors.zig's `xterm`, the gui's, where they were Tango (a window is handed a program's sixteen as the theme's own colours now, L2d, so an index under 16 reaches it only from elsewhere: one colour an index in every window); RUN (TEST FIRST): gui.zig "every pixel of a grip column is band, button or ring" asks the button's pixels in the chrome's fills, rings, mode ring and grip ink (it allowed the grid's old box and boxDirty colours and inkOn), over four sizes, focused or not, dirty or not, the first pane reading (Jumps walk): fails on the base by compile (the surface had no mode ring or grip ink), passes now; "InactiveDim fades the unfocused panes' rows alone, never below the text's floor" passes with the fade worked out (#e6e6e6 on black faded toward it, at least 4.5:1); acme's #8888cc tag rule and its 2 px rules and 18 px track as before; PICTURES (the S kit, before = the installed build, after = this tree's Debug gui, 26 px, `Jumps walk`): .scratch/themes/L2cde/png/: the Changes view (dark, neonotte84, orchard, acme), a terminal with `ls --color` and the sixteen, bright, backgrounds, faint, 256 and greys (dark, neonotte84), the grip's four states (held or reading, focused or not; 16 and 26 px; dark, neonotte84), InactiveDim 35 (dark, neonotte84); derived once: every colour these surfaces read is Chrome.of's (colors.zig, at the theme's change: finishThemeInitialization, setThemeIndex, previewTheme, loadThemeFile), handed to the window in surface.Chrome by draw.zig a frame as before; the fades (faint, InactiveDim) are a cell's arithmetic, as the 60 % and the blend were, with no search or cache left; NOT DONE: PDF hits (the PDF addon is handed fg, bg, sel and link through pa_view, the addon ABI 3.3; the theme's hit wants a field there, an ABI 3.4 with a version check: abi/pardes_addon.h, abi/addon.zig, core/Kind.zig, addons/fake, beyond this line's files), so test/image_harness.zig's helix tints are unchanged and not re-pinned; a mark's ink on a button is still pushed 4.5:1 against the fill a frame (it wants a severity ink per grip fill in Chrome: L2a's marks); the grid's frame and empty columns (draw.zig's fills) and the tag grounds the window lays under a tag (tag_bg, tag_focus_bg, tag_reading_bg) stay the old views' until L2a moves the grid; GATES: gui unit-test 1948/1952 (4 skipped; w2base 1947/1951, +1 the dark terminal test of L2d; its one failure the known BaselineHarnessMismatch); macOS: runtime/macos.zig built for this host and its ABI guard run (`unit-test -Dplatform=macos`, "pardes.h declares every export the way it is defined"), the Swift not compiled (no Darwin here); the tui suites on L2c+L2d+L2e: core-test 1123/1296 (173 skipped), shell-test 1344/1347 (3 skipped), pane-test 184/185 (1 skipped), behaviour-test 280/280 and --replay 20 seeds of 70 steps, 0 failures, process-test 0 of 147 failed (3 skipped, no golden moved by L2e), term-test 17/17, kitty-test 45/45; the dump and digest unchanged (no fuzz or soak); load 0.9 to 12.8 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- abi/pardes.h | 11 --- core/colors.zig | 2 +- core/draw.zig | 21 +++-- core/surface.zig | 9 ++- dev/gui/gui.zig | 155 ++++++++++++++++++------------------- dev/macos/Sources/PardesView.swift | 16 ++-- dev/tui/tui.zig | 2 +- runtime/macos.zig | 16 ---- 8 files changed, 104 insertions(+), 128 deletions(-) (limited to 'core/colors.zig') diff --git a/abi/pardes.h b/abi/pardes.h index 24eb6701..3bacd588 100644 --- a/abi/pardes.h +++ b/abi/pardes.h @@ -299,13 +299,6 @@ float pardes_tagline_origin_col(uint16_t col, uint16_t row); // read, so a host measuring in points passes points. uint16_t pardes_grid_col_at(float x, uint16_t row, float body_w, float tagline_w); -// The tag band's own background, the base a compact tag row is painted on: the -// pane-wide band goes down in THIS colour on the body grid, then each cell's -// own background on the narrower grid its glyph uses. One pass would put a -// highlighted word's box on body pitch and its letters on tagline pitch. -// PARDES_COLOR_DEFAULT before there is a session to ask. -uint32_t pardes_tagline_bg(void); - // The fallback font PREFERENCE ORDER, shared with the SDL shell. Only the order // travels: resolving a name is the host's business, because SDL matches font // FILE STEMS while walking the font directories and CoreText matches PostScript @@ -325,10 +318,6 @@ uint32_t pardes_topbar_pane_border_rgb(void); // pardes.TOPBAR_H, and runtime/macos.zig asserts the two agree. #define PARDES_TOPBAR_H 1u -// The active pane's tag row background, for hosts that afford the active -// tagline more than a tint — macOS raises it like an old-school bevel. -uint32_t pardes_tag_active_bg(void); - // Persistent full-window effect switches and their display-clock time. A zero // flags word means draw the CoreText frame directly; any nonzero combination // is one postprocess pass. Snapshot by value, with no borrowed storage. diff --git a/core/colors.zig b/core/colors.zig index 4e4bd9ba..d280172e 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -85,7 +85,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; diff --git a/core/draw.zig b/core/draw.zig index 2553d5be..d2e54cbb 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -330,11 +330,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, @@ -344,12 +347,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. 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/dev/gui/gui.zig b/dev/gui/gui.zig index a478db03..f572a7ce 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -45,8 +45,10 @@ const log = std.log.scoped(.gui); const font_ttf = @embedFile("AdwaitaMono-Regular.ttf"); -const bg_default = [3]u8{ 18, 18, 18 }; -const fg_default = [3]u8{ 204, 204, 204 }; +/// The page and text a window draws for a theme that leaves them to the +/// host (`dark`): the chrome's one null page (DESIGN.md R1). +const null_page = pardes.colors.null_page; +const null_text = pardes.colors.null_text; const p9_arrow_clr = [32]u8{ 0xFF, 0xFF, 0x80, 0x01, 0x80, 0x02, 0x80, 0x0C, @@ -4017,7 +4019,7 @@ fn renderFrame( coverFrame(covered, surface.cols, surface.rows, surface.bodyLayers(), surface.tagLayers(), surface.regionList()); try buildDecor(g, gpa, surface, &groups, layout, win_w, win_h, cursors_shown); - const page = chrome.page orelse bg_default; + const page = chrome.page orelse null_page; const background_opacity = backgroundOpacity(g.applied_window_opacity); const clear: c.SDL_FColor = .{ .r = @as(f32, @floatFromInt(page[0])) / 255.0 * background_opacity, @@ -4163,13 +4165,13 @@ const taglineBandOffset = pardes.Layer.taglineBandOffset; /// in `line`, block or bar: shaping breaks around it. fn resolveCell(g: *Gui, line: []const pardes.Cell, at: usize, cursor: ?usize, role: pardes.FontRole, is_cursor: bool, page: [3]u8) ResolvedCell { const cell = &line[at]; - var fg = fg_default; + var fg = null_text; var bg = page; var reverse = is_cursor; if (!cell.default) { const st = cell.style; fg = switch (st.fg) { - .default => fg_default, + .default => null_text, .index => |i| pardes.colors.xterm[i], .rgb => |rgb| rgb, }; @@ -4185,9 +4187,9 @@ fn resolveCell(g: *Gui, line: []const pardes.Cell, at: usize, cursor: ?usize, ro // full opacity would expose text that the terminal concealed, so // cellSlot draws a concealed cell blank. } - if (st.dim) for (&fg) |*ch| { - ch.* = @intCast(@as(u16, ch.*) * 6 / 10); - }; + // SGR faint: the ink toward its ground to the dim floor (DESIGN.md + // R15), so fainter on a light page too, never darkened to black. + if (st.dim) fg = fadeToward(fg, bg, 1, @min(pardes.colors.contrast(fg, bg), pardes.colors.Chrome.dim_floor)); } if (reverse) std.mem.swap([3]u8, &fg, &bg); @@ -4345,13 +4347,14 @@ fn gripButton(g: *const Gui, chrome: *const pardes.Chrome, col: u16, row: u16, l fn gripFill(chrome: *const pardes.Chrome, focus: bool, dirty: bool, reading: bool) [3]u8 { if (dirty) return chrome.grip_dirty; if (focus) return chrome.grip_focus_ring; - // The ring's inside is the tag's ground: a reading pane's tint. + // The ring's inside is the tag's ground. return if (reading) chrome.tag_reading_bg else chrome.tag_bg; } -fn inkOn(bg: [3]u8) [3]u8 { - const lum = (@as(u16, bg[0]) * 3 + @as(u16, bg[1]) * 6 + @as(u16, bg[2])) / 10; - return if (lum > 140) .{ 0x00, 0x00, 0x00 } else .{ 0xff, 0xff, 0xff }; +/// The ink on a pane's button (DESIGN.md R6): the chrome's grip ink on a +/// fill, the tag's own on its ground. +fn gripInk(chrome: *const pardes.Chrome, focus: bool, dirty: bool) [3]u8 { + return if (focus or dirty) chrome.grip_ink else chrome.tag_fg; } /// Cuts an instance's quad to a pixel rectangle (left, top, right, bottom), @@ -4463,8 +4466,8 @@ fn emitSurfaceCell( // or dirty (UX D4). const ink = if (mark) switch (glyph.style.fg) { .rgb => |rgb| pardes.colors.pushAway(rgb, &.{fill}, pardes.colors.Roles.ink_floor), - else => inkOn(fill), - } else if (here.pane_grip) inkOn(fill) else resolved.fg; + else => gripInk(chrome, here.focus, here.dirty), + } else if (here.pane_grip) gripInk(chrome, here.focus, here.dirty) else resolved.fg; instances[next.*].fr = @as(f32, @floatFromInt(ink[0])) / 255; instances[next.*].fg = @as(f32, @floatFromInt(ink[1])) / 255; instances[next.*].fb = @as(f32, @floatFromInt(ink[2])) / 255; @@ -5141,7 +5144,7 @@ fn laneStrip(g: *Gui, gpa: std.mem.Allocator, lane: pardes.Lane, row: i32, ride: /// coloured gutter with a thin track and its thumb, running down through the /// pixels past the last whole row. fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, tags: []const pardes.Layer, ticks: []const pardes.RailTick, heat: []const pardes.RailHeat, chrome: *const pardes.Chrome, layout: CellLayout, cols: u16, rows: u16, win_w: f32, win_h: f32) !void { - const page = chrome.page orelse bg_default; + const page = chrome.page orelse null_page; for (regions) |rail| { if (rail.kind != .rail or rail.rect.h == 0) continue; const tag = for (regions) |region| { @@ -5165,7 +5168,7 @@ fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ta if (!tag_bottom and head.rows > 0) tag_end = @max(tag_end, head.viewport.y + head.rows); if (!tag_bottom and band.rows > 0 and band.kind == .band and band.id == rail.owner) tag_end = @max(tag_end, band.viewport.y + band.rows); const rule_y = @as(f32, @floatFromInt(if (tag_bottom) tag.rect.y else tag_end)) * layout.h; - try addDecor(g, gpa, x0, if (tag_bottom) rule_y else rule_y - dp(1), rule_x1, if (tag_bottom) rule_y + dp(1) else rule_y, chrome.tag_rule orelse mixRgb(chrome.tag_bg, page), 1, win_w, win_h); + try addDecor(g, gpa, x0, if (tag_bottom) rule_y else rule_y - dp(1), rule_x1, if (tag_bottom) rule_y + dp(1) else rule_y, chrome.tag_rule, 1, win_w, win_h); // Stacked panes are ruled apart as columns are, where one pane's // body meets the next one's tag (acme's Border). { @@ -5238,9 +5241,6 @@ fn paneDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ta } } -/// Halfway between two colours. -const mixRgb = pardes.colors.mix; - /// A rule's width: the theme's own, or one pixel. fn rulePx(chrome: *const pardes.Chrome) f32 { return dp(@floatFromInt(@max(1, chrome.rule_px))); @@ -5270,17 +5270,15 @@ fn updateDisplayScale(window: *c.SDL_Window) void { /// InactiveDim: the unfocused panes' text faded toward its ground by the /// setting's percent, never below the pair's own contrast or 4.5, whichever -/// is lower. The window's alone, from the regions' focus: renderFrame -/// begins it each frame. ponytail: one window per process, as display_scale. +/// is lower (`fadeToward`: worked out, no search, so nothing is kept). The +/// window's alone, from the regions' focus: renderFrame begins it each +/// frame. ponytail: one window per process, as display_scale. var dim: Dim = .{}; const Dim = struct { amount: f32 = 0, /// The pane with the keyboard, from its regions. focused: u16 = pardes.Region.none, - /// The few ink and paper pairs a frame has, each faded once. - keys: [32]?[6]u8 = @splat(null), - values: [32][3]u8 = undefined, fn begin(d: *Dim, percent: u8, regions: []const pardes.Region) void { d.* = .{ .amount = @as(f32, @floatFromInt(@min(percent, 100))) / 100 }; @@ -5297,35 +5295,15 @@ const Dim = struct { } /// A cell instance's ink faded toward its ground. - fn fade(d: *Dim, instance: *CellInstance) void { - const ink = d.faded(byteRgb(.{ instance.fr, instance.fg, instance.fb }), byteRgb(.{ instance.br, instance.bg, instance.bb })); + fn fade(d: *const Dim, instance: *CellInstance) void { + const from = byteRgb(.{ instance.fr, instance.fg, instance.fb }); + const paper = byteRgb(.{ instance.br, instance.bg, instance.bb }); + const ink = fadeToward(from, paper, d.amount, @min(pardes.colors.contrast(from, paper), 4.5)); instance.fr = @as(f32, @floatFromInt(ink[0])) / 255.0; instance.fg = @as(f32, @floatFromInt(ink[1])) / 255.0; instance.fb = @as(f32, @floatFromInt(ink[2])) / 255.0; } - fn faded(d: *Dim, ink: [3]u8, paper: [3]u8) [3]u8 { - const key = ink ++ paper; - const slot = (@as(usize, ink[0]) *% 31 +% @as(usize, ink[1]) *% 7 +% ink[2] +% @as(usize, paper[0]) *% 13 +% @as(usize, paper[1]) *% 3 +% paper[2]) % d.keys.len; - if (d.keys[slot]) |held| if (std.mem.eql(u8, &held, &key)) return d.values[slot]; - // Contrast falls as the ink nears its paper: the most of `amount` - // that keeps the pair at its own contrast or 4.5, whichever is lower. - const floor = @min(pardes.colors.contrast(ink, paper), 4.5); - var t = d.amount; - if (pardes.colors.contrast(blendLinear(ink, paper, t), paper) < floor) { - var lo: f32 = 0; - var hi: f32 = t; - for (0..8) |_| { - const mid = (lo + hi) / 2; - if (pardes.colors.contrast(blendLinear(ink, paper, mid), paper) >= floor) lo = mid else hi = mid; - } - t = lo; - } - d.keys[slot] = key; - d.values[slot] = blendLinear(ink, paper, t); - return d.values[slot]; - } - fn byteRgb(rgb: [3]f32) [3]u8 { var out: [3]u8 = undefined; for (&out, rgb) |*o, v| o.* = @intFromFloat(@round(std.math.clamp(v, 0, 1) * 255)); @@ -5333,6 +5311,19 @@ const Dim = struct { } }; +/// `ink` toward `paper` in linear light, `most` of the way at most and +/// never under `floor`:1 on it. Luminance runs straight in linear light, so +/// the most that keeps the floor is worked out, never searched (a hair +/// inside it, for the bytes' rounding). +fn fadeToward(ink: [3]u8, paper: [3]u8, most: f32, floor: f32) [3]u8 { + const yi = pardes.colors.relativeLuminance(ink); + const yp = pardes.colors.relativeLuminance(paper); + if (@abs(yi - yp) < 1e-6) return ink; + const f = floor * 1.02; + const stop = if (yi > yp) f * (yp + 0.05) - 0.05 else (yp + 0.05) / f - 0.05; + return blendLinear(ink, paper, std.math.clamp((yi - stop) / (yi - yp), 0, most)); +} + /// `t` of the way from one colour to the other in linear light, so a /// coloured ink does not muddy on its way to the paper. fn blendLinear(from: [3]u8, to: [3]u8, t: f32) [3]u8 { @@ -5378,10 +5369,12 @@ fn gripDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ce try addDecor(g, gpa, button[2], button[1], right, button[3], band, 1, win_w, win_h); if (grip.kind != .grip) continue; // acme's button ring, two pixels (ButtonBorder) inside the button: - // the focused one's in its own fill. An unfocused dirty one keeps a - // pixel of band inside its ring, so the four states differ in shape - // whatever a theme's colours (a focused dirty one is acme's - // modbutton, filled up to its ring). + // the focused one's in its own fill, a reading pane's in the mode's + // ink (DESIGN.md G1'). An unfocused dirty one and a reading one keep + // a pixel of band inside the ring, so the fill never touches the + // mode's ring and the four states differ in shape whatever a theme's + // colours (a focused dirty held one is acme's modbutton, filled up to + // its ring). { // The rules drawn over the row (paneDecor, after this) cut into // it: the ring runs inside them, from rule to rule. @@ -5401,14 +5394,14 @@ fn gripDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ce const x1 = button[2]; const y0 = button[1] + top_rule; const y1 = button[3] - bottom_rule; - const ring = if (grip.active) chrome.grip_focus_ring else chrome.grip_border; + const ring = if (grip.reading) chrome.grip_mode else if (grip.active) chrome.grip_focus_ring else chrome.grip_border; // acme's ButtonBorder: two logical pixels. const b = dp(2); try addDecor(g, gpa, x0, y0, x1, y0 + b, ring, 1, win_w, win_h); try addDecor(g, gpa, x0, y1 - b, x1, y1, ring, 1, win_w, win_h); try addDecor(g, gpa, x0, y0 + b, x0 + b, y1 - b, ring, 1, win_w, win_h); try addDecor(g, gpa, x1 - b, y0 + b, x1, y1 - b, ring, 1, win_w, win_h); - if (grip.dirty and !grip.active) { + if (grip.reading or (grip.dirty and !grip.active)) { const gap = b + dp(1); try addDecor(g, gpa, x0 + b, y0 + b, x1 - b, y0 + gap, band, 1, win_w, win_h); try addDecor(g, gpa, x0 + b, y1 - gap, x1 - b, y1 - b, band, 1, win_w, win_h); @@ -5424,7 +5417,7 @@ fn gripDecor(g: *Gui, gpa: std.mem.Allocator, regions: []const pardes.Region, ce if (x >= cols) continue; const cell = &cells[@as(usize, y) * cols + x]; if (cell.default or cell.printableAscii() != ' ' or boxMark(cells[@as(usize, y) * cols ..][0..cols], x)) continue; - const rgb = inkOn(gripFill(chrome, grip.active, grip.dirty, grip.reading)); + const rgb = gripInk(chrome, grip.active, grip.dirty); const center_x = @floor((button[0] + button[2]) / 2); const center_y = @as(f32, @floatFromInt(y)) * layout.h + @as(f32, @floatFromInt(taglineBandOffset(y, win_h, g.cell_h, g.tagline_height))) + @as(f32, @floatFromInt(g.tagline_height)) / 2; const half_w = @max(dp(1), @min(dp(3), @floor((button[2] - button[0] - 2 * dp(3)) / 2))); @@ -5757,7 +5750,7 @@ fn appendJumpTrail(g: *Gui, on: bool, surface: *const pardes.Surface, now_ns: u6 if (region.kind == .body and cursor.x >= region.rect.x and cursor.x < @as(u32, region.rect.x) + region.rect.w and cursor.y >= region.rect.y and cursor.y < @as(u32, region.rect.y) + region.rect.h) break region.rect; } else return; - const page = surface.chrome.page orelse bg_default; + const page = surface.chrome.page orelse null_page; const w: f32 = @floatFromInt(g.cell_w); const h: f32 = @floatFromInt(g.cell_h); for (lit) |cell| { @@ -5769,7 +5762,7 @@ fn appendJumpTrail(g: *Gui, on: bool, surface: *const pardes.Surface, now_ns: u6 else => page, }; if (!std.mem.eql(u8, &ground, &page)) continue; - var color = overlayRgb(surface.chrome.fg orelse fg_default); + var color = overlayRgb(surface.chrome.fg orelse null_text); color.a = cell.strength; const x0 = @as(f32, @floatFromInt(cell.x)) * w; const y0 = @as(f32, @floatFromInt(cell.y)) * h; @@ -5855,7 +5848,7 @@ fn appendCursorGlide(g: *Gui, surface: *const pardes.Surface, now_ns: u64, build } // Its colour: the cursor the cells would draw nearest the quad. var boxes: [max_cursors]CursorBox = undefined; - var rgb: [3]u8 = chrome.fg orelse fg_default; + var rgb: [3]u8 = chrome.fg orelse null_text; var nearest: f32 = std.math.inf(f32); for (boxes[0..cursorBoxes(g, surface, layout, builder.win_h, &boxes)]) |box| { const dx = (box.x0 + box.x1) / 2 - centre[0]; @@ -6030,7 +6023,7 @@ fn cursorColor(chrome: *const pardes.Chrome, cell: *const pardes.Cell, role: par return if (role == .tagline) switch (cell.style.fg) { .rgb => |rgb| rgb, else => chrome.tag_fg, - } else chrome.fg orelse fg_default; + } else chrome.fg orelse null_text; } test "FreeType and HarfBuzz allocate from the gui allocator and give it all back" { @@ -7170,7 +7163,7 @@ test "a touchpad's fraction over a body whose context rows went (scrolled out of for (&s.body_layers) |*layer| layer.cells = blank[0..layer.cells.len]; @memset(wr.g.scroll_edge, .{}); const held = if (s.facts.pane(id)) |shown| shown.context_rows else 0; - const n = emitScrollRows(&wr.g, instances.ptr, 0, &s, fixedCellLayout(&wr.g), 800, 480, bg_default, held); + const n = emitScrollRows(&wr.g, instances.ptr, 0, &s, fixedCellLayout(&wr.g), 800, 480, null_page, held); // The body's moving rows under the held ones, the layer's // rows past the grid's while there is a layer, and the row // that left. @@ -7197,24 +7190,24 @@ test "a scroll's body taller than its body layer (the pane shrunk under a glide) g.scroll_body_h = 19; var instances: [3 * 40 * 20]CellInstance = undefined; const layout = fixedCellLayout(&g); - try std.testing.expectEqual(@as(u32, 0), emitScrollRows(&g, &instances, 0, &surface, layout, 400, 400, bg_default, 2)); + try std.testing.expectEqual(@as(u32, 0), emitScrollRows(&g, &instances, 0, &surface, layout, 400, 400, null_page, 2)); // As tall as the body, its cells short of its rows: the same. surface.body_layers[0].rows = 21; - try std.testing.expectEqual(@as(u32, 0), emitScrollRows(&g, &instances, 0, &surface, layout, 400, 400, bg_default, 2)); + try std.testing.expectEqual(@as(u32, 0), emitScrollRows(&g, &instances, 0, &surface, layout, 400, 400, null_page, 2)); // Its cells all there: the body's moving rows under the two held, and // the layer's two past the grid's. var whole: [38 * 21]pardes.Cell = @splat(.{}); surface.body_layers[0].cells = &whole; - try std.testing.expectEqual(@as(u32, (19 - 2 + 2) * 38), emitScrollRows(&g, &instances, 0, &surface, layout, 400, 400, bg_default, 2)); + try std.testing.expectEqual(@as(u32, (19 - 2 + 2) * 38), emitScrollRows(&g, &instances, 0, &surface, layout, 400, 400, null_page, 2)); } test "concealed terminal text emits no ink on its ground" { var g = testGui(10, 20, 6, 12); var cell: pardes.Cell = .{ .default = false, .style = .{ .invisible = true, .ul = .single } }; cell.text[0] = 'X'; - const resolved = resolveCell(&g, (&cell)[0..1], 0, null, .body, false, bg_default); + const resolved = resolveCell(&g, (&cell)[0..1], 0, null, .body, false, null_page); try std.testing.expectEqualDeep(g.atlas.space_slot, resolved.slot); - try std.testing.expectEqual(bg_default, resolved.bg); + try std.testing.expectEqual(null_page, resolved.bg); } test "a block cursor's cell is drawn reversed: the cell's ink its ground, its ground its ink" { @@ -7226,8 +7219,8 @@ test "a block cursor's cell is drawn reversed: the cell's ink its ground, its gr .default = false, .style = .{ .fg = .{ .rgb = .{ 10, 20, 30 } }, .bg = .{ .rgb = .{ 200, 210, 220 } } }, }; - const plain = resolveCell(&g, (&cell)[0..1], 0, null, .body, false, bg_default); - const cursor = resolveCell(&g, (&cell)[0..1], 0, 0, .body, true, bg_default); + const plain = resolveCell(&g, (&cell)[0..1], 0, null, .body, false, null_page); + const cursor = resolveCell(&g, (&cell)[0..1], 0, 0, .body, true, null_page); try std.testing.expectEqual([3]u8{ 10, 20, 30 }, plain.fg); try std.testing.expectEqual(plain.fg, cursor.bg); try std.testing.expectEqual(plain.bg, cursor.fg); @@ -7354,7 +7347,7 @@ test "every pixel of a grip column is band, button or ring, and the button sits const row: u16 = grip.rect.y + @as(u16, @intCast(line)); const at = @as(usize, row) * s.cols; var next: u32 = 0; - emitSurfaceCell(&g, &s.chrome, &instances, &next, col, row, layout, win_w, win_h, s.cells[at..][0..s.cols], cover[at..][0..s.cols], col, null, false, bg_default); + emitSurfaceCell(&g, &s.chrome, &instances, &next, col, row, layout, win_w, win_h, s.cells[at..][0..s.cols], cover[at..][0..s.cols], col, null, false, null_page); for (instances[0..next]) |i| paint.quad(pixels, i.x0, i.y0, i.x1, i.y1, .{ i.br, i.bg, i.bb }, win_w, win_h, x_px, y_px, w_px, h_px); }; for (g.decor.items) |i| if (i.fr >= 1 and i.clip_x1 < i.clip_x0) paint.quad(pixels, i.x0, i.y0, i.x1, i.y1, .{ i.br, i.bg, i.bb }, win_w, win_h, x_px, y_px, w_px, h_px); @@ -7370,8 +7363,8 @@ test "every pixel of a grip column is band, button or ring, and the button sits const band = if (pardes.Trail.reading(core, core.panes[0].?)) chrome.tag_reading_bg else if (focus == 0) chrome.tag_focus_bg else chrome.tag_bg; // Band, fills, rings, the rules between stacked panes and under the // tag, and the mode marks' ink (the grip's first cell's). - const ink = inkOn(gripFill(chrome, grip.active, grip.dirty, grip.reading)); - const allowed = [_][3]f32{ rgb(band), rgb(core.chromeTheme().box), rgb(pardes.draw.boxDirty(core)), rgb(chrome.grip_border), rgb(chrome.grip_focus_ring), rgb(chrome.border), rgb(ink), rgb(chrome.tag_rule orelse mixRgb(chrome.tag_bg, chrome.page orelse bg_default)) }; + const ink = gripInk(chrome, grip.active, grip.dirty); + const allowed = [_][3]f32{ rgb(band), rgb(chrome.grip_focus_ring), rgb(chrome.grip_dirty), rgb(chrome.grip_border), rgb(chrome.grip_mode), rgb(chrome.border), rgb(ink), rgb(chrome.tag_rule) }; for (pixels, 0..) |pixel, n| { const got = pixel orelse return error.TestUnpaintedGripPixel; const known = for (allowed) |a| { @@ -7385,7 +7378,7 @@ test "every pixel of a grip column is band, button or ring, and the button sits } // The rule under the tag runs unbroken across the grip column. for (pixels[(h_px - 1) * w_px ..][0..w_px]) |pixel| - try std.testing.expectEqual(rgb(chrome.tag_rule orelse mixRgb(chrome.tag_bg, chrome.page orelse bg_default)), pixel.?); + try std.testing.expectEqual(rgb(chrome.tag_rule), pixel.?); // The button's edges are the scrollbar's. const button = gripButton(&g, chrome, grip.rect.x, grip.rect.y, layout); const column = scrollColumn(&g, chrome, s.region(.rail, 0).?.rect.x, layout); @@ -7403,7 +7396,7 @@ test "small tagline fonts leave no background gutters between adjacent tags" { var next: u32 = 0; for (0..3) |row| { // Column 1: past the anchor's inset edge at the column's left. - emitSurfaceCell(&g, &chrome, &instances, &next, 1, @intCast(row), fixedCellLayout(&g), 800, 480, (&cell)[0..1], &.{.{}}, 0, null, false, bg_default); + emitSurfaceCell(&g, &chrome, &instances, &next, 1, @intCast(row), fixedCellLayout(&g), 800, 480, (&cell)[0..1], &.{.{}}, 0, null, false, null_page); const base = instances[row * 2]; const ink = instances[row * 2 + 1]; try std.testing.expectApproxEqAbs(@as(f32, 20.0 / 480.0 * 2), base.y0 - base.y1, 0.0001); @@ -7416,7 +7409,7 @@ test "small tagline fonts leave no background gutters between adjacent tags" { // Column 0 is an anchor's edge: its ink is inset by the band's margin // (2 px here) and its underlay still covers the whole cell. next = 0; - emitSurfaceCell(&g, &chrome, &instances, &next, 0, 1, fixedCellLayout(&g), 800, 480, (&cell)[0..1], &.{.{ .anchor = true }}, 0, null, false, bg_default); + emitSurfaceCell(&g, &chrome, &instances, &next, 0, 1, fixedCellLayout(&g), 800, 480, (&cell)[0..1], &.{.{ .anchor = true }}, 0, null, false, null_page); try std.testing.expectApproxEqAbs(@as(f32, 10.0 / 800.0 * 2), instances[0].x1 - instances[0].x0, 0.0001); try std.testing.expectApproxEqAbs(@as(f32, 8.0 / 800.0 * 2), instances[1].x1 - instances[1].x0, 0.0001); try std.testing.expectApproxEqAbs(@as(f32, 8) / atlas_w, instances[1].u1 - instances[1].u0, 0.0001); @@ -7427,7 +7420,7 @@ test "block cursor alone overrides transparent cell background" { const cell: pardes.Cell = .{}; var instances: [2]CellInstance = undefined; for ([_]bool{ false, true }, 0..) |cursor, i| { - emitInstance(&g, &instances, @intCast(i), 0, 0, fixedCellLayout(&g), 800, 480, .body, (&cell)[0..1], 0, null, cursor, bg_default); + emitInstance(&g, &instances, @intCast(i), 0, 0, fixedCellLayout(&g), 800, 480, .body, (&cell)[0..1], 0, null, cursor, null_page); try std.testing.expectEqual(cursor, instances[i].effect & opaque_bg_bit != 0); } } @@ -7596,7 +7589,7 @@ test "pane indicator halves are safe on an exhausted atlas" { var instances: [4]CellInstance = undefined; var next: u32 = 0; for (0..2) |col| { - emitSurfaceCell(&g, &chrome, &instances, &next, @intCast(col), 0, fixedCellLayout(&g), 100, 100, cells[0..6], cover[0..6], col, null, false, bg_default); + emitSurfaceCell(&g, &chrome, &instances, &next, @intCast(col), 0, fixedCellLayout(&g), 100, 100, cells[0..6], cover[0..6], col, null, false, null_page); try std.testing.expectEqual(@as(f32, 0), instances[col * 2 + 1].u0); } try std.testing.expectEqual(@as(u32, 4), next); @@ -8037,7 +8030,7 @@ test "compact body layer rendering fills recovered rows and clips the final glyp layer.setContextLines(&.{ 0, 4, 5, 6 }); var instances: [32]CellInstance = undefined; var next: u32 = 0; - emitBodyLayer(&g, &instances, &next, &layer, 200, 200, bg_default, false, .{ 80, 90, 100 }); + emitBodyLayer(&g, &instances, &next, &layer, 200, 200, null_page, false, .{ 80, 90, 100 }); // Four compact header rows (48px), then three body rows: two complete // and a third clipped to the remaining12px of the100px viewport. try std.testing.expectEqual(@as(u32, 20), next); @@ -8052,7 +8045,7 @@ test "compact body layer rendering fills recovered rows and clips the final glyp // A drag preview reserves the last physical column without changing cells. layer.viewport.w = 1; next = 0; - emitBodyLayer(&g, &instances, &next, &layer, 200, 200, bg_default, false, .{ 80, 90, 100 }); + emitBodyLayer(&g, &instances, &next, &layer, 200, 200, null_page, false, .{ 80, 90, 100 }); for (instances[0..next]) |instance| try std.testing.expect(instance.x1 <= -0.6 + 0.0001); } @@ -8062,14 +8055,14 @@ test "compact tag layers fill available width and clip at their physical edge" { const layer: pardes.Layer = .{ .kind = .pane, .id = 0, .serial = 7, .viewport = .{ .x = 2, .y = 3, .w = 3, .h = 1 }, .cols = 6, .rows = 1, .cells = &cells, .bg = .{ 20, 30, 40 } }; var instances: [8]CellInstance = undefined; var next: u32 = 0; - emitTagLayer(&g, &instances, &next, &layer, 100, 100, bg_default, false); + emitTagLayer(&g, &instances, &next, &layer, 100, 100, null_page, false); // Five six-pixel cells fit in the three body-column viewport. try std.testing.expectEqual(@as(u32, 6), next); try std.testing.expectApproxEqAbs(@as(f32, -0.6), instances[1].x0, 0.0001); try std.testing.expectApproxEqAbs(@as(f32, 0), instances[5].x1, 0.0001); g.tagline_width = 8; next = 0; - emitTagLayer(&g, &instances, &next, &layer, 100, 100, bg_default, false); + emitTagLayer(&g, &instances, &next, &layer, 100, 100, null_page, false); try std.testing.expectEqual(@as(u32, 5), next); try std.testing.expectApproxEqAbs(@as(f32, 0), instances[4].x1, 0.0001); try std.testing.expectApproxEqAbs(@as(f32, 6) / atlas_w, instances[4].u1 - instances[4].u0, 0.0001); @@ -8334,7 +8327,7 @@ test "a `│` in a tag layer runs its row's whole height at a tagline smaller th var instances: [8]CellInstance = undefined; var next: u32 = 0; const win_h: f32 = 200; - emitTagLayer(&g, &instances, &next, &layer, 200, win_h, bg_default, false); + emitTagLayer(&g, &instances, &next, &layer, 200, win_h, null_page, false); try std.testing.expectEqual(@as(u32, 3), next); const bh: f32 = @floatFromInt(g.cell_h); // [0] the row's ground, [1] `a` at the tagline's height, [2] `│` the @@ -8402,7 +8395,7 @@ test "a pane's mark is its button's glyph where the mode draws none, in its kind defer g.decor.deinit(gpa); var instances: [4]CellInstance = undefined; var next: u32 = 0; - for (0..2) |col| emitSurfaceCell(&g, &chrome, &instances, &next, @intCast(col), 0, fixedCellLayout(&g), 100, 100, cells[0..6], cover[0..6], col, null, false, bg_default); + for (0..2) |col| emitSurfaceCell(&g, &chrome, &instances, &next, @intCast(col), 0, fixedCellLayout(&g), 100, 100, cells[0..6], cover[0..6], col, null, false, null_page); try std.testing.expectEqual(@as(u32, 4), next); // Each of the box's two cells draws its slice of the mark's glyph, in // the err ink pushed off the focused button's fill. diff --git a/dev/macos/Sources/PardesView.swift b/dev/macos/Sources/PardesView.swift index 11818e10..8dbaea0e 100644 --- a/dev/macos/Sources/PardesView.swift +++ b/dev/macos/Sources/PardesView.swift @@ -96,14 +96,16 @@ private let sRGB: CGColorSpace = CGColorSpace(name: CGColorSpace.sRGB) ?? CGColo // a CTFont instead of being bridged to NSFont on the way in. private let fontAttribute = NSAttributedString.Key(kCTFontAttributeName as String) -// The named sixteen, then xterm's 6x6x6 cube, then the 24-step grey ramp. These -// sixteen are app.mjs's, not gui.zig's: gui.zig borrows ghostty's palette -// because it already links it, and the two disagree on the base colors. +// The named sixteen, then xterm's 6x6x6 cube, then the 24-step grey ramp. A +// window is handed a program's sixteen as the theme's own colours (the core's +// terminal paint, colors.Chrome's ansi), so an index under 16 reaches it only +// from elsewhere; these are core/colors.zig's `xterm`, the gui's, so an index +// is one colour in every window. private let ansi16: [UInt32] = [ - 0x00_00_00, 0xCC_00_00, 0x4E_9A_06, 0xC4_A0_00, - 0x34_65_A4, 0x75_50_7B, 0x06_98_9A, 0xD3_D7_CF, - 0x55_57_53, 0xEF_29_29, 0x8A_E2_34, 0xFC_E9_4F, - 0x72_9F_CF, 0xAD_7F_A8, 0x34_E2_E2, 0xEE_EE_EC, + 0x1D_1F_21, 0xCC_66_66, 0xB5_BD_68, 0xF0_C6_74, + 0x81_A2_BE, 0xB2_94_BB, 0x8A_BE_B7, 0xC5_C8_C6, + 0x66_66_66, 0xD5_4E_53, 0xB9_CA_4A, 0xE7_C5_47, + 0x7A_A6_DA, 0xC3_97_D8, 0x70_C0_B1, 0xEA_EA_EA, ] private func paletteColor(_ index: UInt8) -> UInt32 { diff --git a/dev/tui/tui.zig b/dev/tui/tui.zig index aa1f8849..835fda6d 100644 --- a/dev/tui/tui.zig +++ b/dev/tui/tui.zig @@ -2236,7 +2236,7 @@ fn trailCells(arena: std.mem.Allocator, shown: *const pardes.Surface, trail: *Ju if (region.kind == .body and cursor.x >= region.rect.x and cursor.x < @as(u32, region.rect.x) + region.rect.w and cursor.y >= region.rect.y and cursor.y < @as(u32, region.rect.y) + region.rect.h) break region.rect; } else return shown; - const ink = shown.chrome.fg orelse .{ 0xcc, 0xcc, 0xcc }; + const ink = shown.chrome.fg orelse pardes.colors.null_text; const page = shown.chrome.page orelse pardes.colors.null_page; const out = try arena.create(pardes.Surface); out.* = shown.*; diff --git a/runtime/macos.zig b/runtime/macos.zig index 7e0f50e7..8c6fa433 100644 --- a/runtime/macos.zig +++ b/runtime/macos.zig @@ -548,20 +548,6 @@ export fn pardes_topbar_pane_border_rgb() u32 { return @as(u32, rgb[0]) << 16 | @as(u32, rgb[1]) << 8 | rgb[2]; } -export fn pardes_tag_active_bg() u32 { - pardes.turn.wake(); - defer pardes.turn.rest(); - const st = state orelse return color_default; - const rgb = st.core.chromeTheme().tag_active_bg; - return @as(u32, rgb[0]) << 16 | @as(u32, rgb[1]) << 8 | rgb[2]; -} -export fn pardes_tagline_bg() u32 { - pardes.turn.wake(); - defer pardes.turn.rest(); - const st = state orelse return color_default; - const rgb = st.core.chromeTheme().tag_bg; - return @as(u32, rgb[0]) << 16 | @as(u32, rgb[1]) << 8 | rgb[2]; -} export fn pardes_fallback_font_count() u32 { return fonts.fallback_names.len; @@ -2382,11 +2368,9 @@ test "pardes.h declares every export the way it is defined" { try expectSameAbi(@TypeOf(c.pardes_tagline_band_offset), @TypeOf(pardes_tagline_band_offset)); try expectSameAbi(@TypeOf(c.pardes_topbar_pane_border_rgb), @TypeOf(pardes_topbar_pane_border_rgb)); try expectSameAbi(@TypeOf(c.pardes_topbar_pane_border_px), @TypeOf(pardes_topbar_pane_border_px)); - try expectSameAbi(@TypeOf(c.pardes_tag_active_bg), @TypeOf(pardes_tag_active_bg)); try expectSameAbi(@TypeOf(c.pardes_tagline_origin_col), @TypeOf(pardes_tagline_origin_col)); try expectSameAbi(@TypeOf(c.pardes_grid_col_at), @TypeOf(pardes_grid_col_at)); try expectSameAbi(@TypeOf(c.pardes_topbar_pane_border_rgb), @TypeOf(pardes_topbar_pane_border_rgb)); - try expectSameAbi(@TypeOf(c.pardes_tagline_bg), @TypeOf(pardes_tagline_bg)); try expectSameAbi(@TypeOf(c.pardes_fallback_font_count), @TypeOf(pardes_fallback_font_count)); try expectSameAbi(@TypeOf(c.pardes_fallback_font_name), @TypeOf(pardes_fallback_font_name)); try expectSameAbi(@TypeOf(c.pardes_scene), @TypeOf(pardes_scene)); -- cgit v1.3 From 4fe27fa83d1454830dd4fd98c5a76747f30d2776 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 02:26:20 -0300 Subject: colors: the ring's resolve budget counted in instructions, not CPU time, so a loaded machine cannot fail it (the coordinator's item to the themes programme's colour agent: W3's gui unit-test failed "the whole ring resolves in 150 ms of CPU, no theme in over 0.5 ms" at a load of 8.7, and it would trip every agent's gates); THE CAUSE: the test held B9's budget (about 0.5 ms a theme, the ring in 150 ms, Debug, idle) to the thread's CPU time, the least of five a theme, which a busy machine stretches (a sibling hyperthread, a shared cache, a lower clock): L1 measured the slowest theme at 871 us under a load of 8.7 where it takes 291 to 307 us idle; THE FIX: the same budget in user-space instructions, which the load does not move: one Chrome.of a theme counted by the kernel's counter (perf_event_open, user space only, this thread), 3.5 M a theme and 1 050 M the ring, at the 7 a nanosecond this code retires idle (the ring's 304 M in 42 ms); where the kernel gives no counter (not Linux, perf_event_paranoid 3) the test is skipped; RUN (TEST FIRST): the old test with the count beside its CPU time, run three times in a row on a quiet machine (load 0.9 to 2.5): CPU time 49.0, 42.1 and 41.9 ms for the ring, the slowest theme 409, 304 and 298 us (a third apart between runs at load 2; W3's at 8.7 over the 500 us), the counts 304,213,813, 304,213,802 and 304,213,802 (the slowest by count ao's 2,881,625 or 2,881,626 each time); the new test twice: 304,213,792 and 304,213,795, ao's 2,881,625, within the budget by 3.5x (the ring) and 1.2x (a theme); gui unit-test -Dtest-filter="the whole ring resolves" 14/14 and the whole gui unit-test 1948/1952 (4 skipped; its one failure the known BaselineHarnessMismatch), 304,213,799 there; load 1.9 to 2.7 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/colors.zig | 49 +++++++++++++++++++++++++++++++------------------ 1 file changed, 31 insertions(+), 18 deletions(-) (limited to 'core/colors.zig') diff --git a/core/colors.zig b/core/colors.zig index d280172e..315d1fc9 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; @@ -2717,29 +2718,41 @@ test "every theme in the ring meets every floor pardes owns (DESIGN.md B4), nati try std.testing.expectEqual(0, wrong); } -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" { -- cgit v1.3 From 148e48dd9b8cd7e66aa1521daa49a64852b1650e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 02:28:09 -0300 Subject: syntax, Query, Pick, Names, Band, Stream, File, colors: the Symbols picker grouped by kind, a kind mark on each row (UX DESIGN N, binding; the user: "The lsp symbols should be more organized: types first then functions then fields and the rest (and some indicator to tell the kind)", "For the symbols picker"): the rows are the file's own parse's, as before, now from a symbol walk of their own (syntax.zig `SymbolWalk`, in the same walk of the tree as the sticky headers' declarations, which keep theirs: contextFromTree), by one kind table a grammar (`symbol_rules`: Zig, C, C++, Rust, Go, Python, JavaScript, Java, C#, Kotlin, Scala, Ruby, PHP, bash, Haskell, OCaml, Erlang, Elixir, Clojure, Fortran, Ada, Pascal, PowerShell; JSON, CSS, HTML, Markdown and Typst have no declarations to list), each node's kind as given or found where its grammar cannot say it (Zig's `const S = struct`, `error{...}`, `@This()`, `@Type(...)` a type and `@import(...)` a module, JavaScript's `const f = () => ...` a function, C's declaration a function where a declarator is one's and a const where `const` says so, a Python class's or Kotlin's binding a field in a type); fields and consts are listed now (the sticky headers' declarations had neither), a function's consts and vars never (its locals), each named in the types, functions and modules it is in (`Counts.lines`, `torque.Parser.Parse`; an anonymous struct's members in its owner's, a Rust `impl S`'s in `S`, no row of its own); a row is `t Counts = struct`: its kind's mark (t type, f function, m field, c const, v var, n module, · other), its qualified name, two blanks and what its name's line says after the name (its body's `{`, a trailing `,` or `;` dropped), its line the dim meta at the right end (Band's); the mark in the keyword's ink (colors.Roles.kind, the theme's keyword pushed to 4.5:1 on every tag ground and the selection, as the key ink is), the qualifier and the words after the name dim; with the field empty the rows are types, functions, fields, then the rest (consts, vars, modules, other as one group), each in the text's order; typed, they stay grouped and are scored within each group (Names: `Cand.group`, `before` orders by it, then by `better`), the cursor starts on the best match wherever its group puts it (Names.bestRow, Pick.toBest: after a key, when the parse lands, and following the best while the rest are scored), and the count says where it is; the name alone is matched (`u8` in a signature matches nothing); no header rows: every row is a symbol, ordinary text, and C-q keeps them in a +Search with the mark a word; the query pane's `Symbols` rows the same (Query.gather), its current the best; the parse's answer carries the symbols beside the declarations (Stream.Batch.symbols, an input every replica takes), ContextCache keeps both for the revision (derived, made again at a load), and every producer makes both (the worker, a sticky header's refresh, a load), so a text at a revision has the same symbols everywhere; syntax.zig's tests ran in no test program (core-test's filter `syntax context nested` matched nothing on the base): core/root.zig imports it now, and its 34 pass; RUN (TEST FIRST): syntax.zig "syntax symbols: a Zig file's types, functions, fields and the rest ...", "... C, C++, Rust, Go, Python and JavaScript by their kind tables ...", "... every kind table names nodes of its grammar ..." (23 tables), Pick.zig "Symbols (UX DESIGN N): a Zig file's rows types, functions, fields, then the rest ... the mark in the keyword's ink, the qualifier and the rest dim", "Symbols (UX DESIGN N3): typed, the rows stay grouped ... the cursor starts on the best match ...; the name alone is matched, never the signature", "Symbols (UX DESIGN N): a C++ file's rows ...", "Symbols: every row is ordinary text ..."; on the base the rows were ` 2 pub const Counts = struct {` in the text's order, no mark, no field, the cursor on the first row; core-test -Dtest-filter=ymbols 18/18, core-test 1135/1308 (173 skipped); the stack's suites, the dump fuzz, the soak and the pictures are on the change after this one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/Band.zig | 9 +- core/File.zig | 36 +-- core/Names.zig | 31 ++- core/Pick.zig | 255 +++++++++++++++++++- core/Query.zig | 49 +++- core/Stream.zig | 25 +- core/colors.zig | 6 + core/draw.zig | 1 + core/dump.zig | 13 +- core/root.zig | 1 + core/syntax.zig | 707 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 11 files changed, 1066 insertions(+), 67 deletions(-) (limited to 'core/colors.zig') diff --git a/core/Band.zig b/core/Band.zig index 8ee5c9f0..0424315a 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/File.zig b/core/File.zig index 0f9178ac..49d22fdc 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 }; } }; @@ -2490,8 +2494,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 { @@ -3615,12 +3618,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/Names.zig b/core/Names.zig index d063bd17..415064ad 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 }; @@ -187,9 +190,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 +241,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]; diff --git a/core/Pick.zig b/core/Pick.zig index 1d332f25..2b5714cb 100644 --- a/core/Pick.zig +++ b/core/Pick.zig @@ -452,7 +452,10 @@ 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(); @@ -514,15 +517,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); @@ -584,7 +603,7 @@ 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) std.mem.Allocator.Error!Row { const dir = pk.dir.slice(); @@ -646,8 +665,23 @@ fn rowAt(p: *Pardes, pk: *const Pick, arena: std.mem.Allocator, i: usize) std.me 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; + const dot = std.mem.lastIndexOfScalar(u8, row.text[name_at .. name_at + cand.key_len], '.'); + row.kind = @intCast(name_at - 1); + row.pre = @intCast(name_at); + row.faint = @intCast(if (dot) |at| at + 1 else 0); + 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 } } }; @@ -837,7 +871,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 @@ -1415,6 +1449,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); @@ -1514,7 +1549,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, @@ -3283,3 +3318,211 @@ test "Ctrl-r in a picker unrolls its source's earlier queries (UX L2's last line 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" {} + \\ +; + +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" + \\ + , try rowLines(p, a)); + // 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 = roles.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); +} diff --git a/core/Query.zig b/core/Query.zig index 2b2abebb..743e9540 100644 --- a/core/Query.zig +++ b/core/Query.zig @@ -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,51 @@ 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 name alone is matched. + 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; + 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, 0, 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)"; diff --git a/core/Stream.zig b/core/Stream.zig index e9e7793b..50c43ae4 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 { @@ -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/colors.zig b/core/colors.zig index eefb2b67..f9de60c9 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -1381,6 +1381,10 @@ 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, + /// A symbol's kind mark in a list (`t`, `f`, UX DESIGN N4): the + /// keyword's ink, which spells a kind in the text (`struct`, `fn`), + /// 4.5:1 on every tag ground and on the selection. + kind: [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, @@ -1429,6 +1433,7 @@ pub const Roles = struct { const tag_grounds = [_][3]u8{ plain, focused, reading, r.selected[0].ground, r.selected[1].ground, r.selected[2].ground, r.selected[3].ground }; r.key = pushAway(th.box, &tag_grounds, ink_floor); r.match = pushAway(matchHue(th), &tag_grounds, ink_floor); + r.kind = pushAway(th.kw, &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; @@ -2379,6 +2384,7 @@ test "every theme's walk UI roles meet their floors on every ground they are dra } try checks.append(a, .{ .what = "key", .got = leastContrast(r.key, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) }); try checks.append(a, .{ .what = "match", .got = leastContrast(r.match, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) }); + try checks.append(a, .{ .what = "kind", .got = leastContrast(r.kind, &tags), .floor = @min(Roles.ink_floor, Reach.of(&tags)) }); for (r.tag) |inks| { try checks.append(a, .{ .what = "rule", .got = contrast(inks.rule, inks.ground), .floor = Roles.rule_floor }); try checks.append(a, .{ .what = "rule ceiling", .got = Roles.rule_ceiling - contrast(inks.rule, inks.ground), .floor = 0 }); diff --git a/core/draw.zig b/core/draw.zig index b666fc15..447256a9 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -965,6 +965,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 = chrome.roles.kind }; for (part.row.keys) |k| if (k == b) { style.fg = .{ .rgb = chrome.roles.key }; style.bold = true; diff --git a/core/dump.zig b/core/dump.zig index 2dde9c8c..663ee083 100644 --- a/core/dump.zig +++ b/core/dump.zig @@ -1379,7 +1379,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, @@ -1405,13 +1405,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/root.zig b/core/root.zig index 11cb5058..86ca62e0 100644 --- a/core/root.zig +++ b/core/root.zig @@ -461,6 +461,7 @@ test { _ = @import("FrameStats.zig"); _ = @import("Query.zig"); _ = @import("Names.zig"); + _ = @import("syntax.zig"); // its tests ran nowhere before _ = @import("Stream.zig"); _ = @import("Tables.zig"); _ = @import("Handover.zig"); diff --git a/core/syntax.zig b/core/syntax.zig index 5c05300e..5cdc2ff3 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,527 @@ 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 }; + 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| { + try w.out.append(w.gpa, .{ + .kind = found.kind, + .line = name.startPoint().row, + .name_start = name.startByte(), + .name_end = name.endByte(), + .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 => { + name = nameOf(node, rule.name); + 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() or n.endByte() - n.startByte() > max_name) return null; + return .{ .kind = kind, .name = name, .end = end }; +} + +/// The longest name a symbol has: a longer one is no name. +const max_name = 200; + +/// The node naming `node`: its field `field`; 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| 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 +2737,123 @@ 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" {} + \\test {} + \\extern fn tick() void; + \\ + ; + const lines = try symbolLines(gpa, "a.zig", source); + 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 + \\ + , 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}\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\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 {};\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); +} -- cgit v1.3 From 60e85abe53debc0c8dd8986b748e9c86086e0007 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 02:44:20 -0300 Subject: body_layer, Places, Query, Output, Tables, File, Prompt, Pick, Core: the body draws every colour from the chrome (the themes programme's L2b; DESIGN.md R7-R12, B5, B6, G7), worked out once a theme change by Chrome.of and read by `p.chrome()`, never by a theme's own fields or the old views: ONE SELECTION FAMILY (R7): the primary range, a `gw` label and a target with no number on `page.selection` in its ink, a multi-cursor head that selection reversed; every other range, a hover, a look preview, `m a`/`m i`'s region, a selecting prompt's dimmed preview and a query pane's current row on `selection_secondary` (the page halfway toward the selection in OKLab) in the text's own ink, where they were four sRGB mixes (25 % and 50 % toward a page that was `dark`'s tag) and a secondary drew `sel_fg`; the B1, B2 and B3 sweeps the chrome's `sweeps` (select, exec on the error hue, look on the added hue; acme its own), the body's and the tags' alike, where body_layer.buttonTints tinted the selection toward the keyword, string and number; HITS (R8, G7 as the designer's position): every place, a picker's landing line, a query pane's and a results pane's match on `hit` in the text's ink (was the theme's search ink), the current place and a landing line's matched span solid in the hue with the page's ink (`hit_current`, `hit_current_text`), where Roles drew a third tone step (1.9:1) that 68 themes could not show and a query pane its search ground; a search whose field is no regex dims its last places, the current on `hit` and the rest on `hit_faint` (new: the page halfway toward the hit, R7's secondary for hits; DESIGN.md is silent); SEVERITIES (R9): a message's words and detail after its line (Messages.inkOn, new: an error, a warning and a question their severity's ink on that ground, an echo, a notice and progress its dim ink), a diagnostics list's labels, a rename's struck name and its new one, each `page.severity`, where they were the theme's raw diagnostic inks or Roles' pushed ones; DIFF GROUNDS (R10): a patch's rows, changed words and faint lines (File.recolorSyntax), a pipe prompt's and a code action's ghost rows, `add` and `del` with the page's text, where colors.Grounds mixed the page 18 %, 28 % and 7 % toward the palette's green and red once a frame; THE REST: line numbers `line_number` and the caret's `line_number_current` (R12: derived where a theme has none, it was the plain number), the wrap marker the line numbers', a tree's guides (a call stack's) and their wrap pads the page's dim ink (were the info ink: a guide is meta, B5's dim row), a location the line numbers' ink, keys, `▸` and the sam fence `page.key`, context rows, a table's header and a hover's ghost lines on the plain tag's ground (its ink for the hover), a table's rules the page's rule ink (were `border orelse lineno`), the rail and thumb the chrome's, the body's page and text `page` (a theme that leaves its page to the host leaves it its text, as before), syntax `syntax`; DELETED: Core.bodyChrome and its cache (`body_chrome`: a whole Theme compared with meta.eql for every decorated row and every wrap-pad cell, C1's A7), body_layer.buttonTints and buttonInks, the Grounds recipe (colors.Grounds is the library's view on the chrome now: lib_syntax exports it, test/consumer pins its relations), Roles.hit and hit_current with hitOf and their floors, ChromeTheme's search_fg, diagnostic_info, diagnostic_hint and lineno (nothing reads them now); every value is Chrome.of's, worked out at a theme change (finishThemeInitialization, setThemeIndex, previewTheme, loadThemeFile), never a frame, a row or a cell: the one new one, `hit_faint`, is one OKLab mix there; RUN (TEST FIRST): Places.zig "places: each on the hit ground in its text's own ink, the current one solid ... the selection over it; a search whose field is no regex dims them, the rest faint" (orchard: after `/alpha`, Enter and `j`, the current place `hit_current` in `hit_current_text`, the other `hit` in the page's text; searched again, its current under the selection; with `(` the others `hit_faint`): fails on the base at its current place (Roles' 1.9:1 step under the text's ink, where the hue in the page's ink is asked; its first version, asked during the live prompt, failed there on #3c614a: the body's selection is the current place then, drawn over it as before); Query.zig "a query pane's hits are the body's ..." (a `/alpha` query pane: the row's match `hit` in the text's ink, the owner's current place solid, the current row `selection_secondary` between its places and to its end, none below): fails on the base at Query.zig (expected #917a53, found #5e4923, the search ground); body_layer.zig "the body's selections are one family (R7) ..." (`eC` in orchard: the primary on `page.selection` in its ink, the other range on `selection_secondary` in the text's ink, its head reversed, a B2 sweep held over beta on `sweeps[1]`): fails on the base at body_layer.zig (expected #24382c, found #243a2d); body_layer.zig "the body's surfaces take every colour from the chrome: none reads a theme's own fields or the old views (DESIGN.md B6)" (the source test: body_layer, Places, Query, Output, Tables, File, Prompt, Pick, jj and ansi, their code before their tests: `theme()` read for its name alone, no chromeTheme(), bodyChrome, .roles, Grounds or LegacyTheme); re-pinned to the chrome and failing on the base: Prompt.zig's pipe ghosts (del.row #331a12, was Grounds' #302b25) and `/`'s `▸` (page.key #add38a, was Roles' #bada9d), Pick.zig's code action ghosts and its landing line, body_layer's motion targets, the build error's `✗` in `page.severity[0]`; colors.zig "line numbers stay quiet ..." (a ThemeFile with no current number: R12's derived one, 4.5:1), look.zig's hover preview on `selection_secondary`, test/output.zig and test/panes.zig's results colours (hit, page text, line numbers, the warning severity); GOLDENS re-recorded (13, orchard unless said), each class read: (1) R8 hit ink: a match on #5e4923 (orchard's own search ground, kept as its `hit`) in the text #e5eee5 where its search ink #f7e4a5 was: callstack 6 cells, psearch 15, stepgrain 26, lsprelpath 11; (2) G7 current hit: lsprelpath row 20, the owner's current place in a query row, #0d1410 on #917a53 (the hue held 4.5:1) where it was #f7e4a5 on #5e4923, 9 cells; (3) R7 secondary: #243a2d (sRGB half) to #24382c (OKLab half), the text's own ink where `sel_fg` #f5f7ee was: multicursor 2 cells and selregex 24 (secondary ranges), stepgrain 285 and lsprelpath 185 (a query pane's current row); (4) R10 diff grounds: diffview rows 12-19 (the diff pane's own rows: added #263025 to #132503, deleted #302b25 to #331a12, 558 cells; the same values the command pane's diff took in L2c), diffstack rows 26-29 (a faint added line #171f18 to #101c0b, changed words #364131 to #203900 and #453832 to #53251b), pagercolor rows 36-37 (a +Pager's faint lines: #1a1d18 to #211812, #171f18 to #101c0b); markers and syntax inks unchanged; (5) a tree's guides: callstack rows 11-21, #92d1de (the info ink) to #666f68 (the page's dim ink), 35 cells; (6) key ink: fsearch's `▸`, #bada9d (pushed over seven tag grounds) to #add38a (the accent held on the page); (7) R7 exec sweep: headersweep and headersweep-restored, a B2 sweep on the header, #f5f7ee on #5b7e5a (the selection tinted toward the string) to #e5eee5 on #4c251b (the error hue a selection step off the page), 8 and 16 cells (draw.zig's sweeps, moved with buttonTints); (8) R12: themesel row 26, the caret line's number in solarized_dark (#586e75 to #7f9193) and acme (#999980 to #74746a), themes with no current-line number of their own; no text moved, no other golden; GATES: core-test 1132/1305 (173 skipped; the merge's 1128/1301 + 4), shell-test 1353/1356 (3 skipped), pane-test 184/185 (1 skipped), behaviour-test 280/280 and --replay 20 seeds of 70 steps, 0 failures, process-test 0 of 147 failed (3 skipped; 13 re-recorded above, ttyhelp unmoved), term-test 17/17, kitty-test 45/45; gui unit-test 1957/1961 (4 skipped; its one failure the known BaselineHarnessMismatch; test/consumer's Grounds relations pass on the chrome's rows); PICTURES (the S kit, 26 px, 100x30, `Jumps walk`; before = install74's pardes-gui, after = this tree's Debug gui): .scratch/themes/L2b/png/, `--before|after.png` and `pair--.png` side by side, in dark, neonotte84, orchard and acme: `search` (a live `/words`: the current place is the body's selection, as before), `landed` (Enter, then `j`: the current place the solid chip), `selhit` (`x` over a hit), `grep` (SPC f g count: the preview's landing line and matched span), `error` (`:zig build`'s error words after report.zig's line 11: dark's were its grey text, red now), `diff` (a .diff file's rows); the dump and the digest unchanged (`body_chrome` was derived, `theme_chrome` local), so no fuzz or soak; load 3.2 to 9.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/Core.zig | 14 +- core/File.zig | 21 ++- core/Messages.zig | 12 ++ core/Output.zig | 25 ++-- core/Pick.zig | 30 ++-- core/Places.zig | 59 ++++++-- core/Prompt.zig | 26 ++-- core/Query.zig | 62 ++++++-- core/Tables.zig | 8 +- core/body_layer.zig | 220 ++++++++++++++++++----------- core/colors.zig | 133 +++-------------- core/draw.zig | 9 +- core/look.zig | 3 +- core/root.zig | 4 +- test/output.zig | 24 ++-- test/panes.zig | 2 +- test/snapshots/callstack.golden | 24 ++-- test/snapshots/diffstack.golden | 6 +- test/snapshots/diffview.golden | 12 +- test/snapshots/fsearch.golden | 2 +- test/snapshots/headersweep-restored.golden | 4 +- test/snapshots/headersweep.golden | 2 +- test/snapshots/lsprelpath.golden | 8 +- test/snapshots/multicursor.golden | 4 +- test/snapshots/pagercolor.golden | 4 +- test/snapshots/psearch.golden | 6 +- test/snapshots/selregex.golden | 12 +- test/snapshots/stepgrain.golden | 8 +- test/snapshots/themesel.golden | 4 +- 29 files changed, 391 insertions(+), 357 deletions(-) (limited to 'core/colors.zig') diff --git a/core/Core.zig b/core/Core.zig index cbcf4324..e458dab4 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). @@ -547,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 @@ -2175,16 +2173,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 diff --git a/core/File.zig b/core/File.zig index 332499b4..e246285c 100644 --- a/core/File.zig +++ b/core/File.zig @@ -2917,7 +2917,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; @@ -2940,8 +2941,8 @@ 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; + // 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: { @@ -2980,14 +2981,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; @@ -3004,7 +3002,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; @@ -3052,7 +3050,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); @@ -3104,6 +3102,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; @@ -3122,7 +3121,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); } } diff --git a/core/Messages.zig b/core/Messages.zig index e05961b5..eca5ec9f 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/Output.zig b/core/Output.zig index fe1543fe..8807e55d 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 }; } }; diff --git a/core/Pick.zig b/core/Pick.zig index 1d332f25..7c40a234 100644 --- a/core/Pick.zig +++ b/core/Pick.zig @@ -1176,8 +1176,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; @@ -1194,15 +1194,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; } } @@ -2585,15 +2585,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 @@ -2610,10 +2610,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); @@ -2720,16 +2720,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); diff --git a/core/Places.zig b/core/Places.zig index 8563d7c8..63f9ced6 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, the + // selection over the hit; 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.page.selection.ground }, 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 b76b2d9a..49a9645d 100644 --- a/core/Prompt.zig +++ b/core/Prompt.zig @@ -874,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). @@ -953,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]; @@ -969,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. @@ -1027,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; @@ -1500,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); @@ -1651,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..f3673dd6 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) { @@ -2092,8 +2092,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 +2105,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 +2141,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); } } } @@ -2815,3 +2812,48 @@ test "Grep: a row whose numbers a Found cannot hold (a column past u32) is passe // 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/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/body_layer.zig b/core/body_layer.zig index 513f9a6d..1eb3bf54 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. @@ -408,12 +387,11 @@ 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) { const w = pane.wrapAt(p.settings.tab, vr); @@ -452,7 +430,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 +451,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 +470,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 +541,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 +559,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 +588,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 +607,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 +655,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 +666,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 +687,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 +742,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 +768,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 +783,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 +816,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 +838,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 +866,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 +1165,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 +1290,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 +1395,79 @@ 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); +} diff --git a/core/colors.zig b/core/colors.zig index 315d1fc9..44a2d415 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -553,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 @@ -726,6 +729,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. @@ -1061,31 +1065,17 @@ pub fn synInk(th: *const LegacyTheme, sy: @import("syntax.zig").Syn) ?[3]u8 { } /// 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 const Ground = Chrome.Diff; 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) }; - } - - 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 }; + const c = Chrome.of(&.fromLegacy(th.*)); + return .{ .add = c.add, .del = c.del }; } /// The ground of a byte's hue, if it has one. @@ -1294,17 +1284,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, @@ -1342,18 +1328,14 @@ 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, .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), @@ -1387,10 +1369,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, @@ -1403,8 +1381,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 { @@ -1436,20 +1412,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); @@ -1552,48 +1514,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 @@ -1791,7 +1711,6 @@ pub fn loadThemeFile(p: *Pardes, generation: u32, bytes: []const u8) bool { theme.name = view.name; p.theme_chrome = .of(&theme, &view); - p.body_chrome = .{ .theme = view, .chrome = p.theme_chrome }; const old = p.custom_theme; p.custom_theme = view; if (old) |theme_value| p.gpa.free(theme_value.name); @@ -1828,13 +1747,10 @@ 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 }; } /// Themes near `name`, a line of them, for a Theme given a name there is @@ -1915,7 +1831,6 @@ pub fn previewTheme(p: *Pardes, index: ?usize) void { 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 }; } pub fn setThemeIndex(p: *Pardes, index: usize) void { @@ -1923,7 +1838,6 @@ pub fn setThemeIndex(p: *Pardes, index: usize) void { (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 }; if (p.custom_theme) |theme_value| { p.custom_theme = null; p.gpa.free(theme_value.name); @@ -2131,9 +2045,8 @@ test "native themes keep text and UI roles readable on their own surfaces" { 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. @@ -2153,7 +2066,7 @@ 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); @@ -2219,6 +2132,7 @@ test "line numbers stay quiet without a current-line tag background" { 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; @@ -2228,10 +2142,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. @@ -2374,7 +2291,6 @@ test "every theme's walk UI roles meet their floors on every ground they are dra 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| { @@ -2401,15 +2317,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 }); diff --git a/core/draw.zig b/core/draw.zig index 7f178bfb..e90535b5 100644 --- a/core/draw.zig +++ b/core/draw.zig @@ -842,8 +842,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 |_| {}; @@ -1221,12 +1221,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/look.zig b/core/look.zig index 41c59cf3..d9dfe0e1 100644 --- a/core/look.zig +++ b/core/look.zig @@ -2134,8 +2134,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/root.zig b/core/root.zig index 11cb5058..e07cbed6 100644 --- a/core/root.zig +++ b/core/root.zig @@ -764,11 +764,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)" }, diff --git a/test/output.zig b/test/output.zig index 77de7649..f2a35c01 100644 --- a/test/output.zig +++ b/test/output.zig @@ -41,7 +41,7 @@ test "search tint survives wrapping and theme changes while selections remain au const surface = try p.render(frame.allocator()); var marked: usize = 0; for (surface.cells) |cell| { - if (std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.theme().search_bg.? })) marked += 1; + if (std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.chrome().hit })) marked += 1; } try std.testing.expectEqual(@as(usize, 3), marked); _ = frame.reset(.retain_capacity); @@ -50,8 +50,8 @@ test "search tint survives wrapping and theme changes while selections remain au const light = try p.render(frame.allocator()); var light_matches: usize = 0; for (light.cells) |cell| { - if (!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.theme().search_bg.? })) continue; - try std.testing.expectEqualDeep(pardes.Color{ .rgb = p.theme().search_fg.? }, cell.style.fg); + if (!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.chrome().hit })) continue; + try std.testing.expectEqualDeep(pardes.Color{ .rgb = p.chrome().page.text }, cell.style.fg); light_matches += 1; } try std.testing.expectEqual(@as(usize, 3), light_matches); @@ -61,7 +61,7 @@ test "search tint survives wrapping and theme changes while selections remain au pane.body.vsel = .{ .active = true, .row = 0, .col = pane.body.cur_col - 2, .explicit = true }; const selected = try p.render(frame.allocator()); for (selected.cells) |cell| - try std.testing.expect(!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.theme().search_bg.? })); + try std.testing.expect(!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = p.chrome().hit })); try std.testing.expectEqualStrings(text, pane.file.?.content); } } @@ -128,15 +128,15 @@ test "location producers retain rendered location match and diagnostic styles" { var frame = std.heap.ArenaAllocator.init(p.gpa); defer frame.deinit(); const surface = try p.render(frame.allocator()); - const chrome = pardes.ChromeTheme.fromTheme(p.theme()); - try std.testing.expectEqual(pardes.Color{ .rgb = chrome.lineno }, outputCell(p, surface, id, 0).style.fg); + const chrome = p.chrome(); + try std.testing.expectEqual(pardes.Color{ .rgb = chrome.line_number }, outputCell(p, surface, id, 0).style.fg); const start = file.location_rows[0].code_start; const first = outputCell(p, surface, id, start); if (diagnostic) { - try std.testing.expectEqual(pardes.Color{ .rgb = chrome.diagnostic_warning }, first.style.fg); + try std.testing.expectEqual(pardes.Color{ .rgb = chrome.page.severity[1] }, first.style.fg); try std.testing.expect(first.style.bold); } else if (origin == .search or origin == .cmd) { - try std.testing.expectEqual(pardes.Color{ .rgb = chrome.search_bg }, first.style.bg); + try std.testing.expectEqual(pardes.Color{ .rgb = chrome.hit }, first.style.bg); } if (!diagnostic) { const number = start + std.mem.indexOf(u8, code, "42").?; @@ -1145,10 +1145,10 @@ test "LSP occurrence tint follows the supplied source span through context" { var frame = std.heap.ArenaAllocator.init(p.gpa); defer frame.deinit(); const surface = try p.render(frame.allocator()); - const chrome = pardes.ChromeTheme.fromTheme(p.theme()); + const chrome = p.chrome(); var marked: usize = 0; for (surface.cells) |cell| { - if (!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = chrome.search_bg })) continue; + if (!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = chrome.hit })) continue; try std.testing.expect(cell.text[0] == 'f' or cell.text[0] == 'o'); marked += 1; } @@ -1294,10 +1294,10 @@ test "stacked search and LSP results retain source tint navigation and dump owne var arena = std.heap.ArenaAllocator.init(p.gpa); defer arena.deinit(); const surface = try p.render(arena.allocator()); - const chrome = pardes.ChromeTheme.fromTheme(p.theme()); + const chrome = p.chrome(); var marked: usize = 0; for (surface.cells) |cell| { - if (!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = chrome.search_bg })) continue; + if (!std.meta.eql(cell.style.bg, pardes.Color{ .rgb = chrome.hit })) continue; try std.testing.expect(cell.text[0] == 'f' or cell.text[0] == 'o'); marked += 1; } diff --git a/test/panes.zig b/test/panes.zig index 3acd5769..8f0a352c 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -2056,7 +2056,7 @@ const OutputTests = struct { const y = body_y + @as(u16, @intCast(index)); const cell = surface.at(x, y); try std.testing.expect(!cell.style.bold); - try std.testing.expectEqual(pardes.Color{ .rgb = pardes.ChromeTheme.fromTheme(p.theme()).lineno }, cell.style.fg); + try std.testing.expectEqual(pardes.Color{ .rgb = p.chrome().line_number }, cell.style.fg); } // Old dumps and edited outputs still identify both context prefixes. panes.File.setContent(p, file, try p.gpa.dupe(u8, "| old.zig:1 old\n new.zig:2 new\nmain.zig:42 ***\t\tmatch\n")); diff --git a/test/snapshots/callstack.golden b/test/snapshots/callstack.golden index d1140d0c..58e04798 100644 --- a/test/snapshots/callstack.golden +++ b/test/snapshots/callstack.golden @@ -51,18 +51,18 @@ |8: 0-0 d,#608269, 1-4 d,#0d1410, 5-10 #59675c,#0d1410, 11-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410, |9: 0-0 d,#152019, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-109 #e5eee5,#0d1410, |10: 0-1 d,#add38a, 2-32 #becfc4,#314738, 33-43 #dfbce5,#314738, 44-109 #becfc4,#314738, -|11: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #92d1de,#0d1410, 12-109 #59675c,#0d1410, -|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-11 #92d1de,#0d1410, 12-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410, -|13: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #92d1de,#0d1410, 13-109 #59675c,#0d1410, -|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #92d1de,#0d1410, 13-16 #c9a7ed,#0d1410, 17-109 #e5eee5,#0d1410, -|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #92d1de,#0d1410, 13-109 #59675c,#0d1410, -|16: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #92d1de,#0d1410, 13-16 #c9a7ed,#0d1410, 17-109 #e5eee5,#0d1410, -|17: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-14 #92d1de,#0d1410, 15-109 #59675c,#0d1410, -|18: 0-0 d,#608269, 1-4 d,#0d1410, 5-12 #59675c,#0d1410, 13-14 #92d1de,#0d1410, 15-17 #c9a7ed,#0d1410, 18-109 #e5eee5,#0d1410, -|19: 0-0 d,#608269, 1-4 d,#0d1410, 5-12 #59675c,#0d1410, 13-15 #92d1de,#0d1410, 16-109 #59675c,#0d1410, -|20: 0-0 d,#608269, 1-3 d,#0d1410, 4-12 #59675c,#0d1410, 13-15 #92d1de,#0d1410, 16-19 #c9a7ed,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #f7e4a5,#5e4923, 27-109 #e5eee5,#0d1410, -|21: 0-0 d,#608269, 1-3 d,#0d1410, 4-12 #59675c,#0d1410, 13-15 #92d1de,#0d1410, 16-109 #59675c,#0d1410, -|22: 0-0 d,#608269, 1-3 d,#0d1410, 4-15 #59675c,#0d1410, 16-19 #c9a7ed,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #f7e4a5,#5e4923, 27-109 #e5eee5,#0d1410, +|11: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #666f68,#0d1410, 12-109 #59675c,#0d1410, +|12: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-11 #666f68,#0d1410, 12-14 #c9a7ed,#0d1410, 15-109 #e5eee5,#0d1410, +|13: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #666f68,#0d1410, 13-109 #59675c,#0d1410, +|14: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #666f68,#0d1410, 13-16 #c9a7ed,#0d1410, 17-109 #e5eee5,#0d1410, +|15: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #666f68,#0d1410, 13-109 #59675c,#0d1410, +|16: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-12 #666f68,#0d1410, 13-16 #c9a7ed,#0d1410, 17-109 #e5eee5,#0d1410, +|17: 0-0 d,#608269, 1-4 d,#0d1410, 5-9 #59675c,#0d1410, 10-14 #666f68,#0d1410, 15-109 #59675c,#0d1410, +|18: 0-0 d,#608269, 1-4 d,#0d1410, 5-12 #59675c,#0d1410, 13-14 #666f68,#0d1410, 15-17 #c9a7ed,#0d1410, 18-109 #e5eee5,#0d1410, +|19: 0-0 d,#608269, 1-4 d,#0d1410, 5-12 #59675c,#0d1410, 13-15 #666f68,#0d1410, 16-109 #59675c,#0d1410, +|20: 0-0 d,#608269, 1-3 d,#0d1410, 4-12 #59675c,#0d1410, 13-15 #666f68,#0d1410, 16-19 #c9a7ed,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #e5eee5,#5e4923, 27-109 #e5eee5,#0d1410, +|21: 0-0 d,#608269, 1-3 d,#0d1410, 4-12 #59675c,#0d1410, 13-15 #666f68,#0d1410, 16-109 #59675c,#0d1410, +|22: 0-0 d,#608269, 1-3 d,#0d1410, 4-15 #59675c,#0d1410, 16-19 #c9a7ed,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #e5eee5,#5e4923, 27-109 #e5eee5,#0d1410, |23: 0-0 d,#608269, 1-4 d,#0d1410, 5-109 #59675c,#0d1410, |24: 0-0 d,#608269, 1-109 d,#0d1410, |25: 0-0 d,#608269, 1-109 d,#0d1410, diff --git a/test/snapshots/diffstack.golden b/test/snapshots/diffstack.golden index 68c58062..1ffa87a4 100644 --- a/test/snapshots/diffstack.golden +++ b/test/snapshots/diffstack.golden @@ -57,8 +57,8 @@ |23: 0-0 d,#608269, 1-2 d,#0d1410, 3-99 #59675c,#0d1410, |24: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #59675c,#0d1410, |25: 0-0 d,#608269, 1-6 d,#0d1410, 7-9 #c9a7ed,#0d1410, 10-99 #e5eee5,#0d1410, -|26: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#0d1410,b 3-10 #f1a39b,#0d1410, 11-11 #e5eee5,#453832, 12-99 #e5eee5,#0d1410, -|27: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#0d1410,b 3-10 #b6ce94,#0d1410, 11-11 #e5eee5,#364131, 12-99 #e5eee5,#0d1410, +|26: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#0d1410,b 3-10 #f1a39b,#0d1410, 11-11 #e5eee5,#53251b, 12-99 #e5eee5,#0d1410, +|27: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#0d1410,b 3-10 #b6ce94,#0d1410, 11-11 #e5eee5,#203900, 12-99 #e5eee5,#0d1410, |28: 0-0 d,#152019, 1-10 d,#0d1410, 11-99 #e5eee5,#0d1410, -|29: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #b6ce94,#171f18,b 3-10 #b6ce94,#171f18, 11-99 #e5eee5,#171f18, +|29: 0-0 d,#152019, 1-1 d,#0d1410, 2-2 #b6ce94,#101c0b,b 3-10 #b6ce94,#101c0b, 11-99 #e5eee5,#101c0b, |30: 0-1 d,#1d2824, 2-99 #b2c3b8,#1d2824, diff --git a/test/snapshots/diffview.golden b/test/snapshots/diffview.golden index c441e19c..c0cc6194 100644 --- a/test/snapshots/diffview.golden +++ b/test/snapshots/diffview.golden @@ -43,14 +43,14 @@ |9: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410, |10: 0-0 d,#608269, 1-4 d,#0d1410, 5-7 #59675c,#0d1410, 8-25 #e5eee5,#0d1410, 26-30 #c9a7ed,#0d1410, 31-31 #e5eee5,#0d1410, 32-35 #c9a7ed,#0d1410, 36-99 #e5eee5,#0d1410, |11: 0-0 d,#608269, 1-4 d,#0d1410, 5-11 #59675c,#0d1410, 12-99 #e5eee5,#0d1410, -|12: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #f1a39b,#302b25,b 8-11 #f1a39b,#302b25, 12-24 #e5eee5,#302b25, 25-25 #f8c082,#302b25, 26-99 #e5eee5,#302b25, -|13: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-11 #b6ce94,#263025, 12-99 #e5eee5,#263025, -|14: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-11 #b6ce94,#263025, 12-21 #e5eee5,#263025, 22-28 #c9a7ed,#263025, 29-99 #e5eee5,#263025, +|12: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #f1a39b,#331a12,b 8-11 #f1a39b,#331a12, 12-24 #e5eee5,#331a12, 25-25 #f8c082,#331a12, 26-99 #e5eee5,#331a12, +|13: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#132503,b 8-11 #b6ce94,#132503, 12-99 #e5eee5,#132503, +|14: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#132503,b 8-11 #b6ce94,#132503, 12-21 #e5eee5,#132503, 22-28 #c9a7ed,#132503, 29-99 #e5eee5,#132503, |15: 0-0 d,#608269, 1-3 d,#0d1410, 4-99 #59675c,#0d1410, |16: 0-0 d,#608269, 1-3 d,#0d1410, 4-11 #59675c,#0d1410, 12-99 #e5eee5,#0d1410, -|17: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #f1a39b,#302b25,b 8-15 #f1a39b,#302b25, 16-99 #b8d88a,#302b25, -|18: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-15 #b6ce94,#263025, 16-99 #b8d88a,#263025, -|19: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#263025,b 8-15 #b6ce94,#263025, 16-99 #b8d88a,#263025, +|17: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #f1a39b,#331a12,b 8-15 #f1a39b,#331a12, 16-99 #b8d88a,#331a12, +|18: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#132503,b 8-15 #b6ce94,#132503, 16-99 #b8d88a,#132503, +|19: 0-0 d,#608269, 1-3 d,#0d1410, 4-6 #59675c,#0d1410, 7-7 #b6ce94,#132503,b 8-15 #b6ce94,#132503, 16-99 #b8d88a,#132503, |20: 0-0 d,#608269, 1-3 d,#0d1410, 4-11 #59675c,#0d1410, 12-99 #e5eee5,#0d1410, |21: 0-0 d,#608269, 1-3 d,#0d1410, 4-7 #59675c,#0d1410, 8-99 #e5eee5,#0d1410, |22: 0-0 d,#608269, 1-4 d,#0d1410, 5-99 #59675c,#0d1410, diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden index 6a70d3c4..e9b15f4c 100644 --- a/test/snapshots/fsearch.golden +++ b/test/snapshots/fsearch.golden @@ -54,7 +54,7 @@ |15: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-179 d,#0d1410, |16: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-40 #d3b0d9,#1d2824, 41-89 #b2c3b8,#1d2824, 90-91 #000000,#add38a, 92-98 #becfc4,#2c2c0f, 99-99 #bada9d,#2c2c0f,b 100-100 #bada9d,#2c2c0f, 101-106 #becfc4,#2c2c0f, 107-113 #79836f,#2c2c0f, 114-126 #becfc4,#2c2c0f, 127-179 #79836f,#2c2c0f, |17: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#608269, 91-94 #e5eee5,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, -|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#e5eee5, 91-91 #e5eee5,#0d1410, 92-94 #e5eee5,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #bada9d,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410, +|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-89 #e5eee5,#0d1410, 90-90 #e5eee5,#e5eee5, 91-91 #e5eee5,#0d1410, 92-94 #e5eee5,#0d1410,b 95-95 #616f64,#0d1410,b 96-96 #add38a,#0d1410,b 97-100 #f5f7ee,#3c614a, 101-101 #f5f7ee,#0d1410, 102-179 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |20: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, |21: 0-0 d,#608269, 1-89 d,#0d1410, 90-90 d,#608269, 91-94 d,#0d1410, 95-96 #59675c,#0d1410, 97-179 #e5eee5,#0d1410, diff --git a/test/snapshots/headersweep-restored.golden b/test/snapshots/headersweep-restored.golden index 26a0c80b..6e0dff27 100644 --- a/test/snapshots/headersweep-restored.golden +++ b/test/snapshots/headersweep-restored.golden @@ -1,6 +1,6 @@ == style col-sweeping grid=120x21 |0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824, -|1: 0-1 d,#887455, 2-35 #becfc4,#314738, 36-43 #f5f7ee,#5b7e5a, 44-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-35 #becfc4,#314738, 36-43 #e5eee5,#4c251b, 44-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824, |2: 0-1 d,#add38a, 2-43 #becfc4,#314738, 44-53 #dfbce5,#314738, 54-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-103 #b2c3b8,#1d2824, 104-113 #d3b0d9,#1d2824, 114-119 #b2c3b8,#1d2824, |3: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-61 #becfc4,#1d2824, 62-119 #b2c3b8,#1d2824, |4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, @@ -43,7 +43,7 @@ | | ✓ @p1 Dump 1 message · SPC h m == style ws-sweeping grid=120x21 -|0: 0-1 d,#1d2824, 2-100 #b2c3b8,#1d2824, 101-108 #f5f7ee,#5b7e5a, 109-119 #b2c3b8,#1d2824, +|0: 0-1 d,#1d2824, 2-100 #b2c3b8,#1d2824, 101-108 #e5eee5,#4c251b, 109-119 #b2c3b8,#1d2824, |1: 0-1 d,#887455, 2-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824, |13: 0-0 d,#608269, 1-59 d,#0d1410, 60-60 d,#608269, 61-119 d,#0d1410, |14: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #666f68,#0d1410, 60-60 #666f68,#608269, 61-119 #666f68,#0d1410, diff --git a/test/snapshots/headersweep.golden b/test/snapshots/headersweep.golden index 8763fbb2..49eda692 100644 --- a/test/snapshots/headersweep.golden +++ b/test/snapshots/headersweep.golden @@ -1,6 +1,6 @@ == style col-sweeping grid=120x21 |0: 0-1 d,#1d2824, 2-119 #b2c3b8,#1d2824, -|1: 0-1 d,#887455, 2-35 #becfc4,#314738, 36-43 #f5f7ee,#5b7e5a, 44-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824, +|1: 0-1 d,#887455, 2-35 #becfc4,#314738, 36-43 #e5eee5,#4c251b, 44-59 #becfc4,#314738, 60-61 #becfc4,#887455, 62-119 #b2c3b8,#1d2824, |2: 0-1 d,#add38a, 2-34 #becfc4,#314738, 35-44 #dfbce5,#314738, 45-59 #becfc4,#314738, 60-61 #becfc4,#496656, 62-94 #b2c3b8,#1d2824, 95-104 #d3b0d9,#1d2824, 105-119 #b2c3b8,#1d2824, |3: 0-1 d,#314738, 2-59 #becfc4,#314738, 60-61 #becfc4,#1d2824, 62-119 #b2c3b8,#1d2824, |4: 0-0 d,#608269, 1-1 d,#0d1410, 2-59 #e5eee5,#0d1410, 60-60 #e5eee5,#608269, 61-119 #e5eee5,#0d1410, diff --git a/test/snapshots/lsprelpath.golden b/test/snapshots/lsprelpath.golden index bd2dc172..48fbfbd1 100644 --- a/test/snapshots/lsprelpath.golden +++ b/test/snapshots/lsprelpath.golden @@ -62,9 +62,9 @@ |15: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824, |16: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, |17: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, -|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-21 #59675c,#243a2d, 22-31 #e5eee5,#243a2d, 32-36 #f7e4a5,#5e4923, 37-37 #f7e4a5,#243a2d, 38-39 #e5eee5,#243a2d, 40-44 #c9a7ed,#243a2d, 45-99 #e5eee5,#243a2d, +|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-21 #59675c,#24382c, 22-31 #e5eee5,#24382c, 32-36 #e5eee5,#5e4923, 37-39 #e5eee5,#24382c, 40-44 #c9a7ed,#24382c, 45-99 #e5eee5,#24382c, |19: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, -|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-40 #e5eee5,#0d1410, 41-45 #f7e4a5,#5e4923, 46-99 #e5eee5,#0d1410, +|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-40 #e5eee5,#0d1410, 41-45 #0d1410,#917a53, 46-99 #e5eee5,#0d1410, |21: 0-0 d,#608269, 1-99 d,#0d1410, |22: 0-0 d,#608269, 1-99 d,#0d1410, |23: 0-0 d,#608269, 1-99 d,#0d1410, @@ -144,9 +144,9 @@ |15: 0-1 d,#496656, 2-99 #b2c3b8,#1d2824, |16: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, |17: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, -|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #59675c,#243a2d, 24-33 #e5eee5,#243a2d, 34-37 #f7e4a5,#5e4923, 38-38 #f7e4a5,#243a2d, 39-40 #e5eee5,#243a2d, 41-45 #c9a7ed,#243a2d, 46-99 #e5eee5,#243a2d, +|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-23 #59675c,#24382c, 24-33 #e5eee5,#24382c, 34-37 #e5eee5,#5e4923, 38-40 #e5eee5,#24382c, 41-45 #c9a7ed,#24382c, 46-99 #e5eee5,#24382c, |19: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, -|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-38 #e5eee5,#0d1410, 39-42 #f7e4a5,#5e4923, 43-99 #e5eee5,#0d1410, +|20: 0-0 d,#608269, 1-1 d,#0d1410, 2-19 #59675c,#0d1410, 20-23 #e5eee5,#0d1410, 24-26 #c9a7ed,#0d1410, 27-38 #e5eee5,#0d1410, 39-42 #0d1410,#917a53, 43-99 #e5eee5,#0d1410, |21: 0-0 d,#608269, 1-99 d,#0d1410, |22: 0-0 d,#608269, 1-99 d,#0d1410, |23: 0-0 d,#608269, 1-99 d,#0d1410, diff --git a/test/snapshots/multicursor.golden b/test/snapshots/multicursor.golden index 267fba5e..9c992e04 100644 --- a/test/snapshots/multicursor.golden +++ b/test/snapshots/multicursor.golden @@ -80,8 +80,8 @@ == snap three-selections grid=150x31 cursor=83,19 == style three-selections grid=150x31 |16: 0-1 d,#496656, 2-34 #b2c3b8,#1d2824, 35-44 #d3b0d9,#1d2824, 45-74 #b2c3b8,#1d2824, 75-75 #b2c3b8,#add38a, 76-76 #000000,#f9cb70,b 77-109 #becfc4,#314738, 110-115 #dfbce5,#314738, 116-149 #becfc4,#314738, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #f5f7ee,#243a2d, 83-83 #3c614a,#f5f7ee, 84-149 #e5eee5,#0d1410, -|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #f5f7ee,#243a2d, 83-83 #3c614a,#f5f7ee, 84-149 #e5eee5,#0d1410, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #e5eee5,#24382c, 83-83 #3c614a,#f5f7ee, 84-149 #e5eee5,#0d1410, +|18: 0-0 d,#608269, 1-1 d,#0d1410, 2-74 #e5eee5,#0d1410, 75-75 #e5eee5,#608269, 76-79 #e5eee5,#0d1410, 80-81 #59675c,#0d1410, 82-82 #e5eee5,#24382c, 83-83 #3c614a,#f5f7ee, 84-149 #e5eee5,#0d1410, |19: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-76 d,#0d1410, 77-79 d,#0d1410,b 80-81 #616f64,#0d1410,b 82-83 #f5f7ee,#3c614a, 84-149 #e5eee5,#0d1410, |20: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-79 d,#0d1410, 80-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, |26: 0-0 d,#608269, 1-74 d,#0d1410, 75-75 d,#608269, 76-78 d,#0d1410, 79-81 #59675c,#0d1410, 82-149 #e5eee5,#0d1410, diff --git a/test/snapshots/pagercolor.golden b/test/snapshots/pagercolor.golden index beaaf7f5..f665b6bf 100644 --- a/test/snapshots/pagercolor.golden +++ b/test/snapshots/pagercolor.golden @@ -121,8 +121,8 @@ |33: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-47 #d3b0d9,#1d2824, 48-99 #b2c3b8,#1d2824, |34: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #e5eee5,#0d1410, |35: 0-0 d,#608269, 1-1 d,#0d1410, 2-99 #59675c,#0d1410, -|36: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#1a1d18,b 3-99 #f8c082,#1a1d18, -|37: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#171f18,b 3-99 #b8d88a,#171f18, +|36: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #f1a39b,#211812,b 3-99 #f8c082,#211812, +|37: 0-0 d,#608269, 1-1 d,#0d1410, 2-2 #b6ce94,#101c0b,b 3-99 #b8d88a,#101c0b, |41: 0-0 d,#608269, 1-99 d,#0d1410, |42: 0-0 d,#608269, 1-99 d,#0d1410, |45: 0-1 d,#496656, 2-33 #b2c3b8,#1d2824, 34-40 #d3b0d9,#1d2824, 41-99 #b2c3b8,#1d2824, diff --git a/test/snapshots/psearch.golden b/test/snapshots/psearch.golden index 9f7eab39..fca566b4 100644 --- a/test/snapshots/psearch.golden +++ b/test/snapshots/psearch.golden @@ -66,11 +66,11 @@ |20: 0-0 d,#608269, 1-139 d,#0d1410, |21: 0-1 d,#496656, 2-30 #b2c3b8,#1d2824, 31-38 #d3b0d9,#1d2824, 39-139 #b2c3b8,#1d2824, |22: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410, -|23: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #f7e4a5,#5e4923, 13-13 #f7e4a5,#0d1410, 14-139 #e5eee5,#0d1410, +|23: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #e5eee5,#5e4923, 13-139 #e5eee5,#0d1410, |24: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410, -|25: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #f7e4a5,#5e4923, 13-13 #f7e4a5,#0d1410, 14-139 #e5eee5,#0d1410, +|25: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #e5eee5,#5e4923, 13-139 #e5eee5,#0d1410, |26: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410, -|27: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #f7e4a5,#5e4923, 13-13 #f7e4a5,#0d1410, 14-139 #e5eee5,#0d1410, +|27: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-8 #e5eee5,#0d1410, 9-12 #e5eee5,#5e4923, 13-139 #e5eee5,#0d1410, |28: 0-0 d,#608269, 1-4 d,#0d1410, 5-139 #59675c,#0d1410, |29: 0-0 d,#608269, 1-139 d,#0d1410, |30: 0-1 d,#1d2824, 2-139 #b2c3b8,#1d2824, diff --git a/test/snapshots/selregex.golden b/test/snapshots/selregex.golden index fa7ec980..621018b7 100644 --- a/test/snapshots/selregex.golden +++ b/test/snapshots/selregex.golden @@ -32,8 +32,8 @@ |1: 0-1 d,#887455, 2-159 #becfc4,#314738, |2: 0-1 #000000,#add38a, 2-2 #bada9d,#2c2c0f,b 3-3 #bada9d,#2c2c0f, 4-10 #becfc4,#2c2c0f, 11-17 #79836f,#2c2c0f, 18-115 #becfc4,#2c2c0f, 116-159 #79836f,#2c2c0f, |3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-5 #616f64,#0d1410,b 6-6 #add38a,#0d1410,b 7-10 #f5f7ee,#3c614a, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, -|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, -|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, +|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, +|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-5 #59675c,#0d1410, 6-6 #add38a,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, |6: 0-0 d,#608269, 1-4 d,#0d1410, 5-159 #59675c,#0d1410, |7: 0-0 d,#608269, 1-159 d,#0d1410, |8: 0-0 d,#608269, 1-159 d,#0d1410, @@ -61,8 +61,8 @@ == style three-selected grid=160x25 |2: 0-1 d,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #dfbce5,#2c2c0f, 54-159 #becfc4,#2c2c0f, |3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-12 #f5f7ee,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, -|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, -|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, +|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, +|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, == snap narrowed grid=160x25 cursor=21,2 |2: ^ Edit x/const/ › s t = Exec Edit x/t/ 3 selections in 3 lines ⏎ select · M-⏎ as a list · C-r history · esc |3: 1┃const one = 1; @@ -81,8 +81,8 @@ == style esc-restores grid=160x25 |2: 0-1 d,#add38a, 2-47 #becfc4,#2c2c0f, 48-53 #dfbce5,#2c2c0f, 54-159 #becfc4,#2c2c0f, |3: 0-0 d,#608269, 1-1 d,#0d1410, 2-4 d,#0d1410,b 5-6 #616f64,#0d1410,b 7-11 #f5f7ee,#3c614a, 12-12 #f5f7ee,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, -|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, -|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #f5f7ee,#243a2d, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, +|4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-18 #e5eee5,#0d1410, 19-19 #f8c082,#0d1410, 20-159 #e5eee5,#0d1410, +|5: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-10 #e5eee5,#24382c, 11-11 #3c614a,#f5f7ee, 12-12 #3c614a,#0d1410, 13-20 #e5eee5,#0d1410, 21-21 #f8c082,#0d1410, 22-159 #e5eee5,#0d1410, == snap commented grid=160x25 cursor=14,3 |2: *Edit x/const/ › /tmp/pardes-snap/selregex/cwd/m.zig Save Term Collapse Follow TreeContext Def Refs Del |3: 1 // const one = 1; diff --git a/test/snapshots/stepgrain.golden b/test/snapshots/stepgrain.golden index 5f73bd1f..e24b19a8 100644 --- a/test/snapshots/stepgrain.golden +++ b/test/snapshots/stepgrain.golden @@ -47,10 +47,10 @@ |11: 0-1 #000000,#add38a, 2-149 #becfc4,#314738, |12: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410, |13: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410, -|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#0d1410, 15-20 #e5eee5,#0d1410, 21-26 #f7e4a5,#5e4923, 27-27 #f7e4a5,#0d1410, 28-149 #e5eee5,#0d1410, -|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#243a2d, 15-37 #e5eee5,#243a2d, 38-43 #f7e4a5,#5e4923, 44-44 #f7e4a5,#243a2d, 45-149 #e5eee5,#243a2d, +|14: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#0d1410, 15-20 #e5eee5,#0d1410, 21-26 #e5eee5,#5e4923, 27-149 #e5eee5,#0d1410, +|15: 0-0 d,#608269, 1-1 d,#0d1410, 2-14 #59675c,#24382c, 15-37 #e5eee5,#24382c, 38-43 #e5eee5,#5e4923, 44-149 #e5eee5,#24382c, |16: 0-0 d,#608269, 1-1 d,#0d1410, 2-149 #e5eee5,#0d1410, -|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-18 #59675c,#0d1410, 19-24 #f7e4a5,#5e4923, 25-25 #f7e4a5,#0d1410, 26-149 #e5eee5,#0d1410, +|17: 0-0 d,#608269, 1-1 d,#0d1410, 2-18 #59675c,#0d1410, 19-24 #e5eee5,#5e4923, 25-149 #e5eee5,#0d1410, |18: 0-0 d,#608269, 1-149 d,#0d1410, |19: 0-0 d,#608269, 1-149 d,#0d1410, |20: 0-0 d,#608269, 1-149 d,#0d1410, @@ -85,7 +85,7 @@ |3: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410, |4: 0-0 d,#608269, 1-4 d,#0d1410, 5-6 #59675c,#0d1410, 7-149 #e5eee5,#0d1410, |7: 0-0 d,#608269, 1-149 d,#0d1410, -|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #e5eee5,#243a2d, 6-10 #f7e4a5,#5e4923,b 11-149 #e5eee5,#243a2d, +|13: 0-0 d,#608269, 1-1 d,#0d1410, 2-5 #e5eee5,#24382c, 6-10 #e5eee5,#5e4923,b 11-149 #e5eee5,#24382c, |14: 0-0 d,#608269, 1-149 d,#0d1410, |15: 0-0 d,#608269, 1-149 d,#0d1410, |16: 0-0 d,#608269, 1-149 d,#0d1410, diff --git a/test/snapshots/themesel.golden b/test/snapshots/themesel.golden index b975c35b..e13e0618 100644 --- a/test/snapshots/themesel.golden +++ b/test/snapshots/themesel.golden @@ -574,7 +574,7 @@ |23: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, |24: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, |25: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, -|26: 0-0 d,#99994c, 1-1 d,#ffffea, 2-3 d,#ffffea,b 4-6 #999980,#ffffea,b 7-99 #000000,#ffffea, +|26: 0-0 d,#99994c, 1-1 d,#ffffea, 2-3 d,#ffffea,b 4-6 #74746a,#ffffea,b 7-99 #000000,#ffffea, |27: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, |28: 0-0 d,#99994c, 1-3 d,#ffffea, 4-99 #999980,#ffffea, |29: 0-0 d,#99994c, 1-3 d,#ffffea, 4-6 #999980,#ffffea, 7-99 #000000,#ffffea, @@ -715,7 +715,7 @@ |23: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36, |24: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36, |25: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36, -|26: 0-0 d,#eee8d5, 1-1 d,#002b36, 2-3 d,#002b36,b 4-6 #586e75,#002b36,b 7-99 #839496,#002b36, +|26: 0-0 d,#eee8d5, 1-1 d,#002b36, 2-3 d,#002b36,b 4-6 #7f9193,#002b36,b 7-99 #839496,#002b36, |27: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36, |28: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-99 #586e75,#002b36, |29: 0-0 d,#eee8d5, 1-3 d,#002b36, 4-6 #586e75,#002b36, 7-99 #839496,#002b36, -- cgit v1.3 From 0788ce68c4c43148d3d5fa173b4fe46aa10371c9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 03:40:00 -0300 Subject: themes, colors, gen_themes: every theme file in the v2 names, values unchanged (the themes programme's L3; DESIGN.md B2, B3, B8, E1, G4, G6), the fields the new names derive deleted, the comptime fold of the old names gone, each faithful port's file saying each own colour pardes moves to meet a floor, and E1's five fixes: THE FILES: core/themes/*.zig renamed by a script (bg page, fg text, tag_bg tag, tag_fg tag_text, box accent, sel_bg selection, kw keyword, str string, num number, palette ansi, sel_fg selection_text, tag_active_* tag_focus*, tag_name_fg tag_name, tagline_* workspace*, lineno* line_number*, search_bg hit, diagnostic_* the severities, border rule, scroll_* rail*, empty_col empty_column, box_border grip_ring, box_dirty dirty, column_box column_grip, tag_sel_bg tag_selection; seoul256's level rows and their citations too), box_dim, column_box_dim, tag_active_name_fg, search_fg and acme's tag_reading_bg deleted with the lines citing them (B8: always derived; G1': acme's #f3f0cc reading tint goes with the ground), acme's sweep_bg and sweep_fg one `sweeps`; tools/gen_themes.zig writes the generated ones in the same names (its emitted box_dim, the selection again, gone); `colors.fold` folds the files into `Theme` itself (a field no Theme has is a compile error; `as` turns acme's sweep literals into Theme.Sweep, which a literal's own struct type does not coerce to); `legacy_themes`, the ring folded in the old names at comptime, deleted: THE OLD NAMES' VIEW (what draw.zig and the old ChromeTheme and Roles still read until L2a) is a ring theme's chrome's, `ChromeTheme.view`, filled from its Chrome as L1 filled a new-names ThemeFile's (`viewOf`: the old required fields a theme leaves unset, and the derived ones: box_dim a resting grip's fill, the tag's own ground where a theme rings its grips itself (acme's clean button, so its grid grip keeps its look) else the resting ring; tag_active_name_fg `name[1]`, column_box_dim `grip.column_rest`); `Pardes.theme()` reads it (a ThemeFile's, the file itself, as before); ChromeTheme.box, the focused grip the grid fills, is the chrome's `grip.focus` (the accent held 3:1, R6: ayu_light's accent, 2:1 on its tag, was its resting ring too, and the grid drew its focused and resting grips alike); the library's `Theme` and `themes` are the v2 ones (lib_syntax: page, ink and synInk read page, text, keyword, string, number, comment; Grounds.of takes a Theme), runtime/macos.zig's bare page reads `themes[0].page`; E1's FIXES (the ring test's L3 list): acme's sixteen each 4.5:1 on its page, the native floor (6, 8 and 13 held darker in their hue; 10, 11 and 14, held there, landed on their normal colour and go 0.06 OKLab darker than it, R14's bright on a light page: #038384 #757575 #016e08 #785300 #b942b9 #017070); solarized_dark's, solarized_light's and seoul256's light levels' search hit their own hue as a ground the text reads on (#1d180e, #ffeb99, #a6e6fe; each file says from what and why); R8 takes a theme's own hit at R0's visible alternative, 1.1:1 off the page with 0.08 OKLab, only where its text leaves no room for 1.5:1 (no ground that far off keeps the text its floor: those four and forge_soft and ayu_light, whose own hits are taken now where an amber stood; no other theme's hit moves), else E1's `hit` fixes could not be met; G4: core/themes' ports say, under "Moved by pardes as it loads", each own colour Chrome.of moves (focused tag and grip, the resting and unsaved grip, the selection and its ink, the hit, the four severities on the page; 267 lines over 54 files, written from the test's own output by .scratch/themes/L3457/tools/g4_headers.py); RUN (TEST FIRST): colors.zig "every faithful port's file says each of its own colours pardes moves to meet a floor (DESIGN.md G4)" (each port's own value Chrome.of moves, as `role #own -> #got`, found in its file): fails on the renamed files with 273 unsaid, passes now; "every theme in the ring meets every floor ..." with L3's five taken off its list: acme fails ansi and ansi_pro, solarized_dark, solarized_light, seoul256_light_254 and _255 fail hit, all five pass now: 266 of 285 themes pass (261 at L1), 19 on the list (L4 6, L5 1, L7 8, soft 4); draw.zig's "an unfocused reading pane's box in the grid is its ring round the reading tint where the box's fill is the tag's own ground (acme's)" failed on the first view (acme's resting fill its ring), passes with the tag's ground; "a grip's four states ... are each its own" failed in ayu_light on the raw accent, passes on grip.focus; the old tests that pinned the deleted fields' file values keep what is still a file's (a name's tint at its tag ink's lightness, the accent off the column grip; the helix document test strips the derived fields too; the names test reads Chrome's names, an ink held to white or black its own name, ao's and modus_vivendi's); the consumer's lib.zig pins orchard's page, ink and syntax unchanged (dark's page its `.tag`); the ring's values unchanged by the rename (the ring test's count and every original's colour asserted unmoved); core-test 1133/1306 (173 skipped: L2b's 1132/1305 + the G4 test); OUTSIDE my files: core/Core.zig `theme()` (the view), core/lib_syntax.zig (v2 Theme), runtime/macos.zig `pardes_theme_bg` (one line), test/consumer/lib.zig (`.tag`); the process goldens move with the view (the grid's resting grip, the focused name's tint, the column grip at rest, acme's reading grip) and are re-recorded and read at the programme's end gate; no dump or digest change (the view is the chrome's, a `local` field) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/Core.zig | 7 +- core/colors.zig | 270 ++++++++++++++++++--------- core/lib_syntax.zig | 10 +- core/themes/acme.zig | 67 +++---- core/themes/alucard.zig | 46 ++--- core/themes/atelier.zig | 54 +++--- core/themes/ayu_dark.zig | 52 +++--- core/themes/ayu_light.zig | 57 +++--- core/themes/ayu_mirage.zig | 53 +++--- core/themes/catppuccin_frappe.zig | 57 +++--- core/themes/catppuccin_latte.zig | 63 ++++--- core/themes/catppuccin_macchiato.zig | 57 +++--- core/themes/catppuccin_mocha.zig | 57 +++--- core/themes/clay.zig | 54 +++--- core/themes/dark.zig | 33 ++-- core/themes/dark_plus.zig | 62 +++---- core/themes/daybreak.zig | 54 +++--- core/themes/doom_one.zig | 54 +++--- core/themes/doom_one_light.zig | 58 +++--- core/themes/dracula.zig | 51 +++-- core/themes/dracula_soft.zig | 51 +++-- core/themes/duckbones.zig | 58 +++--- core/themes/dusk.zig | 54 +++--- core/themes/forestbones_dark.zig | 57 +++--- core/themes/forestbones_light.zig | 63 ++++--- core/themes/forge.zig | 54 +++--- core/themes/forge_black.zig | 54 +++--- core/themes/forge_soft.zig | 54 +++--- core/themes/harvest.zig | 54 +++--- core/themes/helix.zig | 33 ++-- core/themes/ink.zig | 54 +++--- core/themes/kanagawabones.zig | 56 +++--- core/themes/lagoon.zig | 54 +++--- core/themes/lapis.zig | 60 +++--- core/themes/monokai.zig | 59 +++--- core/themes/monokai_pro.zig | 58 +++--- core/themes/monokai_pro_classic.zig | 58 +++--- core/themes/monokai_pro_light.zig | 64 ++++--- core/themes/monokai_pro_light_sun.zig | 64 ++++--- core/themes/monokai_pro_machine.zig | 58 +++--- core/themes/monokai_pro_octagon.zig | 58 +++--- core/themes/monokai_pro_ristretto.zig | 58 +++--- core/themes/monokai_pro_spectrum.zig | 58 +++--- core/themes/neobones_dark.zig | 56 +++--- core/themes/neobones_light.zig | 57 +++--- core/themes/nord.zig | 58 +++--- core/themes/nordbones.zig | 60 +++--- core/themes/orchard.zig | 54 +++--- core/themes/orchard_black.zig | 54 +++--- core/themes/paper.zig | 54 +++--- core/themes/rose_pine.zig | 56 +++--- core/themes/rose_pine_dawn.zig | 65 ++++--- core/themes/rose_pine_moon.zig | 56 +++--- core/themes/rosebones_dark.zig | 56 +++--- core/themes/rosebones_light.zig | 62 ++++--- core/themes/seoul256.zig | 341 +++++++++++++++++++--------------- core/themes/seoulbones_dark.zig | 62 ++++--- core/themes/seoulbones_light.zig | 63 ++++--- core/themes/solarium.zig | 54 +++--- core/themes/solarized_dark.zig | 57 +++--- core/themes/solarized_light.zig | 56 +++--- core/themes/spectrum.zig | 54 +++--- core/themes/tokyobones_dark.zig | 56 +++--- core/themes/tokyobones_light.zig | 57 +++--- core/themes/tokyonight_day.zig | 63 ++++--- core/themes/tokyonight_moon.zig | 58 +++--- core/themes/tokyonight_night.zig | 58 +++--- core/themes/tokyonight_storm.zig | 60 +++--- core/themes/vimbones.zig | 57 +++--- core/themes/zenbones_dark.zig | 57 +++--- core/themes/zenbones_light.zig | 57 +++--- core/themes/zenburned.zig | 63 ++++--- core/themes/zenwritten_dark.zig | 57 +++--- core/themes/zenwritten_light.zig | 57 +++--- runtime/macos.zig | 4 +- test/consumer/lib.zig | 2 +- tools/gen_themes.zig | 146 +++++++-------- 77 files changed, 2425 insertions(+), 2309 deletions(-) (limited to 'core/colors.zig') diff --git a/core/Core.zig b/core/Core.zig index e458dab4..9cd58c50 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -2155,10 +2155,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. diff --git a/core/colors.zig b/core/colors.zig index 44a2d415..ed82b731 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -700,12 +700,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; @@ -1054,12 +1059,12 @@ 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, }; } @@ -1073,8 +1078,8 @@ pub const Grounds = struct { pub const Ground = Chrome.Diff; - pub fn of(th: *const LegacyTheme) Grounds { - const c = Chrome.of(&.fromLegacy(th.*)); + pub fn of(th: *const Theme) Grounds { + const c = Chrome.of(th); return .{ .add = c.add, .del = c.del }; } @@ -1178,19 +1183,21 @@ const curated = struct { 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 @@ -1202,18 +1209,27 @@ 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; @@ -1299,14 +1315,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's chrome, from the theme and its old names' view. - pub fn of(theme: *const Theme, th: *const LegacyTheme) ChromeTheme { + /// 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, 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 @@ -1332,18 +1359,37 @@ pub const ChromeTheme = struct { // 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), - .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), .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. +fn viewOf(theme: *const Theme, r: *const Chrome) LegacyTheme { + const fill = if (theme.grip_ring != null) r.tag[0].ground else r.grip.ring; + 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 = r.name[1], + .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). @@ -1691,26 +1737,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.theme_chrome = chrome; const old = p.custom_theme; p.custom_theme = view; if (old) |theme_value| p.gpa.free(theme_value.name); @@ -1749,8 +1796,7 @@ 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`). 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.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 @@ -1830,14 +1876,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.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.theme_chrome = .ofTheme(&themes[index]); if (p.custom_theme) |theme_value| { p.custom_theme = null; p.gpa.free(theme_value.name); @@ -1852,7 +1898,9 @@ 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); @@ -1871,7 +1919,9 @@ 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 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 @@ -1892,11 +1942,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. @@ -1939,9 +1986,9 @@ test "seoul256's twelve backgrounds ring in their order, after Catppuccin and be "seoul256_light_253", "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" { @@ -2028,7 +2075,7 @@ test "ThemeFile parses ZON atomically and Theme returns to the compiled ring" { 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); + try std.testing.expectEqualStrings(themes[0].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, @@ -2040,7 +2087,8 @@ 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| { + for (themes[0..names.len], names) |own, name| { + const th = ChromeTheme.ofTheme(&own).view; try std.testing.expectEqualStrings(name, th.name); 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; @@ -2074,12 +2122,11 @@ test "native themes keep text and UI roles readable on their own surfaces" { } 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 (themes[0..native_theme_count]) |*th| { + // 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]); @@ -2099,7 +2146,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 (themes[0..native_theme_count]) |ring_theme| { + const th = ChromeTheme.ofTheme(&ring_theme).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"); @@ -2112,12 +2160,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" { @@ -2127,7 +2175,7 @@ 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[0]).view; custom.name = try gpa.dupe(u8, "quiet-gutter"); custom.lineno = .{ 70, 70, 70 }; custom.lineno_active = .{ 95, 95, 95 }; @@ -2165,14 +2213,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 ..]; @@ -2202,12 +2252,10 @@ 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 (themes[0..native_theme_count]) |*th| { + // 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| { @@ -2217,7 +2265,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[0]).view; custom.column_box = .{ 90, 130, 170 }; custom.column_box_dim = null; var chrome = ChromeTheme.fromTheme(&custom); @@ -2229,7 +2277,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[0]).view; theme.tag_name_fg = null; theme.tag_active_name_fg = null; var chrome = ChromeTheme.fromTheme(&theme); @@ -2251,14 +2299,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) @@ -2286,7 +2338,9 @@ 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; @@ -2550,12 +2604,6 @@ fn ringFailures(th: *const Theme, c: *const Chrome) std.EnumSet(RingCheck) { /// 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`" }, @@ -2625,6 +2673,48 @@ test "every theme in the ring meets every floor pardes owns (DESIGN.md B4), nati try std.testing.expectEqual(0, wrong); } +/// 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) }); + } + }; + } + try std.testing.expectEqual(0, unsaid); +} + /// 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 diff --git a/core/lib_syntax.zig b/core/lib_syntax.zig index fa6812ee..2c771b72 100644 --- a/core/lib_syntax.zig +++ b/core/lib_syntax.zig @@ -102,21 +102,21 @@ pub const NodeWalk = syntax.NodeWalk; pub const Span = syntax.Span; pub const walkNodes = syntax.walkNodes; -pub const Theme = colors.LegacyTheme; +pub const Theme = colors.Theme; /// 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 themes: []const Theme = &colors.themes; /// 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/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..51768f56 100644 --- a/core/themes/dark.zig +++ b/core/themes/dark.zig @@ -11,24 +11,23 @@ //! exactly what it was picked for. 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 }, + .page = null, + .text = null, + .selection = .{ 0x51, 0x3c, 0x17 }, + .selection_text = .{ 0xd8, 0xc8, 0xa8 }, + .tag = .{ 0x2c, 0x2a, 0x3e }, + .tag_text = .{ 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 }, + .tag_focus = .{ 0x48, 0x45, 0x66 }, + .tag_focus_text = .{ 0xc8, 0xc8, 0xc8 }, + .accent = .{ 0x66, 0x3f, 0xe0 }, + .keyword = .{ 0xda, 0x5e, 0xea }, + .string = .{ 0x85, 0xc3, 0x6f }, + .number = .{ 0xe1, 0xcb, 0x5f }, .comment = .{ 0xf0, 0xf0, 0xf0 }, - .lineno = .{ 0x5a, 0x5a, 0x5a }, - .scroll_track = .{ 0x2a, 0x2a, 0x2a }, - .scroll_thumb = .{ 0x52, 0x52, 0x52 }, - .palette = null, + .line_number = .{ 0x5a, 0x5a, 0x5a }, + .rail = .{ 0x2a, 0x2a, 0x2a }, + .rail_thumb = .{ 0x52, 0x52, 0x52 }, + .ansi = null, }; 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/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/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..0c4c17ab 100644 --- a/core/themes/seoul256.zig +++ b/core/themes/seoul256.zig @@ -35,164 +35,220 @@ //! 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) +//! - dark_238: tag ground #6b6b6b -> #606060: 1.38:1 off the page, now 1.17:1 (H: a band 1.1:1 off the page; R3: tone on tone) +//! - dark_238: focused tag ground #b97877 -> #7c7c7c: 1.80:1 off the tag, now 1.51:1 (R4, H: a focus step off the tag, and the loudest) +//! - dark_238: focused grip #007173 -> #003a3c: 1.39:1 on the focused tag, now 3.01:1 (R6: 3:1) +//! - dark_238: unsaved grip #719cdf -> #c7ddfe: 2.25:1 on the tag, now 4.55:1 (R6: 3:1 on both tags) +//! - dark_238: selection #007173 -> #13797b: 1.26:1 off the page, now 1.42:1 (R7) +//! - dark_238: selection text #d9d9d9 -> #efefef: 3.67:1 on the selection, now 4.51:1 (R7: 4.5:1) +//! - dark_238: search hit #007299 -> #7a5932: 1.35:1 off the page, now 1.15:1 (R8: 1.5:1, the text reading on it) +//! - dark_238: error #e12672 -> #feb8c8: 1.65:1 on the page, now 4.51:1 (R9: 4.5:1, told from the text and the others) +//! - dark_238: warning #e09b99 -> #eec575: 3.26:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others) +//! - dark_239: focused tag ground #ac8f86 -> #949494: 1.54:1 off the tag, now 1.52:1 (R4, H: a focus step off the tag, and the loudest) +//! - dark_239: focused grip #007173 -> #005153: 1.92:1 on the focused tag, now 3.01:1 (R6: 3:1) +//! - dark_239: unsaved grip #719cdf -> #032a63: 1.65:1 on the tag, now 3.01:1 (R6: 3:1 on both tags) +//! - dark_239: selection #007173 -> #278587: 1.06:1 off the page, now 1.41:1 (R7) +//! - dark_239: selection text #d9d9d9 -> #0a0a0a: 3.11:1 on the selection, now 4.52:1 (R7: 4.5:1) +//! - dark_239: search hit #007299 -> #83613a: 1.14:1 off the page, now 1.10:1 (R8: 1.5:1, the text reading on it) +//! - dark_239: error #e12672 -> #ffd2d0: 1.39:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others) +//! - dark_239: warning #e09b99 -> #ffd78b: 2.75:1 on the page, now 4.53:1 (R9: 4.5:1, told from the text and the others) +//! - light_252, light_253, 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_252: unsaved grip #719cdf -> #0b326c: 1.67:1 on the tag, now 7.44:1 (R6: 3:1 on both tags) +//! - light_252: selection #bcdede -> #a8c9c9: 1.02:1 off the page, now 1.25:1 (R7) +//! - light_252: selection text #616161 -> #505050: 3.50:1 on the selection, now 4.56:1 (R7: 4.5:1) +//! - light_252: search hit #a6e6fe -> #febfbc: 1.03:1 off the page, now 1.11:1 (R8: 1.5:1, the text reading on it) +//! - light_252: error #e12672 -> #bc045a: 3.15:1 on the page, now 4.50:1 (R9: 4.5:1, told from the text and the others) +//! - light_252: warning #be7572 -> #904b4a: 2.49:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others) +//! - light_253: unsaved grip #719cdf -> #0b326c: 1.81:1 on the tag, now 8.09:1 (R6: 3:1 on both tags) +//! - light_253: selection #bcdede -> #aed0d0: 1.10:1 off the page, now 1.26:1 (R7) +//! - light_253: selection text #616161 -> #555555: 3.76:1 on the selection, now 4.52:1 (R7: 4.5:1) +//! - light_253: search hit #a6e6fe -> #fecac7: 1.04:1 off the page, now 1.11:1 (R8: 1.5:1, the text reading on it) +//! - light_253: error #e12672 -> #c4095f: 3.40:1 on the page, now 4.52:1 (R9: 4.5:1, told from the text and the others) +//! - light_253: warning #be7572 -> #95504f: 2.69:1 on the page, now 4.54:1 (R9: 4.5:1, told from the text and the others) +//! - 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 + .{ .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 } }, + // page: S:206 Normal guibg = s:hi arg s:dark_bg = 238 -> s:rgb_map[238] S:133 + // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 240 -> s:rgb_map[240] S:133 + // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129 #dfdebd, adjusted + // 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 = 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 + .{ .level = 238, .page = .{ 0x56, 0x56, 0x56 }, .tag = .{ 0x6b, 0x6b, 0x6b }, .tag_text = .{ 0xee, 0xed, 0xdb }, .tag_focus = .{ 0xb9, 0x78, 0x77 }, .tag_focus_text = .{ 0x1f, 0x1f, 0x1a }, .accent = .{ 0x00, 0x71, 0x73 }, .rule = .{ 0x76, 0x76, 0x76 } }, + // page: S:206 Normal guibg = s:hi arg s:dark_bg = 239 -> s:rgb_map[239] S:133 + // tag: S:351 StatusLineNC guifg = s:hi arg s:dark_bg + 2 = 241 -> s:rgb_map[241] S:133 + // tag_text: S:351 StatusLineNC guibg = s:hi arg 187 = 187 -> s:rgb_map[187] S:129 #dfdebd, adjusted + // 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 = 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 = 239, .page = .{ 0x61, 0x61, 0x61 }, .tag = .{ 0x75, 0x75, 0x75 }, .tag_text = .{ 0xfd, 0xfd, 0xfb }, .tag_focus = .{ 0xac, 0x8f, 0x86 }, .tag_focus_text = .{ 0x2d, 0x2c, 0x26 }, .accent = .{ 0x00, 0x71, 0x73 }, .rule = .{ 0x84, 0x84, 0x84 } }, }; /// 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 + // page: S:206 Normal guibg = s:hi arg s:light_bg = 252 -> s:rgb_map[252] S:134 + // tag: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 250 -> s:rgb_map[250] S:134 + // tag_text: S:351 StatusLineNC guibg = s:hi arg 238 = 238 -> s:rgb_map[238] S:133 #565656, adjusted + // rule: 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 + .{ .level = 252, .page = .{ 0xd9, 0xd9, 0xd9 }, .tag = .{ 0xc8, 0xc8, 0xc8 }, .tag_text = .{ 0x54, 0x54, 0x54 }, .rule = .{ 0xac, 0xac, 0xac } }, + // page: S:206 Normal guibg = s:hi arg s:light_bg = 253 -> s:rgb_map[253] S:134 + // tag: S:351 StatusLineNC guifg = s:hi arg s:light_bg - 2 = 251 -> s:rgb_map[251] 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 = 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 + .{ .level = 253, .page = .{ 0xe1, 0xe1, 0xe1 }, .tag = .{ 0xd1, 0xd0, 0xd1 }, .tag_text = .{ 0x56, 0x56, 0x56 }, .rule = .{ 0xb3, 0xb3, 0xb3 } }, + // 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 +260,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 +339,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/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 diff --git a/runtime/macos.zig b/runtime/macos.zig index 8c6fa433..2778507f 100644 --- a/runtime/macos.zig +++ b/runtime/macos.zig @@ -479,8 +479,8 @@ export fn pardes_animating() bool { export fn pardes_theme_bg() u32 { pardes.turn.wake(); defer pardes.turn.rest(); - const th = if (state) |*st| st.core.theme() else &pardes.colors.legacy_themes[0]; - const bg = th.bg orelse return color_default; + const page = if (state) |*st| st.core.theme().bg else pardes.themes[0].page; + const bg = page orelse return color_default; return @as(u32, bg[0]) << 16 | @as(u32, bg[1]) << 8 | bg[2]; } diff --git a/test/consumer/lib.zig b/test/consumer/lib.zig index ea0d56fd..68134cc3 100644 --- a/test/consumer/lib.zig +++ b/test/consumer/lib.zig @@ -97,7 +97,7 @@ test "a C and a Zig source are coloured, outlined and walked as pardes has them, try std.testing.expectEqual([3]u8{ 0xb9, 0xf4, 0x80 }, pardes.synInk(orchard, .comment).?); try std.testing.expectEqual(null, pardes.synInk(orchard, .none)); // `dark` has no page of its own, and an imported palette is in the ring - try std.testing.expectEqual(pardes.theme("dark").?.tag_bg, pardes.page(pardes.theme("dark").?)); + try std.testing.expectEqual(pardes.theme("dark").?.tag, pardes.page(pardes.theme("dark").?)); try std.testing.expect(pardes.theme("gruvbox") != null); try std.testing.expectEqual(null, pardes.theme("no such theme")); } diff --git a/tools/gen_themes.zig b/tools/gen_themes.zig index b9a9adb0..fd152aa6 100644 --- a/tools/gen_themes.zig +++ b/tools/gen_themes.zig @@ -57,26 +57,25 @@ const Rgb = [3]u8; /// code) — core/colors.zig's `fold` is what turns it into a real Theme. const Theme = struct { name: []const u8, - bg: ?Rgb, - fg: ?Rgb, - sel_bg: Rgb, - sel_fg: Rgb, - tag_bg: Rgb, - tag_fg: Rgb, - box: Rgb, - box_dim: Rgb, - kw: Rgb, - str: Rgb, - num: Rgb, + page: ?Rgb, + text: ?Rgb, + selection: Rgb, + selection_text: Rgb, + tag: Rgb, + tag_text: Rgb, + accent: Rgb, + keyword: Rgb, + string: Rgb, + number: Rgb, comment: Rgb, - lineno: Rgb, - scroll_track: Rgb, - scroll_thumb: Rgb, - /// A message's error ink (colors.Roles.err): diagnostic.error's, else - /// error's, else the theme's red (UX E3: neonotte's diagnostic.error is - /// an underline only). - diagnostic_error: ?Rgb = null, - palette: ?[16]Rgb, + line_number: Rgb, + rail: Rgb, + rail_thumb: Rgb, + /// A message's error ink (colors.Chrome's severities): diagnostic.error's, + /// else error's, else the theme's red (UX E3: neonotte's diagnostic.error + /// is an underline only). + @"error": ?Rgb = null, + ansi: ?[16]Rgb, }; pub fn main(init: std.process.Init) !void { @@ -142,22 +141,22 @@ fn emit(w: *std.Io.Writer, t: Theme) !void { const info = @typeInfo(Theme).@"struct"; inline for (info.field_names, info.field_types) |name, T| { if (comptime std.mem.eql(u8, name, "name")) continue; - if (comptime std.mem.eql(u8, name, "palette")) continue; - try w.print(" .{s} = ", .{name}); + if (comptime std.mem.eql(u8, name, "ansi")) continue; + try w.print(" .{f} = ", .{std.zig.fmtId(name)}); if (comptime @typeInfo(T) == .optional) { if (@field(t, name)) |c| try rgb(w, c) else try w.writeAll("null"); } else try rgb(w, @field(t, name)); try w.writeAll(",\n"); } - if (t.palette) |p| { - try w.writeAll(" .palette = .{\n"); + if (t.ansi) |p| { + try w.writeAll(" .ansi = .{\n"); for (p) |c| { try w.writeAll(" "); try rgb(w, c); try w.writeAll(",\n"); } try w.writeAll(" },\n"); - } else try w.writeAll(" .palette = null,\n"); + } else try w.writeAll(" .ansi = null,\n"); try w.writeAll("};\n"); } @@ -270,37 +269,36 @@ fn resolve(arena: std.mem.Allocator, tomls: *const std.StringHashMapUnmanaged(To return .{ .path = t.path, .keys = keys, .palette = palette }; } -/// A resolved helix theme mapped onto pardes's fourteen fields. +/// A resolved helix theme mapped onto pardes's fields (core/theme_schema.zig). /// /// EVERY FALLBACK HERE IS HELIX'S OWN RULE, which is why none of them is fatal: /// an unstyled scope wears `ui.text`, an unpainted cell wears `ui.background`, /// and a theme that styles neither is saying "wear whatever the terminal is /// already wearing" (the base16/term16/transparent themes exist precisely to do -/// that). pardes spells that last step as a null bg/fg, so those two pass -/// straight through — but the other twelve fields are RGB and cannot be null, so +/// that). pardes spells that last step as a null page/text, so those two pass +/// straight through — but the other fields are RGB and cannot be null, so /// they need a concrete stand-in for "the terminal's", and that is the default /// palette's ink and page below. Field by field: /// -/// bg ui.background.bg, else null = the host terminal's own cell -/// fg ui.text.fg, else null = ditto -/// box ui.cursor.primary.bg, else ui.cursor.bg, else keyword.fg, +/// page ui.background.bg, else null = the host terminal's own cell +/// text ui.text.fg, else null = ditto +/// accent ui.cursor.primary.bg, else ui.cursor.bg, else keyword.fg, /// else ink — skipping any of them that IS the page (see /// firstNotPage) -/// box_dim, -/// scroll_thumb, -/// sel_bg ui.selection.bg, else ui.selection.primary.bg, else +/// rail_thumb, +/// selection ui.selection.bg, else ui.selection.primary.bg, else /// ui.selection.fg, same page-skipping, else page. No selection /// colour anywhere means the author drew no selection either, -/// and a dim box the colour of the page is the honest rendering -/// of that — no theme in the vendored set actually gets there -/// sel_fg ui.selection.fg, unless that IS sel_bg, else whichever of -/// ink and page the highlight is farther from -/// tag_bg, -/// scroll_track ui.statusline.bg, else page -/// tag_fg ui.statusline.fg, else ink -/// kw/str/comment their scope's fg, else ink (helix: unstyled = ui.text) -/// num constant.numeric.fg, else constant.fg, else ink -/// lineno ui.linenr.fg, else ink +/// and a selection the colour of the page is the honest +/// rendering of that — no theme in the vendored set gets there +/// selection_text ui.selection.fg, unless that IS the selection, else +/// whichever of ink and page the highlight is farther from +/// tag, +/// rail ui.statusline.bg, else page +/// tag_text ui.statusline.fg, else ink +/// keyword/string/comment their scope's fg, else ink (helix: unstyled = ui.text) +/// number constant.numeric.fg, else constant.fg, else ink +/// line_number ui.linenr.fg, else ink fn helixTheme(arena: std.mem.Allocator, stem: []const u8, h: Helix) !Theme { const fg = h.get("ui.text", .fg); const bg = h.get("ui.background", .bg); @@ -345,28 +343,27 @@ fn helixTheme(arena: std.mem.Allocator, stem: []const u8, h: Helix) !Theme { .name = try slug(arena, stem), // `palette` stays null: helix leaves the colors a PROGRAM emits alone, // and so do we. - .bg = bg, - .fg = fg, - .sel_bg = sel, - .sel_fg = if (named_ink) |c| (if (std.mem.eql(u8, &c, &sel)) sel_far else c) else sel_far, - .tag_bg = h.get("ui.statusline", .bg) orelse page, - .tag_fg = h.get("ui.statusline", .fg) orelse ink, - .box = box, - .box_dim = sel, - .kw = h.get("keyword", .fg) orelse ink, - .str = h.get("string", .fg) orelse ink, + .page = bg, + .text = fg, + .selection = sel, + .selection_text = if (named_ink) |c| (if (std.mem.eql(u8, &c, &sel)) sel_far else c) else sel_far, + .tag = h.get("ui.statusline", .bg) orelse page, + .tag_text = h.get("ui.statusline", .fg) orelse ink, + .accent = box, + .keyword = h.get("keyword", .fg) orelse ink, + .string = h.get("string", .fg) orelse ink, // most themes only colour `constant`; the ones that split out numbers // are being more specific, so they win - .num = h.first(&.{ .{ "constant.numeric", .fg }, .{ "constant", .fg } }) orelse ink, + .number = h.first(&.{ .{ "constant.numeric", .fg }, .{ "constant", .fg } }) orelse ink, .comment = h.get("comment", .fg) orelse ink, - .lineno = h.get("ui.linenr", .fg) orelse ink, + .line_number = h.get("ui.linenr", .fg) orelse ink, // the scrollbar is chrome, so it takes the chrome colors: the tag bar's // own background for the track, the selection (one step brighter than // anything else in the theme's greys) for the thumb riding it - .scroll_track = h.get("ui.statusline", .bg) orelse page, - .scroll_thumb = sel, - .diagnostic_error = h.first(&.{ .{ "diagnostic.error", .fg }, .{ "error", .fg } }) orelse h.color("red"), - .palette = null, + .rail = h.get("ui.statusline", .bg) orelse page, + .rail_thumb = sel, + .@"error" = h.first(&.{ .{ "diagnostic.error", .fg }, .{ "error", .fg } }) orelse h.color("red"), + .ansi = null, }; } @@ -555,8 +552,8 @@ fn readZed(arena: std.mem.Allocator, gpa: std.mem.Allocator, path: []const u8, t // name rather than a suffix that appears only on the eight that // happen to clash today .name = try std.fmt.allocPrint(arena, "{s}_zed", .{try slug(arena, (v.get("name") orelse std.process.fatal("{s}: a variant has no `name`", .{path})).string)}), - .bg = z.need("editor.background"), - .fg = z.need("editor.foreground"), + .page = z.need("editor.background"), + .text = z.need("editor.foreground"), // zed's TEXT selection is `players[0].selection`, and it is a 24% // alpha over the page — the colour on screen is the composite, not // the value. pardes paints opaque cells and `hex` drops alpha, so @@ -565,24 +562,23 @@ fn readZed(arena: std.mem.Allocator, gpa: std.mem.Allocator, path: []const u8, t // selected" fill, which is the question actually being asked. The // ink then stays the editor's own text colour, because that fill is // always a step off the background and never off the text. - .sel_bg = z.need("element.selected"), - .sel_fg = z.need("editor.foreground"), - .tag_bg = z.need("status_bar.background"), - .tag_fg = z.need("text.muted"), + .selection = z.need("element.selected"), + .selection_text = z.need("editor.foreground"), + .tag = z.need("status_bar.background"), + .tag_text = z.need("text.muted"), // zed names its accent, so the move box does not have to be guessed // out of the cursor the way it is for a helix theme - .box = z.need("text.accent"), - .box_dim = z.need("border"), - .kw = z.syn(syntax, "keyword"), - .str = z.syn(syntax, "string"), - .num = z.syn(syntax, "number"), + .accent = z.need("text.accent"), + .keyword = z.syn(syntax, "keyword"), + .string = z.syn(syntax, "string"), + .number = z.syn(syntax, "number"), .comment = z.syn(syntax, "comment"), - .lineno = z.need("editor.line_number"), - .scroll_track = z.need("scrollbar.thumb.border"), - .scroll_thumb = z.need("scrollbar.thumb.background"), + .line_number = z.need("editor.line_number"), + .rail = z.need("scrollbar.thumb.border"), + .rail_thumb = z.need("scrollbar.thumb.background"), // its status colour, else the palette's red (colors.zig) - .diagnostic_error = if (z.style.get("error") != null) z.need("error") else null, - .palette = pal, + .@"error" = if (z.style.get("error") != null) z.need("error") else null, + .ansi = pal, }); } } -- cgit v1.3 From 47952d7797b25f41a3e29ec0dc349564c0185fd4 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 04:30:06 -0300 Subject: gen_themes: the importer reads what the helix and zed sources already say (the themes programme's L4; DESIGN.md B7, R3, E1): HELIX: the text the theme draws code in, `variable` where it is a neutral ink (OKLab chroma under 0.04) that reads 4.5:1 on the page, else `ui.text` (github's muted #8b949e gives way to its #c9d1d9; github_dark_dimmed's 3.9:1 to 7.6:1); the tag the inactive status bar where the theme has one, the active one its focused tag where it is tone on tone, the tag's ink the status bar's (an inactive bar's is often faded, neonotte's #555973); the four severities from `diagnostic.*` (often an underline only, no fg) and the plain `error`/`warning`/`info`/`hint` scopes, error else the theme's own palette red (UX E3), never the terminal's guessed one; `added`/`deleted` from `diff.plus`/`diff.minus` where they are a green and a red (each a hue, within 60 degrees: a grey, a yellow deleted or a tritan blue cannot be told apart as R10's rows: ashen, wolf_alabaster's four, zenburn, github_light_tritanopia and modus_operandi_tritanopia failed the ring's diff check on them, and keep pardes's); the caret's line number from `ui.linenr.selected`; a program's sixteen from the theme's own palette where it names red, green, yellow, blue, magenta (or purple) and cyan (or aqua), their light or bright ones, black, white and a grey (else the page, the ink, the comment), else null for R14; ZED: the active tab the focused tag, error/warning/info/hint, created/deleted (the same green-and-red rule), the search match as drawn (its alpha over the editor's page, not dropped), the active line number; R3, THE IMPORT RULE (L1 left it to the importer: a theme carries no import flag): a status bar on the other side of light from its page is no tag: the tag is the page a 1.15:1 step off in its own hue (its light scaled), in the text; E1's import FIXES, a table in the generator (a name no vendored theme has is a build error): everforest_light's and hex_toxic's search hit, their own yellow as a ground their soft text reads on (#ffe699 1.14:1 off the page, the text 4.53:1; #2f3200 1.11:1, 4.27:1; R8 takes it at R0's 1.1:1 with 0.08 OKLab, L3); the generator does the little colour maths it needs (luminance, contrast, OKLab a/b, the step), the dependency-free host tool it was; across the 203 imports: 202 errors, 202 warnings, 196 infos, 198 hints, 178 added/deleted pairs, 195 caret line numbers, 59 focused tags, 13 hits of their own; RUN (TEST FIRST): tools/gen_themes.zig's own tests, a minimal toml or json each, now in core-test (build/tests.zig, on the host): "B7: the text is helix's `variable` ...", "B7: the tag is the inactive status bar, and the active one its focus where it is tone on tone", "R3, the import rule: ...", "B7: the severities from diagnostic.* and the plain scopes ...", "B7: added and deleted from diff.plus and diff.minus ... (a yellow deleted, a grey added: none)", "B7: a program's sixteen from the palette ...", "B7, zed: ... a search match as drawn over the page": on L3's generator none compiles (no field for any of them); the ring test with L4's six taken off its list: everforest_light and hex_toxic fail hit, github_dark_dimmed text, gruvbox_material_light_hard/_medium/_soft severities4; with the mapping the diff rows of the eight above failed until the green-and-red rule: 272 of 285 themes pass (266 at L3), 13 on the list (L5 1, L7 8, soft 4); colors.zig's neonotte84 golden re-pinned where B7 moves it: its match ink and current hit, the hits' amber, #e29e47 (the warning pardes derived) to #e59d3c (its own palette's yellow now its warning); core-test 1140/1313 (173 skipped: L3's 1133/1306 + the importer's 7; the full run's one failure the neonotte84 golden, re-pinned after it, its test alone passing); OUTSIDE my files: build/tests.zig (the importer's tests in core-test, 5 lines); no dump or digest change Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- build/tests.zig | 5 + core/colors.zig | 13 +- tools/gen_themes.zig | 363 +++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 361 insertions(+), 20 deletions(-) (limited to 'core/colors.zig') diff --git a/build/tests.zig b/build/tests.zig index 8cf42acd..c35857f7 100644 --- a/build/tests.zig +++ b/build/tests.zig @@ -76,6 +76,11 @@ pub fn add(b: *std.Build, c: struct { core_test_step.dependOn(&run_core_test.step); if (core_match) |check| check.addArtifactArg(core_test); } + // The theme importer's own tests (tools/gen_themes.zig): its mapping, + // rule by rule, on the machine that builds. + const gen_themes_test = b.addTest(.{ .root_module = b.createModule(.{ .root_source_file = b.path("tools/gen_themes.zig"), .target = b.graph.host, .optimize = .debug }), .filters = c.test_filters }); + core_test_step.dependOn(&b.addRunArtifact(gen_themes_test).step); + if (core_match) |check| check.addArtifactArg(gen_themes_test); // The terminal module's own tests (core/term/): the emulator without a core. const run_term_test = units.add(b, b.addTest(.{ .root_module = c.parts.term, .filters = c.test_filters }), null); b.step("term-test", "run the terminal module's own tests (core/term/)").dependOn(&run_term_test.step); diff --git a/core/colors.zig b/core/colors.zig index ed82b731..b089a1b9 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -2384,12 +2384,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 @@ -2604,13 +2606,6 @@ fn ringFailures(th: *const Theme, c: *const Chrome) std.EnumSet(RingCheck) { /// 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 }{ - // 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. diff --git a/tools/gen_themes.zig b/tools/gen_themes.zig index fd152aa6..c369b744 100644 --- a/tools/gen_themes.zig +++ b/tools/gen_themes.zig @@ -71,10 +71,22 @@ const Theme = struct { line_number: Rgb, rail: Rgb, rail_thumb: Rgb, - /// A message's error ink (colors.Chrome's severities): diagnostic.error's, - /// else error's, else the theme's red (UX E3: neonotte's diagnostic.error - /// is an underline only). + /// B7: what the sources say beyond the ten (core/theme_schema.zig's + /// overrides): the focused tag, the severities, a diff's hues, the hits, + /// the caret's line number. Null: derived (colors.Chrome.of). + tag_focus: ?Rgb = null, + tag_focus_text: ?Rgb = null, + /// A message's error ink: diagnostic.error's, else error's, else the + /// theme's own red (UX E3: neonotte's diagnostic.error is an underline + /// only). @"error": ?Rgb = null, + warning: ?Rgb = null, + info: ?Rgb = null, + hint: ?Rgb = null, + added: ?Rgb = null, + deleted: ?Rgb = null, + hit: ?Rgb = null, + line_number_current: ?Rgb = null, ansi: ?[16]Rgb, }; @@ -104,6 +116,13 @@ pub fn main(init: std.process.Init) !void { } } for (stems.items) |stem| try themes.append(arena, try helixTheme(arena, stem, resolve(arena, &tomls, stem, 8))); + for (themes.items) |*t| toneOnTone(t); + for (fixes) |f| { + const t = for (themes.items) |*t| { + if (std.mem.eql(u8, t.name, f.name)) break t; + } else std.process.fatal("tools/gen_themes.zig fixes {s}, which no vendored theme is", .{f.name}); + t.hit = f.hit; + } // sorted, so the ring's tail is the same on every machine whatever order // the directory happened to be read in std.mem.sort(Theme, themes.items, {}, byName); @@ -304,6 +323,12 @@ fn helixTheme(arena: std.mem.Allocator, stem: []const u8, h: Helix) !Theme { const bg = h.get("ui.background", .bg); const ink = fg orelse ansi_default[7]; const page = bg orelse ansi_default[0]; + // B7: the text is what the theme draws code in. Many set `ui.text` to a + // muted UI grey and code in `variable` (github's #8b949e and #c9d1d9): + // `variable` where it is a neutral ink that reads 4.5:1 on the page; a + // coloured one (base16's red) is an identifier's hue, not the text. + const text = if (h.get("variable", .fg)) |v| (if (chroma(v) < 0.04 and contrast(v, page) >= 4.5) v else fg) else fg; + const body = text orelse ink; // The move box is the accent that says "here". helix's is the primary // cursor's background — but a theme that draws its cursor by REVERSING // video (nord, monokai) never names one, so the fallback is the loudest @@ -333,22 +358,30 @@ fn helixTheme(arena: std.mem.Allocator, stem: []const u8, h: Helix) !Theme { const sel_lum = @as(i32, sel[0]) * 3 + @as(i32, sel[1]) * 6 + sel[2]; const ink_lum = @as(i32, ink[0]) * 3 + @as(i32, ink[1]) * 6 + ink[2]; const page_lum = @as(i32, page[0]) * 3 + @as(i32, page[1]) * 6 + page[2]; - const sel_far = if (@abs(sel_lum - ink_lum) >= @abs(sel_lum - page_lum)) ink else page; + const sel_far = if (@abs(sel_lum - ink_lum) >= @abs(sel_lum - page_lum)) body else page; // A theme that DID name a selection foreground meant it — 16 of the // vendored ones do — except when it is the colour taken for the background // one line up, which is the reverse-video case again: those two would paint // the highlight in one colour on itself. const named_ink = h.get("ui.selection", .fg); + // B7: the tag is the inactive status bar where the theme has one (107 + // do), and the active one its focused tag where it is tone on tone. + const inactive = h.get("ui.statusline.inactive", .bg); + const tag = inactive orelse h.get("ui.statusline", .bg) orelse page; + const active = if (inactive != null) h.get("ui.statusline", .bg) else null; + const focused = if (active) |a| !std.mem.eql(u8, &a, &tag) and dark(a) == dark(tag) else false; return .{ .name = try slug(arena, stem), - // `palette` stays null: helix leaves the colors a PROGRAM emits alone, - // and so do we. .page = bg, - .text = fg, + .text = text, .selection = sel, .selection_text = if (named_ink) |c| (if (std.mem.eql(u8, &c, &sel)) sel_far else c) else sel_far, - .tag = h.get("ui.statusline", .bg) orelse page, + .tag = tag, + // the status bar's ink (an inactive bar's is often a faded one, + // neonotte's #555973, where pardes's tag holds words to run) .tag_text = h.get("ui.statusline", .fg) orelse ink, + .tag_focus = if (focused) active else null, + .tag_focus_text = if (focused) h.get("ui.statusline", .fg) else null, .accent = box, .keyword = h.get("keyword", .fg) orelse ink, .string = h.get("string", .fg) orelse ink, @@ -362,11 +395,47 @@ fn helixTheme(arena: std.mem.Allocator, stem: []const u8, h: Helix) !Theme { // anything else in the theme's greys) for the thumb riding it .rail = h.get("ui.statusline", .bg) orelse page, .rail_thumb = sel, - .@"error" = h.first(&.{ .{ "diagnostic.error", .fg }, .{ "error", .fg } }) orelse h.color("red"), - .ansi = null, + // B7: the severities from diagnostic.* (often an underline only, + // which names no fg) and the plain scopes; error, else the theme's + // own red (UX E3) + .@"error" = h.first(&.{ .{ "diagnostic.error", .fg }, .{ "error", .fg } }) orelse h.named(&.{"red"}), + .warning = h.first(&.{ .{ "diagnostic.warning", .fg }, .{ "warning", .fg } }), + .info = h.first(&.{ .{ "diagnostic.info", .fg }, .{ "info", .fg } }), + .hint = h.first(&.{ .{ "diagnostic.hint", .fg }, .{ "hint", .fg } }), + .added = diffPair(h.get("diff.plus", .fg), h.get("diff.minus", .fg))[0], + .deleted = diffPair(h.get("diff.plus", .fg), h.get("diff.minus", .fg))[1], + .line_number_current = h.get("ui.linenr.selected", .fg), + // B7: a program's sixteen from the theme's own palette where it names + // the six hues; else pardes derives them from its colours (R14) + .ansi = h.sixteen(page, ink, h.get("comment", .fg) orelse ink), }; } +/// DESIGN.md E1's fixes for an import: a colour of its own its source does +/// not name, where the one pardes derives cannot meet a floor. +const fixes = [_]struct { name: []const u8, hit: Rgb }{ + // Its text reads 5.18:1 on its page: no ground 1.5:1 off leaves it its + // 4.5:1, and the derived amber stops short: its yellow (#dfa000) as a + // ground 1.14:1 off the page, 0.09 OKLab, the text 4.53:1 on it (R0, R8). + .{ .name = "everforest_light", .hit = .{ 0xff, 0xe6, 0x99 } }, + // Its text 4.73:1: its toxic yellow (#c9d400) a ground 1.11:1 off the + // page, 0.09 OKLab, the text 4.27:1 on it, its floor (R0, R8). + .{ .name = "hex_toxic", .hit = .{ 0x2f, 0x32, 0x00 } }, +}; + +/// R3, the import rule: a status bar on the other side of light from the +/// page (merionette's red one on a dark page) is no tag: the tag is the page +/// a 1.15 step off in its own hue, in the text (tone on tone). +fn toneOnTone(t: *Theme) void { + const page = t.page orelse ansi_default[0]; + if (dark(t.tag) == dark(page)) return; + t.tag = stepOff(page, 1.15); + t.tag_text = t.text orelse ansi_default[7]; + t.tag_focus = null; + t.tag_focus_text = null; + t.rail = t.tag; +} + /// helix lets a theme name one of the terminal's sixteen colors instead of an /// RGB (`fg = "light-gray"`), and four of them — base16_terminal, term16_dark, /// term16_light, ttox — are written that way from top to bottom. pardes's Theme @@ -412,6 +481,38 @@ const Helix = struct { return null; } + /// The first of `names` the theme's own [palette] has (never the + /// terminal's sixteen it falls back to: those are a guess). + fn named(h: Helix, names: []const []const u8) ?Rgb { + for (names) |n| if (h.palette.contains(n)) return h.color(n); + return null; + } + + /// B7: a program's sixteen from the palette's own red, green, yellow, + /// blue, magenta (or purple) and cyan (or aqua), their light or bright + /// ones (else the same), black (else the page), white (else the ink) and + /// a grey (else the comment); null unless all six hues are named. + fn sixteen(h: Helix, page: Rgb, ink: Rgb, comment: Rgb) ?[16]Rgb { + const hues = [6][2][]const u8{ .{ "red", "red" }, .{ "green", "green" }, .{ "yellow", "yellow" }, .{ "blue", "blue" }, .{ "magenta", "purple" }, .{ "cyan", "aqua" } }; + var out: [16]Rgb = undefined; + var buf: [4][32]u8 = undefined; + for (hues, 1..) |pair, i| { + const n = if (h.palette.contains(pair[0])) pair[0] else pair[1]; + out[i] = h.named(&.{n}) orelse return null; + out[i + 8] = h.named(&.{ + std.fmt.bufPrint(&buf[0], "light-{s}", .{n}) catch unreachable, + std.fmt.bufPrint(&buf[1], "bright-{s}", .{n}) catch unreachable, + std.fmt.bufPrint(&buf[2], "light_{s}", .{n}) catch unreachable, + std.fmt.bufPrint(&buf[3], "bright_{s}", .{n}) catch unreachable, + }) orelse out[i]; + } + out[0] = h.named(&.{"black"}) orelse page; + out[7] = h.named(&.{ "white", "light-gray", "light_gray" }) orelse ink; + out[8] = h.named(&.{ "gray", "grey", "bright-black", "bright_black" }) orelse comment; + out[15] = h.named(&.{ "bright-white", "bright_white", "light-white" }) orelse out[7]; + return out; + } + /// `first`, skipping any candidate that comes out equal to the page. A /// cursor or a selection painted in the page's own colour is a theme /// drawing that highlight by REVERSING video (it names the cell it is about @@ -564,8 +665,10 @@ fn readZed(arena: std.mem.Allocator, gpa: std.mem.Allocator, path: []const u8, t // always a step off the background and never off the text. .selection = z.need("element.selected"), .selection_text = z.need("editor.foreground"), + // B7: the status bar the tag, the active tab its focus .tag = z.need("status_bar.background"), .tag_text = z.need("text.muted"), + .tag_focus = z.get("tab.active_background"), // zed names its accent, so the move box does not have to be guessed // out of the cursor the way it is for a helix theme .accent = z.need("text.accent"), @@ -577,7 +680,15 @@ fn readZed(arena: std.mem.Allocator, gpa: std.mem.Allocator, path: []const u8, t .rail = z.need("scrollbar.thumb.border"), .rail_thumb = z.need("scrollbar.thumb.background"), // its status colour, else the palette's red (colors.zig) - .@"error" = if (z.style.get("error") != null) z.need("error") else null, + .@"error" = z.get("error"), + .warning = z.get("warning"), + .info = z.get("info"), + .hint = z.get("hint"), + .added = diffPair(z.get("created"), z.get("deleted"))[0], + .deleted = diffPair(z.get("created"), z.get("deleted"))[1], + // a search match is a translucent wash over the page: as drawn + .hit = z.over("search.match_background", z.need("editor.background")), + .line_number_current = z.get("editor.active_line_number"), .ansi = pal, }); } @@ -590,6 +701,24 @@ const Zed = struct { path: []const u8, style: std.json.ObjectMap, + fn get(z: Zed, key: []const u8) ?Rgb { + return if (z.style.get(key) != null) z.need(key) else null; + } + + /// A colour with an alpha (`#rrggbbaa`) as it shows over `ground`. + fn over(z: Zed, key: []const u8, ground: Rgb) ?Rgb { + const s = switch (z.style.get(key) orelse return null) { + .string => |s| s, + else => std.process.fatal("{s}: style.{s} is not a color string", .{ z.path, key }), + }; + const c = hex(z.path, s); + const d = if (s.len > 0 and s[0] == '#') s[1..] else s; + const alpha: f32 = if (d.len == 8) @as(f32, @floatFromInt(std.fmt.parseInt(u8, d[6..8], 16) catch std.process.fatal("{s}: \"{s}\" is not #rrggbbaa", .{ z.path, s }))) / 255 else 1; + var out: Rgb = undefined; + for (&out, c, ground) |*o, x, g| o.* = @intFromFloat(@round(@as(f32, @floatFromInt(x)) * alpha + @as(f32, @floatFromInt(g)) * (1 - alpha))); + return out; + } + fn need(z: Zed, key: []const u8) Rgb { const v = z.style.get(key) orelse std.process.fatal("{s}: missing style.{s}", .{ z.path, key }); return switch (v) { @@ -608,6 +737,79 @@ const Zed = struct { } }; +// ---- colour: the little of colors.zig's maths B7 and R3 need ---- + +fn linear(c: u8) f32 { + const x = @as(f32, @floatFromInt(c)) / 255; + return if (x <= 0.04045) x / 12.92 else std.math.pow(f32, (x + 0.055) / 1.055, 2.4); +} + +fn luminance(c: Rgb) f32 { + return 0.2126 * linear(c[0]) + 0.7152 * linear(c[1]) + 0.0722 * linear(c[2]); +} + +fn contrast(a: Rgb, b: Rgb) f32 { + const x = luminance(a); + const y = luminance(b); + return (@max(x, y) + 0.05) / (@min(x, y) + 0.05); +} + +/// colors.zig's isDark. +fn dark(c: Rgb) bool { + return luminance(c) < 0.18; +} + +/// A colour's OKLab a and b: where its hue points and how far from grey. +fn ab(c: Rgb) [2]f32 { + const l = [3]f32{ linear(c[0]), linear(c[1]), linear(c[2]) }; + const lm = std.math.cbrt(0.4122214708 * l[0] + 0.5363325363 * l[1] + 0.0514459929 * l[2]); + const mm = std.math.cbrt(0.2119034982 * l[0] + 0.6806995451 * l[1] + 0.1073969566 * l[2]); + const sm = std.math.cbrt(0.0883024619 * l[0] + 0.2817188376 * l[1] + 0.6299787005 * l[2]); + return .{ 1.9779984951 * lm - 2.4285922050 * mm + 0.4505937099 * sm, 0.0259040371 * lm + 0.7827717662 * mm - 0.8086757660 * sm }; +} + +/// How far from grey a colour is: its OKLab chroma. +fn chroma(c: Rgb) f32 { + const v = ab(c); + return @sqrt(v[0] * v[0] + v[1] * v[1]); +} + +/// A hue (chroma 0.04) within 60 degrees of `hue` (OKLab). +fn hueNear(c: Rgb, hue: f32) bool { + const v = ab(c); + const h = std.math.radiansToDegrees(std.math.atan2(v[1], v[0])); + const apart = @abs(@mod(h - hue + 540, 360) - 180); + return chroma(c) >= 0.04 and apart <= 60; +} + +/// R10 draws a diff's rows in its added and deleted hues: a theme's own +/// where they are a green and a red, else pardes's, its sixteen's (a grey, a +/// yellow for deleted or a tritan blue cannot be told apart as rows: ashen, +/// wolf_alabaster's, modus_operandi_tritanopia's). +fn diffPair(plus: ?Rgb, minus: ?Rgb) [2]?Rgb { + const p = plus orelse return .{ null, null }; + const m = minus orelse return .{ null, null }; + return if (hueNear(p, 145) and hueNear(m, 25)) .{ p, m } else .{ null, null }; +} + +/// `page` a `step`:1 contrast off itself, lighter on a dark page, darker on +/// a light one, its light scaled so its hue stays (a black page a grey). +fn stepOff(page: Rgb, step: f32) Rgb { + const y = luminance(page); + const want = if (dark(page)) step * (y + 0.05) - 0.05 else (y + 0.05) / step - 0.05; + var out: Rgb = undefined; + for (&out, page) |*o, c| { + const l = if (y > 0) @min(linear(c) * want / y, 1) else want; + const e = if (l <= 0.0031308) l * 12.92 else 1.055 * std.math.pow(f32, l, 1.0 / 2.4) - 0.055; + o.* = @intFromFloat(@round(e * 255)); + } + // the bytes' rounding short of the step: one more + while (contrast(out, page) < step) for (&out) |*o| { + o.* = if (dark(page)) o.* +| 1 else o.* -| 1; + }; + return out; +} + /// `#rrggbb`, helix's `#rgb` shorthand, or zed's `#rrggbbaa`. The alpha is /// DROPPED: pardes paints opaque cells, and the only translucent colors we read /// are the scrollbar's, where a dropped alpha reads as a slightly bolder bar and @@ -625,3 +827,142 @@ fn hex(path: []const u8, s: []const u8) Rgb { } return out; } + +// ---- tests: each of B7's rules on a minimal theme ---- + +fn helixOf(arena: std.mem.Allocator, text: []const u8) !Theme { + var tomls: std.StringHashMapUnmanaged(Toml) = .empty; + try tomls.put(arena, "t", parseToml(arena, "t.toml", text)); + var t = try helixTheme(arena, "t", resolve(arena, &tomls, "t", 8)); + toneOnTone(&t); + return t; +} + +test "B7: the text is helix's `variable` where it is a neutral ink that reads 4.5:1, else ui.text" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const a = arena.allocator(); + // github's: ui.text a muted grey, code in a neutral variable + const github = try helixOf(a, "\"ui.background\" = { bg = \"#0d1117\" }\n\"ui.text\" = \"#8b949e\"\nvariable = \"#c9d1d9\"\n"); + try std.testing.expectEqual(Rgb{ 0xc9, 0xd1, 0xd9 }, github.text.?); + // a coloured variable (base16's red) is an identifier's hue + const base16 = try helixOf(a, "\"ui.background\" = { bg = \"#181818\" }\n\"ui.text\" = \"#d8d8d8\"\nvariable = \"#ab4642\"\n"); + try std.testing.expectEqual(Rgb{ 0xd8, 0xd8, 0xd8 }, base16.text.?); + // a neutral variable that does not read stays out + const faint = try helixOf(a, "\"ui.background\" = { bg = \"#181818\" }\n\"ui.text\" = \"#d8d8d8\"\nvariable = \"#444444\"\n"); + try std.testing.expectEqual(Rgb{ 0xd8, 0xd8, 0xd8 }, faint.text.?); +} + +test "B7: the tag is the inactive status bar, and the active one its focus where it is tone on tone" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const a = arena.allocator(); + const both = try helixOf(a, "\"ui.background\" = { bg = \"#1e1e2e\" }\n\"ui.text\" = \"#cdd6f4\"\n\"ui.statusline\" = { fg = \"#cdd6f4\", bg = \"#313244\" }\n\"ui.statusline.inactive\" = { fg = \"#a6adc8\", bg = \"#181825\" }\n"); + try std.testing.expectEqual(Rgb{ 0x18, 0x18, 0x25 }, both.tag); + try std.testing.expectEqual(Rgb{ 0xcd, 0xd6, 0xf4 }, both.tag_text); + try std.testing.expectEqual(Rgb{ 0x31, 0x32, 0x44 }, both.tag_focus.?); + try std.testing.expectEqual(Rgb{ 0xcd, 0xd6, 0xf4 }, both.tag_focus_text.?); + // one status bar: the tag, its focus pardes's to derive + const one = try helixOf(a, "\"ui.background\" = { bg = \"#1e1e2e\" }\n\"ui.statusline\" = { fg = \"#cdd6f4\", bg = \"#313244\" }\n"); + try std.testing.expectEqual(Rgb{ 0x31, 0x32, 0x44 }, one.tag); + try std.testing.expectEqual(null, one.tag_focus); + // an active bar on the other side of light is no focus + const loud = try helixOf(a, "\"ui.background\" = { bg = \"#1e1e2e\" }\n\"ui.statusline\" = { fg = \"#000000\", bg = \"#f0f0f0\" }\n\"ui.statusline.inactive\" = { fg = \"#a6adc8\", bg = \"#181825\" }\n"); + try std.testing.expectEqual(null, loud.tag_focus); +} + +test "R3, the import rule: a status bar on the other side of light from the page leaves the page a 1.15 step off as the tag, in the text" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const t = try helixOf(arena.allocator(), "\"ui.background\" = { bg = \"#1a1a1a\" }\n\"ui.text\" = \"#e0e0e0\"\n\"ui.statusline\" = { fg = \"#ffffff\", bg = \"#e05050\" }\n"); + try std.testing.expect(dark(t.tag) and contrast(t.tag, .{ 0x1a, 0x1a, 0x1a }) >= 1.15 and contrast(t.tag, .{ 0x1a, 0x1a, 0x1a }) < 1.2); + try std.testing.expectEqual(Rgb{ 0xe0, 0xe0, 0xe0 }, t.tag_text); + try std.testing.expectEqual(t.tag, t.rail); + // and on paper, darker + const light = try helixOf(arena.allocator(), "\"ui.background\" = { bg = \"#f8f8f0\" }\n\"ui.text\" = \"#202020\"\n\"ui.statusline\" = { fg = \"#ffffff\", bg = \"#203040\" }\n"); + try std.testing.expect(!dark(light.tag) and luminance(light.tag) < luminance(.{ 0xf8, 0xf8, 0xf0 }) and contrast(light.tag, .{ 0xf8, 0xf8, 0xf0 }) >= 1.15); +} + +test "B7: the severities from diagnostic.* and the plain scopes, error else the theme's own red" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const a = arena.allocator(); + // gruvbox_material's: diagnostic.* an underline only, the plain scopes named + const t = try helixOf(a, "\"diagnostic.error\" = { underline = { color = \"red\", style = \"curl\" } }\n\"diagnostic.warning\" = { fg = \"#d8a657\" }\nerror = \"red\"\nwarning = \"#111111\"\ninfo = \"blue\"\nhint = \"#a9b665\"\n[palette]\nred = \"#ea6962\"\nblue = \"#7daea3\"\n"); + try std.testing.expectEqual(Rgb{ 0xea, 0x69, 0x62 }, t.@"error".?); + try std.testing.expectEqual(Rgb{ 0xd8, 0xa6, 0x57 }, t.warning.?); + try std.testing.expectEqual(Rgb{ 0x7d, 0xae, 0xa3 }, t.info.?); + try std.testing.expectEqual(Rgb{ 0xa9, 0xb6, 0x65 }, t.hint.?); + // none named: the theme's own red, never the terminal's guess; the rest pardes's + const bare = try helixOf(a, "[palette]\nred = \"#ff7ea2\"\n"); + try std.testing.expectEqual(Rgb{ 0xff, 0x7e, 0xa2 }, bare.@"error".?); + try std.testing.expectEqual(null, bare.warning); + try std.testing.expectEqual(null, (try helixOf(a, "\"ui.text\" = \"#cccccc\"\n")).@"error"); +} + +test "B7: added and deleted from diff.plus and diff.minus, the caret's line number from ui.linenr.selected" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const t = try helixOf(arena.allocator(), "\"diff.plus\" = \"#9feb99\"\n\"diff.minus\" = { fg = \"#ff7ea2\" }\n\"ui.linenr.selected\" = { fg = \"#abb7ff\" }\n"); + try std.testing.expectEqual(Rgb{ 0x9f, 0xeb, 0x99 }, t.added.?); + try std.testing.expectEqual(Rgb{ 0xff, 0x7e, 0xa2 }, t.deleted.?); + try std.testing.expectEqual(Rgb{ 0xab, 0xb7, 0xff }, t.line_number_current.?); + // wolf_alabaster's deleted is a yellow, ashen's added a grey: rows of + // them cannot be told apart, so pardes's green and red + const yellow = try helixOf(arena.allocator(), "\"diff.plus\" = \"#95cb82\"\n\"diff.minus\" = \"#dfdf8e\"\n"); + try std.testing.expectEqual(null, yellow.added); + try std.testing.expectEqual(null, yellow.deleted); + try std.testing.expectEqual(null, (try helixOf(arena.allocator(), "\"diff.plus\" = \"#737373\"\n\"diff.minus\" = \"#b14242\"\n")).added); +} + +test "B7: a program's sixteen from the palette where it names the six hues, purple and aqua for magenta and cyan" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const a = arena.allocator(); + const t = try helixOf(a, "\"ui.background\" = { bg = \"#282828\" }\n\"ui.text\" = \"#ebdbb2\"\ncomment = \"#928374\"\n[palette]\nred = \"#cc241d\"\ngreen = \"#98971a\"\nyellow = \"#d79921\"\nblue = \"#458588\"\npurple = \"#b16286\"\naqua = \"#689d6a\"\nlight-red = \"#fb4934\"\n"); + const s = t.ansi.?; + try std.testing.expectEqual(Rgb{ 0xcc, 0x24, 0x1d }, s[1]); + try std.testing.expectEqual(Rgb{ 0xb1, 0x62, 0x86 }, s[5]); + try std.testing.expectEqual(Rgb{ 0x68, 0x9d, 0x6a }, s[6]); + try std.testing.expectEqual(Rgb{ 0xfb, 0x49, 0x34 }, s[9]); + try std.testing.expectEqual(s[2], s[10]); + try std.testing.expectEqual(Rgb{ 0x28, 0x28, 0x28 }, s[0]); + try std.testing.expectEqual(Rgb{ 0xeb, 0xdb, 0xb2 }, s[7]); + try std.testing.expectEqual(Rgb{ 0x92, 0x83, 0x74 }, s[8]); + // five of six: pardes derives them + try std.testing.expectEqual(null, (try helixOf(a, "[palette]\nred = \"#cc241d\"\ngreen = \"#98971a\"\nyellow = \"#d79921\"\nblue = \"#458588\"\npurple = \"#b16286\"\n")).ansi); +} + +test "B7, zed: the status bar the tag, the active tab its focus, the status colours, a search match as drawn over the page" { + var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); + defer arena.deinit(); + const a = arena.allocator(); + var style: std.ArrayList(u8) = .empty; + const keys = [_][2][]const u8{ + .{ "editor.background", "#282c33ff" }, .{ "editor.foreground", "#acb2beff" }, + .{ "element.selected", "#454a56ff" }, .{ "status_bar.background", "#3b414dff" }, + .{ "text.muted", "#a9afbcff" }, .{ "text.accent", "#74ade8ff" }, + .{ "editor.line_number", "#4e5a5f" }, .{ "scrollbar.thumb.border", "#363c46ff" }, + .{ "scrollbar.thumb.background", "#c8ccd44c" }, .{ "tab.active_background", "#282c33ff" }, + .{ "error", "#d07277ff" }, .{ "warning", "#dec184ff" }, + .{ "info", "#74ade8ff" }, .{ "hint", "#788ca6ff" }, + .{ "created", "#a1c181ff" }, .{ "deleted", "#d07277ff" }, + .{ "search.match_background", "#74ade866" }, .{ "editor.active_line_number", "#d0d4da" }, + }; + for (keys) |k| try style.print(a, "\"{s}\": \"{s}\", ", .{ k[0], k[1] }); + inline for (ansi) |n| try style.print(a, "\"terminal.ansi.{s}\": \"#101010\", \"terminal.ansi.bright_{s}\": \"#202020\", ", .{ n, n }); + const json = try std.fmt.allocPrint(a, "{{\"themes\": [{{\"name\": \"One Dark\", \"style\": {{ {s} \"syntax\": {{ \"keyword\": {{\"color\": \"#b477cf\"}}, \"string\": {{\"color\": \"#a1c181\"}}, \"number\": {{\"color\": \"#bf956a\"}}, \"comment\": {{\"color\": \"#5d636f\"}} }} }} }}]}}", .{style.items}); + var out: std.ArrayList(Theme) = .empty; + try readZed(a, std.testing.allocator, "one.json", json, &out); + const t = out.items[0]; + try std.testing.expectEqualStrings("one_dark_zed", t.name); + try std.testing.expectEqual(Rgb{ 0x3b, 0x41, 0x4d }, t.tag); + try std.testing.expectEqual(Rgb{ 0x28, 0x2c, 0x33 }, t.tag_focus.?); + try std.testing.expectEqual(Rgb{ 0xd0, 0x72, 0x77 }, t.@"error".?); + try std.testing.expectEqual(Rgb{ 0x78, 0x8c, 0xa6 }, t.hint.?); + try std.testing.expectEqual(Rgb{ 0xa1, 0xc1, 0x81 }, t.added.?); + try std.testing.expectEqual(Rgb{ 0xd0, 0x72, 0x77 }, t.deleted.?); + try std.testing.expectEqual(Rgb{ 0xd0, 0xd4, 0xda }, t.line_number_current.?); + // #74ade8 at 0x66 (40 %) over #282c33 + try std.testing.expectEqual(Rgb{ 0x46, 0x60, 0x7b }, t.hit.?); +} -- cgit v1.3 From fed268f2282a6d393a116d103e1fd88da87ecbff Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 04:36:36 -0300 Subject: themes, colors, gen_themes: `dark` refreshed and four new pardes themes, light, mono, okabe and sepia, and the ring in DESIGN.md E's groups (the themes programme's L5; DESIGN.md C, D, E, G2, G3): DARK (C): still the one theme with no page and no text of its own, so a terminal keeps the host's cell, ink and sixteen (ansi.inkOf's `host`), and a window draws colors.null_page #121212 and #cccccc (G2 (a)); its comments the brightest ink, #f0f0f0; keywords violet #d76ef0 (6.6:1; was #da5eea, 5.9:1); the lilac tag #2c2a3e with #aba9c3 ink, focused #d6d4e8; the grip #a58bff (3.4:1 on its focused tag; was #663fe0, 1.45:1); a violet selection #46337a in #f4f0ff (G3 (a): the tan #513c17 sat in the hits' amber); its own severities #ff6e7f #ffb454 #7fa8ff #62d2c4, line numbers #5c5c66 / #8e8c9e, and a designed sixteen for the window (its ANSI 8 #7e7b96, 4.6:1, where L1's derived one was 3:1); its focused tag, mode ring, grip ring, dirty, rules, hits and diff rows Chrome.of's; LIGHT, MONO, OKABE, SEPIA (D): each its primitives as the designer's prototype resolved and audited them (.scratch/themes/C1/newthemes.py, swatches.md: page, text, tag and its ink, accent, selection and its ink, the four syntax hues, line numbers, the four severities, the sixteen; okabe's added blue #56b4e9 and deleted vermilion #ff8a4c), everything else Chrome.of's; THE RING (E): curated in the picker's sections: Pardes (dark, light, orchard, orchard_black, ink, mono, okabe, sepia, paper, daybreak, dusk, lapis), Pardes, after a classic (forge, forge_black, forge_soft, lagoon, solarium, spectrum, harvest, clay), acme (acme, atelier), the faithful ports a family at a time as before, Captured (helix; "Legacy themes" gone); the imported a family at a time, each under its heading (`Imported: gruvbox`, a family the name's first word, two themes or more), the lone ones last under one (`Imported, one of a kind`): the generator rings them so (gen_themes `byFamily`) and colors.zig heads them at comptime (`import_heads`, a compile error where a family rings after a lone theme); ORCHARD THE DEFAULT BY NAME (`colors.default_theme`: config.Settings' `theme`, the library's `default_theme`, macos.zig's bare page), never index 0, which is dark now; THE RING TEST: dusk, lagoon, solarium and forge_soft `soft` (`soft_themes`: held at AA, their text and tag text never to the pro 7:1; the coordinator's ruling) where they were on the expected list; the diff rows' "unless the text holds it nearer" exception for the ports and imports only, pardes's own held to 1.15:1 (the coordinator's ruling: every one of them meets it); pardes's own are every theme before the first faithful port, so dark and the new four are held to the pro floors with the natives; the old tests that read the first fifteen by place read the fifteen designed natives by name (`designed`; `native_theme_count` gone, B8); RUN (TEST FIRST): the ring test with dark off its list and the soft four marked failed on L4's dark (ansi_pro: its ANSI 8 3:1) and, with the soft mark on text alone, on lagoon's and solarium's tag_text7: 281 of 289 themes pass (272 of 285 at L4, the four new ones passing every floor, pro included), 8 on the list (L7's retired); colors.zig "the picker's sections run in ring order and cover it": dark first, orchard the default by name, each imported family's heading at its first, none after the lone ones' (fails on L4: "Pardes themes", orchard at 0); test/process/tty_themes.zig's `theme` case boots in dark (`Theme dark`, its own init line) and steps NextColor through the 24 of the new order into the first ports (dark, light, orchard, orchard-black, ink, mono, okabe, sepia, paper, daybreak, dusk, lapis, forge, ..., clay, acme, atelier, dark-plus, solarized-dark), `themesel` walks the Themes list from its first row the same 24 (both goldens re-recorded and read at the programme's end gate: the snaps are named for the new order); core-test 1140/1313 (173 skipped: as L4, the picker test grown); OUTSIDE my files: core/config.zig (the default, 1 line), core/lib_syntax.zig (`default_theme`), runtime/macos.zig (1 line), test/consumer/lib.zig (orchard is `default_theme`), test/process/tty_themes.zig (the two cases); no dump or digest change (a dump names its theme; settings.theme is a place in this build's ring, as before) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- core/colors.zig | 177 +++++++++++++++++++++++++++++--------------- core/config.zig | 2 +- core/lib_syntax.zig | 5 +- core/themes/dark.zig | 55 +++++++------- core/themes/light.zig | 30 ++++++++ core/themes/mono.zig | 31 ++++++++ core/themes/okabe.zig | 32 ++++++++ core/themes/sepia.zig | 30 ++++++++ runtime/macos.zig | 2 +- test/consumer/lib.zig | 2 +- test/process/tty_themes.zig | 177 +++++++++++++++++++++++++++++--------------- tools/gen_themes.zig | 17 ++++- 12 files changed, 406 insertions(+), 154 deletions(-) create mode 100644 core/themes/light.zig create mode 100644 core/themes/mono.zig create mode 100644 core/themes/okabe.zig create mode 100644 core/themes/sepia.zig (limited to 'core/colors.zig') diff --git a/core/colors.zig b/core/colors.zig index b089a1b9..9091760f 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -1096,23 +1096,33 @@ pub const Grounds = struct { 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/ // .zig says where each value came from): `theme_groups`. pub const dark_plus = @import("themes/dark_plus.zig"); @@ -1178,9 +1188,8 @@ 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: each file's `theme`, a field it @@ -1235,13 +1244,14 @@ 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" }, @@ -1255,9 +1265,12 @@ 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"); + fn indexOfTheme(comptime name: []const u8) usize { return comptime blk: { @setEvalBranchQuota(100000); @@ -1269,12 +1282,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; -} - -/// Original and classic-inspired Pardes palettes precede retained imports. -pub const native_theme_count = 15; + return if (index >= native_count) import_heads[index - native_count] else null; +} + +/// 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) @@ -1904,9 +1943,8 @@ test "every native theme's separators stand off its page, and its focus tint off 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. @@ -1917,7 +1955,7 @@ 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 (themes[first..last]) |*ring_theme| { const view = ChromeTheme.ofTheme(ring_theme).view; @@ -1973,10 +2011,23 @@ 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" { @@ -2054,7 +2105,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 }; @@ -2074,8 +2125,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(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, @@ -2085,11 +2136,8 @@ 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 (themes[0..names.len], names) |own, name| { - const th = ChromeTheme.ofTheme(&own).view; - 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{ @@ -2121,8 +2169,14 @@ test "native themes keep text and UI roles readable on their own surfaces" { } } +/// 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 (themes[0..native_theme_count]) |*th| { + 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{ @@ -2146,8 +2200,8 @@ test "native filename tints change hue without changing perceived lightness" { } test "native dark palettes choose near-black or deliberately soft contrast" { - for (themes[0..native_theme_count]) |ring_theme| { - const th = ChromeTheme.ofTheme(&ring_theme).view; + 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"); @@ -2175,7 +2229,7 @@ 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 = ChromeTheme.ofTheme(&themes[0]).view; + 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 }; @@ -2252,7 +2306,8 @@ test "legacy ThemeFile documents inherit Pardes UI roles without new fields" { } test "column grip colors remain distinct from pane grips across native themes" { - for (themes[0..native_theme_count]) |*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{ .{ th.accent, th.column_grip.? }, @@ -2265,7 +2320,7 @@ test "column grip colors remain distinct from pane grips across native themes" { try std.testing.expect(distance >= 30 * 30); } } - var custom = ChromeTheme.ofTheme(&themes[0]).view; + var custom = ChromeTheme.ofTheme(&themes[default_theme]).view; custom.column_box = .{ 90, 130, 170 }; custom.column_box_dim = null; var chrome = ChromeTheme.fromTheme(&custom); @@ -2277,7 +2332,7 @@ test "column grip colors remain distinct from pane grips across native themes" { } test "custom filename tints preserve optional active fallback precedence" { - var theme = ChromeTheme.ofTheme(&themes[0]).view; + var theme = ChromeTheme.ofTheme(&themes[default_theme]).view; theme.tag_name_fg = null; theme.tag_active_name_fg = null; var chrome = ChromeTheme.fromTheme(&theme); @@ -2484,7 +2539,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 { @@ -2571,12 +2626,13 @@ 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))); - // R10: each diff row 1.15:1 off the page, unless the text holds it - // nearer (never under its floor there: tokyonight_day's text, 4.9:1, - // leaves 1.11:1), and the two 0.05 apart. + // 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 contrast(ink, row) > diff_floor + 0.05) f.insert(.diff); + 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; @@ -2606,8 +2662,6 @@ fn ringFailures(th: *const Theme, c: *const Chrome) std.EnumSet(RingCheck) { /// 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 }{ - // 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" }, @@ -2617,17 +2671,17 @@ const ring_expected = [_]struct { []const u8, []const u8 }{ .{ "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; @@ -2639,12 +2693,17 @@ 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); } diff --git a/core/config.zig b/core/config.zig index 03cb6044..dc1d98dc 100644 --- a/core/config.zig +++ b/core/config.zig @@ -614,7 +614,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/lib_syntax.zig b/core/lib_syntax.zig index 2c771b72..448ac7f3 100644 --- a/core/lib_syntax.zig +++ b/core/lib_syntax.zig @@ -103,9 +103,10 @@ pub const Span = syntax.Span; pub const walkNodes = syntax.walkNodes; pub const Theme = colors.Theme; -/// Every theme: pardes's own, then those imported from helix and zed. The -/// first is the default. +/// 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.themes[colors.themeIndex(name) orelse return null]; diff --git a/core/themes/dark.zig b/core/themes/dark.zig index 51768f56..24506f6b 100644 --- a/core/themes/dark.zig +++ b/core/themes/dark.zig @@ -1,33 +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", .page = null, .text = null, - .selection = .{ 0x51, 0x3c, 0x17 }, - .selection_text = .{ 0xd8, 0xc8, 0xa8 }, .tag = .{ 0x2c, 0x2a, 0x3e }, - .tag_text = .{ 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_focus = .{ 0x48, 0x45, 0x66 }, - .tag_focus_text = .{ 0xc8, 0xc8, 0xc8 }, - .accent = .{ 0x66, 0x3f, 0xe0 }, - .keyword = .{ 0xda, 0x5e, 0xea }, - .string = .{ 0x85, 0xc3, 0x6f }, - .number = .{ 0xe1, 0xcb, 0x5f }, + .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 }, - .line_number = .{ 0x5a, 0x5a, 0x5a }, - .rail = .{ 0x2a, 0x2a, 0x2a }, - .rail_thumb = .{ 0x52, 0x52, 0x52 }, - .ansi = 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/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/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/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/runtime/macos.zig b/runtime/macos.zig index 2778507f..0e47fb02 100644 --- a/runtime/macos.zig +++ b/runtime/macos.zig @@ -479,7 +479,7 @@ export fn pardes_animating() bool { export fn pardes_theme_bg() u32 { pardes.turn.wake(); defer pardes.turn.rest(); - const page = if (state) |*st| st.core.theme().bg else pardes.themes[0].page; + const page = if (state) |*st| st.core.theme().bg else pardes.themes[pardes.colors.default_theme].page; const bg = page orelse return color_default; return @as(u32, bg[0]) << 16 | @as(u32, bg[1]) << 8 | bg[2]; } diff --git a/test/consumer/lib.zig b/test/consumer/lib.zig index 68134cc3..2832bdf1 100644 --- a/test/consumer/lib.zig +++ b/test/consumer/lib.zig @@ -88,7 +88,7 @@ test "a C and a Zig source are coloured, outlined and walked as pardes has them, try std.testing.expectEqual(null, pardes.parse("main.rs", "fn main() {}")); const orchard = pardes.theme("Orchard").?; - try std.testing.expectEqual(orchard, &pardes.themes[0]); + try std.testing.expectEqual(orchard, &pardes.themes[pardes.default_theme]); try std.testing.expectEqual([3]u8{ 0x0d, 0x14, 0x10 }, pardes.page(orchard)); try std.testing.expectEqual([3]u8{ 0xe5, 0xee, 0xe5 }, pardes.ink(orchard)); try std.testing.expectEqual([3]u8{ 0xc9, 0xa7, 0xed }, pardes.synInk(orchard, .keyword).?); diff --git a/test/process/tty_themes.zig b/test/process/tty_themes.zig index 1975c02b..8c49b77f 100644 --- a/test/process/tty_themes.zig +++ b/test/process/tty_themes.zig @@ -17,6 +17,10 @@ pub const cases = .{ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { var t = try Tty.init(gpa, exe, "theme"); defer t.deinit(); + // From the ring's first, dark (the host's page: the tty's own cells), + // through pardes's own, those after a classic and acme's, into the first + // faithful ports (DESIGN.md E's groups). + try t.config("Theme dark"); try t.file("t.txt", "x"); try t.start(31, 100, &.{ "-n", "3" }); try t.wait(8000, "t.txt"); @@ -30,13 +34,23 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.key("esc"); try t.settle(100); try t.stable(700, 10000); + try t.snap("dark"); + try t.style("dark"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); + try t.snap("light"); + try t.style("light"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); try t.snap("orchard"); try t.style("orchard"); try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); - try t.snap("dusk"); - try t.style("dusk"); + try t.snap("orchard-black"); + try t.style("orchard-black"); try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); @@ -45,6 +59,21 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); + try t.snap("mono"); + try t.style("mono"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); + try t.snap("okabe"); + try t.style("okabe"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); + try t.snap("sepia"); + try t.style("sepia"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); try t.snap("paper"); try t.style("paper"); try t.press("middle", "@NextColor", 1); @@ -55,8 +84,13 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); - try t.snap("atelier"); - try t.style("atelier"); + try t.snap("dusk"); + try t.style("dusk"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); + try t.snap("lapis"); + try t.style("lapis"); try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); @@ -65,6 +99,16 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); + try t.snap("forge-black"); + try t.style("forge-black"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); + try t.snap("forge-soft"); + try t.style("forge-soft"); + try t.press("middle", "@NextColor", 1); + try t.release("middle", "@NextColor", 1); + try t.stable(700, 10000); try t.snap("lagoon"); try t.style("lagoon"); try t.press("middle", "@NextColor", 1); @@ -90,28 +134,13 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); - try t.snap("forge-black"); - try t.style("forge-black"); - try t.press("middle", "@NextColor", 1); - try t.release("middle", "@NextColor", 1); - try t.stable(700, 10000); - try t.snap("forge-soft"); - try t.style("forge-soft"); - try t.press("middle", "@NextColor", 1); - try t.release("middle", "@NextColor", 1); - try t.stable(700, 10000); - try t.snap("orchard-black"); - try t.style("orchard-black"); - try t.press("middle", "@NextColor", 1); - try t.release("middle", "@NextColor", 1); - try t.stable(700, 10000); try t.snap("acme"); try t.style("acme"); try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); - try t.snap("lapis"); - try t.style("lapis"); + try t.snap("atelier"); + try t.style("atelier"); try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); @@ -120,7 +149,6 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.press("middle", "@NextColor", 1); try t.release("middle", "@NextColor", 1); try t.stable(700, 10000); - // After orchard_black: acme and lapis, then the first faithful ports. try t.snap("solarized-dark"); try t.style("solarized-dark"); try t.done(); @@ -138,10 +166,10 @@ fn theme(gpa: std.mem.Allocator, exe: [:0]const u8) !void { // running it and stopping. There is still no preview state, nothing to confirm // and nothing to cancel: the row you ran is the theme you have. // -// The whole ring is in the buffer, in sections: the fifteen native themes, -// acme and lapis, the faithful ports a family at a time, the legacy helix and -// dark, then everything exported from the vendored helix .toml and zed .json -// files, sorted. The colors below are +// The whole ring is in the buffer, in sections (DESIGN.md E): pardes's own, +// those after a classic, acme's, the faithful ports a family at a time, the +// captured helix, then everything imported from the vendored helix .toml and +// zed .json files, a family at a time and the lone ones last, sorted. The colors below are // read with snapstyle, so this proves the generated themes are real data and // not just names in a list. fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void { @@ -159,66 +187,77 @@ fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void { // fresh output buffer is where the walk's ring starts, so the first n goes // into the list and every one after it carries on down it. try t.key("space t t"); - try t.wait(10000, "Theme orchard"); + try t.wait(10000, "Theme dark"); try t.stable(700, 15000); try t.snap("list"); - // n selects row 1 whole and Tab runs it: `Theme orchard`, which is already the - // boot theme, so only the selection moves. That is the honest first step — an - // idempotent command has to be safe to run. + // n selects row 1 whole and Tab runs it: `Theme dark`, the ring's first; + // the theme changes under the cursor one row at a time, a section's + // heading and its blank line skipped (Output.isWalkRow). + try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-dark"); + try t.style("step-dark"); + try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-light"); + try t.style("step-light"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); try t.snap("step-orchard"); try t.style("step-orchard"); - // ...and now the theme really does change under the cursor, one row at a time try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-dusk"); - try t.style("step-dusk"); - // Selection alone can skip rows without previewing or applying their themes. - // Four steps reach atelier, the Acme homage; Tab then applies it. - try t.key("space j n"); + try t.snap("step-orchard-black"); + try t.style("step-orchard-black"); try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-ink"); + try t.style("step-ink"); try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-mono"); + try t.style("step-mono"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-atelier"); - try t.style("step-atelier"); + try t.snap("step-okabe"); + try t.style("step-okabe"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-forge"); - try t.style("step-forge"); + try t.snap("step-sepia"); + try t.style("step-sepia"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-lagoon"); - try t.style("step-lagoon"); + try t.snap("step-paper"); + try t.style("step-paper"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-solarium"); - try t.style("step-solarium"); + try t.snap("step-daybreak"); + try t.style("step-daybreak"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-spectrum"); - try t.style("step-spectrum"); + try t.snap("step-dusk"); + try t.style("step-dusk"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-harvest"); - try t.style("step-harvest"); + try t.snap("step-lapis"); + try t.style("step-lapis"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-clay"); - try t.style("step-clay"); - // The three native contrast variants precede acme and lapis, and then the first - // ported family's section. Its heading - // and blank separator are not stops in the n/N command walk. + try t.snap("step-forge"); + try t.style("step-forge"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); @@ -232,8 +271,28 @@ fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-orchard-black"); - try t.style("step-orchard-black"); + try t.snap("step-lagoon"); + try t.style("step-lagoon"); + try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-solarium"); + try t.style("step-solarium"); + try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-spectrum"); + try t.style("step-spectrum"); + try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-harvest"); + try t.style("step-harvest"); + try t.key("space j n"); + try t.key("tab"); + try t.stable(700, 15000); + try t.snap("step-clay"); + try t.style("step-clay"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); @@ -242,17 +301,13 @@ fn themesel(gpa: std.mem.Allocator, exe: [:0]const u8) !void { try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); - try t.snap("step-lapis"); - try t.style("step-lapis"); + try t.snap("step-atelier"); + try t.style("step-atelier"); try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); try t.snap("step-dark-plus"); try t.style("step-dark-plus"); - // across the Visual Studio Code section into Solarized: a section heading and - // its blank line are skipped like the first. (The imported half, past the - // legacy section, is sorted by name, so the ring is the same everywhere - // whatever order the directory read handed the files over in.) try t.key("space j n"); try t.key("tab"); try t.stable(700, 15000); diff --git a/tools/gen_themes.zig b/tools/gen_themes.zig index c369b744..62aafcf5 100644 --- a/tools/gen_themes.zig +++ b/tools/gen_themes.zig @@ -124,8 +124,12 @@ pub fn main(init: std.process.Init) !void { t.hit = f.hit; } // sorted, so the ring's tail is the same on every machine whatever order - // the directory happened to be read in - std.mem.sort(Theme, themes.items, {}, byName); + // the directory happened to be read in: a family at a time (a name's + // first word, two themes or more), the lone ones after every family, so + // the picker heads each family once (colors.zig `import_heads`) + var families: std.StringHashMapUnmanaged(u32) = .empty; + for (themes.items) |t| (try families.getOrPutValue(arena, family(t.name), 0)).value_ptr.* += 1; + std.mem.sort(Theme, themes.items, &families, byFamily); var dir = try std.Io.Dir.cwd().openDir(io, args[1], .{}); defer dir.close(io); @@ -150,7 +154,14 @@ fn write(io: std.Io, dir: std.Io.Dir, arena: std.mem.Allocator, stem: []const u8 try file.writeStreamingAll(io, text); } -fn byName(_: void, a: Theme, b: Theme) bool { +fn family(name: []const u8) []const u8 { + return name[0 .. std.mem.indexOfScalar(u8, name, '_') orelse name.len]; +} + +fn byFamily(families: *const std.StringHashMapUnmanaged(u32), a: Theme, b: Theme) bool { + const lone_a = families.get(family(a.name)).? < 2; + const lone_b = families.get(family(b.name)).? < 2; + if (lone_a != lone_b) return lone_b; return std.mem.order(u8, a.name, b.name) == .lt; } -- cgit v1.3 From 77b22e7c7623696feb52292bb86839870e20050d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 04:37:03 -0300 Subject: themes, vendor, colors, gen_themes, exec, ctl, dump: DESIGN.md E's 44 themes retired, each name standing for its successor wherever it is still read (the themes programme's L7; DESIGN.md E, F): GONE: 28 helix sources (base16_default_light, base16_terminal, base16_transparent, bogster_light, cyan_light, eldritch_transparent, gruvbox-material, hex_lavender, hex_poison, ingrid, iroaseta, nord_light, nyxvamp-transparent, peachpuff, the six helix seoul256s, term16_dark, term16_light, tokyonight, ttox, ttox_soft, vesper-transparent, zed_onedark, zed_onelight), zed's ayu.json and gruvbox.json (every variant in them retired: ayu_dark/light/mirage_zed, the six gruvbox_*_zed) and their licences (ayu.LICENSE, gruvbox.LICENSE: zed's, covering those files alone; helix's licences each cover a kept theme), seoul256's 238, 239, 252 and 253 (their rows, their citations, their lines in its G4 block); vendor/themes/base/ holds the retired three kept themes inherit from (ayu_dark_helix, hex_steel, nord_helix; the designer's list named seven, but no kept theme inherits seoul256_dark/_light, term16_dark or zed_onedark once their children retire), passed to the generator as `base=` (build/core.zig `vendoredThemes` per directory), read for `inherits`, never rung; THE SUCCESSORS: `colors.retired`, 44 names and the kept one each stands for (the kept twin, the nearest kept seoul256 step, dark or light for the terminal-colour themes, the default where there is none: ingrid), read by `successorOf`: a `Theme` (an init file's line, a click, a /ctl write) naming one wears its successor and says so once, as a notice: "Theme gruvbox_dark_zed was retired: gruvbox instead" (exec.applySettingBuiltin); /ctl takes such a write (ctl.zig); a dump or Restore naming one restores its successor (`colors.restoredIndex`, dump.zig's two readers, which said the same loop twice; one this build has nothing of keeps the theme in effect as before, else the default by name, where it was index 0, dark's now); an unknown name keeps today's path and words; THE RING TEST'S LIST: empty, so gone (`ring_expected` and its bookkeeping: every theme in the ring passes every floor it is held to, or the test names it); RUN (TEST FIRST): colors.zig "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" (an init `Theme gruvbox_dark_zed`, `Theme TTOX` (any case), `Theme ingrid` and `Theme no-such-theme`: gruvbox, dark, orchard and orchard, each with its one message; a dump of a session in acme with `ttox` put in for its theme's name, as an older build's: restored in dark): fails on L5 (gruvbox_dark_zed still in the ring, worn as itself), passes now; "every retired theme's successor is in the ring, and no retired name is" (44); the ring test: 245 of 245 themes pass every floor (289 at L5, 44 retired); "seoul256's eight backgrounds ring in their order"; the G4 test holds every port's file; core-test 1142/1315 (173 skipped: L5's 1140/1313 + the two retirement tests); OUTSIDE my files: build/core.zig (`vendoredThemes` per directory, the base arguments), core/exec.zig (`Theme`'s retired branch, 7 lines), core/ninep/ctl.zig (1 line), core/dump.zig (its two readers, `restoredIndex`); the dump's bytes and layout unchanged and a name in this build's ring restored as before (restoredIndex's first loop is the old one), so a join or a restore within a build never reaches the new branches: no fuzz or soak Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- build/core.zig | 9 +- core/colors.zig | 167 +- core/dump.zig | 10 +- core/exec.zig | 7 + core/ninep/ctl.zig | 2 +- core/themes/seoul256.zig | 78 +- tools/gen_themes.zig | 12 +- vendor/themes/ayu.LICENSE | 21 - vendor/themes/ayu.json | 1228 --------------- vendor/themes/ayu_dark_helix.toml | 92 -- vendor/themes/base/ayu_dark_helix.toml | 92 ++ vendor/themes/base/hex_steel.toml | 127 ++ vendor/themes/base/nord_helix.toml | 199 +++ vendor/themes/base16_default_light.toml | 79 - vendor/themes/base16_terminal.toml | 55 - vendor/themes/base16_transparent.toml | 84 - vendor/themes/bogster_light.toml | 103 -- vendor/themes/cyan_light.toml | 5 - vendor/themes/eldritch_transparent.toml | 7 - vendor/themes/gruvbox-material.toml | 6 - vendor/themes/gruvbox.LICENSE | 21 - vendor/themes/gruvbox.json | 2539 ------------------------------- vendor/themes/hex_lavender.toml | 41 - vendor/themes/hex_poison.toml | 41 - vendor/themes/hex_steel.toml | 127 -- vendor/themes/ingrid.toml | 77 - vendor/themes/iroaseta.toml | 162 -- vendor/themes/nord_helix.toml | 199 --- vendor/themes/nord_light.toml | 90 -- vendor/themes/nyxvamp-transparent.toml | 54 - vendor/themes/peachpuff.toml | 66 - vendor/themes/seoul256-dark-hard.toml | 16 - vendor/themes/seoul256-dark-soft.toml | 15 - vendor/themes/seoul256-dark.toml | 161 -- vendor/themes/seoul256-light-hard.toml | 16 - vendor/themes/seoul256-light-soft.toml | 16 - vendor/themes/seoul256-light.toml | 51 - vendor/themes/term16_dark.toml | 80 - vendor/themes/term16_light.toml | 85 -- vendor/themes/tokyonight.toml | 136 -- vendor/themes/ttox.toml | 33 - vendor/themes/ttox_soft.toml | 37 - vendor/themes/vesper-transparent.toml | 25 - vendor/themes/zed_onedark.toml | 114 -- vendor/themes/zed_onelight.toml | 62 - 45 files changed, 575 insertions(+), 6072 deletions(-) delete mode 100644 vendor/themes/ayu.LICENSE delete mode 100644 vendor/themes/ayu.json delete mode 100644 vendor/themes/ayu_dark_helix.toml create mode 100644 vendor/themes/base/ayu_dark_helix.toml create mode 100644 vendor/themes/base/hex_steel.toml create mode 100644 vendor/themes/base/nord_helix.toml delete mode 100644 vendor/themes/base16_default_light.toml delete mode 100644 vendor/themes/base16_terminal.toml delete mode 100644 vendor/themes/base16_transparent.toml delete mode 100644 vendor/themes/bogster_light.toml delete mode 100644 vendor/themes/cyan_light.toml delete mode 100644 vendor/themes/eldritch_transparent.toml delete mode 100644 vendor/themes/gruvbox-material.toml delete mode 100644 vendor/themes/gruvbox.LICENSE delete mode 100644 vendor/themes/gruvbox.json delete mode 100644 vendor/themes/hex_lavender.toml delete mode 100644 vendor/themes/hex_poison.toml delete mode 100644 vendor/themes/hex_steel.toml delete mode 100644 vendor/themes/ingrid.toml delete mode 100644 vendor/themes/iroaseta.toml delete mode 100644 vendor/themes/nord_helix.toml delete mode 100644 vendor/themes/nord_light.toml delete mode 100644 vendor/themes/nyxvamp-transparent.toml delete mode 100644 vendor/themes/peachpuff.toml delete mode 100644 vendor/themes/seoul256-dark-hard.toml delete mode 100644 vendor/themes/seoul256-dark-soft.toml delete mode 100644 vendor/themes/seoul256-dark.toml delete mode 100644 vendor/themes/seoul256-light-hard.toml delete mode 100644 vendor/themes/seoul256-light-soft.toml delete mode 100644 vendor/themes/seoul256-light.toml delete mode 100644 vendor/themes/term16_dark.toml delete mode 100644 vendor/themes/term16_light.toml delete mode 100644 vendor/themes/tokyonight.toml delete mode 100644 vendor/themes/ttox.toml delete mode 100644 vendor/themes/ttox_soft.toml delete mode 100644 vendor/themes/vesper-transparent.toml delete mode 100644 vendor/themes/zed_onedark.toml delete mode 100644 vendor/themes/zed_onelight.toml (limited to 'core/colors.zig') diff --git a/build/core.zig b/build/core.zig index f9cb450f..c787fdc8 100644 --- a/build/core.zig +++ b/build/core.zig @@ -131,9 +131,11 @@ fn patchesHash(b: *std.Build, io: std.Io) u64 { return h; } -fn vendoredThemes(b: *std.Build, io: std.Io) []const []const u8 { +/// The theme sources in `sub` of vendor/themes, sorted: the ring's (`.`), +/// or the retired ones kept themes inherit from (`base`, read, never rung). +fn vendoredThemes(b: *std.Build, io: std.Io, sub: []const u8) []const []const u8 { var names: std.ArrayList([]const u8) = .empty; - var dir = b.root.root_dir.handle.openDir(io, "vendor/themes", .{ .iterate = true }) catch @panic("open vendor/themes"); + var dir = b.root.root_dir.handle.openDir(io, b.pathJoin(&.{ "vendor/themes", sub }), .{ .iterate = true }) catch @panic("open vendor/themes"); defer dir.close(io); var it = dir.iterate(); while (it.next(io) catch @panic("read vendor/themes")) |e| { @@ -161,7 +163,8 @@ pub fn generatedThemes(b: *std.Build, io: std.Io, target: std.Build.ResolvedTarg }); const run_theme_gen = b.addRunArtifact(theme_gen); const themes_out = run_theme_gen.addOutputDirectoryArg("themes"); - for (vendoredThemes(b, io)) |name| run_theme_gen.addFileArg(b.path(b.fmt("vendor/themes/{s}", .{name}))); + for (vendoredThemes(b, io, ".")) |name| run_theme_gen.addFileArg(b.path(b.fmt("vendor/themes/{s}", .{name}))); + for (vendoredThemes(b, io, "base")) |name| run_theme_gen.addPrefixedFileArg("base=", b.path(b.fmt("vendor/themes/base/{s}", .{name}))); return b.createModule(.{ .target = target, .optimize = optimize, diff --git a/core/colors.zig b/core/colors.zig index 9091760f..960123e2 100644 --- a/core/colors.zig +++ b/core/colors.zig @@ -1092,7 +1092,7 @@ 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 { @@ -1156,10 +1156,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); @@ -1271,6 +1267,71 @@ const theme_groups = [_]ThemeGroup{ /// 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); @@ -2030,11 +2091,10 @@ test "the picker's sections run in ring order and cover it" { 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, themes[first..][0..names.len]) |name, t| try std.testing.expectEqualStrings(name, t.name); @@ -2658,21 +2718,6 @@ fn ringFailures(th: *const Theme, c: *const Chrome, designed_here: bool) std.Enu 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 }{ - // 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" }, -}; - /// 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). @@ -2684,7 +2729,6 @@ test "every theme in the ring meets every floor pardes owns (DESIGN.md B4), nati 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. @@ -2707,24 +2751,17 @@ test "every theme in the ring meets every floor pardes owns (DESIGN.md B4), nati 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; {d} on the expected list\n", .{ passing, themes.len, ring_expected.len }); - try std.testing.expectEqual(0, wrong); + 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 @@ -2873,3 +2910,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/dump.zig b/core/dump.zig index 2dde9c8c..69eda35e 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; 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/ninep/ctl.zig b/core/ninep/ctl.zig index 2411b20f..80d1176c 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: "; diff --git a/core/themes/seoul256.zig b/core/themes/seoul256.zig index 0c4c17ab..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_