summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/colors.zig167
-rw-r--r--core/dump.zig10
-rw-r--r--core/exec.zig7
-rw-r--r--core/ninep/ctl.zig2
-rw-r--r--core/themes/seoul256.zig78
5 files changed, 142 insertions, 122 deletions
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_<style>_<level>). Every value is the original's own,
+//! can draw it: its dark style at each of its backgrounds 233 to 237 and its
+//! light one at 254 to 256, a theme each (`dark`, `light`; colors.zig rings
+//! them as seoul256_<style>_<level>; 238, 239, 252 and 253 retired, DESIGN.md
+//! E: their text leaves the hits no room). Every value is the original's own,
//! cited on its line (path:line key), once for the family: a value every
//! level shares where it is set below, one a level changes in that level's
//! row of `dark_levels` or `light_levels`, with what pardes adjusted there.
@@ -63,36 +64,7 @@
//! - 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, light_255, light_256: focused grip #4b6465 -> #213839: 1.53:1 on the focused tag, now 3.00:1 (R6: 3:1)
//! - light_254: unsaved grip #719cdf -> #0b326c: 1.98:1 on the tag, now 8.82:1 (R6: 3:1 on both tags)
//! - light_254: selection #bcdede -> #b7d8d8: 1.18:1 off the page, now 1.25:1 (R7)
//! - light_254: selection text #616161 -> #5a5a5a: 4.08:1 on the selection, now 4.54:1 (R7: 4.5:1)
@@ -170,28 +142,6 @@ const dark_levels = [_]Dark{
// 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, .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, .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, .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.
@@ -204,24 +154,6 @@ const Light = struct {
};
const light_levels = [_]Light{
- // 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, .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, .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