summaryrefslogtreecommitdiff
path: root/src/themes/helix.zig
blob: db51de3ab93adbd1378960b377510a16769268af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! Copied off the helix the user actually runs: config.toml says
//! theme = "pardes", i.e. ~/.config/helix/themes/pardes.toml. Every value below
//! was then PINNED against a real `hx sample.zig` render captured through a
//! pty, not read off the TOML and hoped for — the SGR runs were 48;2;8;8;8
//! page, 38;2;189;189;189 text, 38;2;98;98;98 line numbers, 1;38;2;207;135;232
//! keywords, 38;2;227;199;138 strings AND numeric constants, 38;2;255;255;255
//! comments. `zig build snap` holds them there (test/snapshots/theme.snap), so
//! these fifteen numbers are a golden and not taste.
//!
//! "dark and minimal" is the half that is not a table. That theme sets no
//! ui.statusline at all, so helix paints its status row in the page's own
//! colors: in the capture, rows 8..23 carry one unbroken 48;2;8;8;8 run and the
//! statusline is told apart from the file by its words alone. pardes cannot go
//! quite that far — its tag bar is a click target and the gutter is a drag
//! handle — so chrome lifts by the smallest honest step instead: the theme's
//! greys are all xterm grayscale-ramp entries (232 #080808, 241 #626262,
//! 246 #949494, 250 #bdbdbd), so the chrome takes ramp entries too — 233
//! #121212 for the bars, 238 #444444 for the thumb, 235 #262626 for an
//! unfocused box. No hue anywhere outside the syntax colors.
//!
//! The selection pair is the one thing not in that capture, because the capture
//! has nothing selected in it: it is pardes.toml's own
//! `"ui.selection" = { bg = "#80a0ff" }`, verbatim. helix names no foreground
//! there — it tints the cell and lets the syntax colour ride, which at #bdbdbd
//! on #80a0ff is not something to copy — so the ink is the page's own
//! near-black, the other end of the theme's own two extremes.
//!
//! Shape: bg/fg are explicit rather than null, because "just really dark" must
//! not depend on whose terminal it lands in — but `palette` stays null so a
//! shell's ANSI indices still resolve to the host's own 16 colors. helix does
//! the same: it dresses the page it draws and leaves the colors a program emits
//! alone. Only acme, which has to stay readable on yellow, resolves the palette
//! itself.
//!
//! No imports, and neither has any other theme file: a theme is DATA. The
//! `.{...}` becomes a pardes.Theme in colors.zig's `fold`, which is also what
//! 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 },
    .box = .{ 0x62, 0x62, 0x62 },
    .box_dim = .{ 0x26, 0x26, 0x26 },
    .kw = .{ 0xd7, 0x76, 0xf9 },
    .str = .{ 0xf3, 0xcd, 0x7a },
    .num = .{ 0xf3, 0xcd, 0x7a },
    .comment = .{ 0xff, 0xff, 0xff },
    .lineno = .{ 0x62, 0x62, 0x62 },
    .scroll_track = .{ 0x12, 0x12, 0x12 },
    .scroll_thumb = .{ 0x44, 0x44, 0x44 },
    .palette = null,
};