summaryrefslogtreecommitdiff
path: root/src/themes/lapis.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 06:04:28 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit09ec515c5e94de741104038cd61f18b2b997e78c (patch)
tree4a7910c76c650df1695c4e3327538bfd8f68f493 /src/themes/lapis.zig
parent4452a8f467765cbfa0dd0444a9bf416ac8bd0bf5 (diff)
downloadpardes-09ec515c5e94de741104038cd61f18b2b997e78c.tar.gz
pardes-09ec515c5e94de741104038cd61f18b2b997e78c.zip
G5: lapis, 0x4200.cafe's manuscript, as a theme with its ornament
A native theme `lapis` (src/themes/lapis.zig) from web/theme/lapis.css: a lapis-deep page, lapis tags with gold names, vellum text, vermilion rubrics, gold rules and a vermilion tag rule, gold selection in lapis ink. Its ornament is the theme's new `decor` (colors.Decor), drawn by a pixel shell inside the chrome it already has (decision 1), all of it off every focus indicator: - page_dots: the site's gold dot grid (#e8c46a22, 22 px), drawn by the cell shader on page-coloured cells alone (flag 0x10000000), so it lies under the text and never under a selection, a tag or the cursor; fixed to the window, a page the panes lie on. - rail_checker: the dither frame's gold and lapis checker in the scroll track (a decor kind, flag 0x08000000), anchored to its rail; the thumb stays solid gold. - tag plaques (tag_border, tag_shadow, tag_stripe): every tag a raised plaque inside its own band, the site's trail: a 2px gold frame and a hard 5px vermilion shadow down and right, both within the band's rows and columns (down, what the slack under the text leaves), so no shadow reaches a body, a grip or the next pane. The focused pane's plaque is the code window's title bar, gold and lapis stripes of 2px, its words on plates of the focused ground; unfocused ones are plain; column and workspace tags take the object-label language (1px frame, 2px shadow toward the page). Drawn as decor under the cells (a group's under range), with blank tag cells see-through and the cells blended premultiplied (pipeline_over) on such frames; opaque windows only. - title_shadow: the titles' vermilion offset shadow under a file name's letters, sampled in the cell shader inside the letters' own cells (flag 0x08000000), none on a cursor. Chrome carries the decor (decor_*, name_ink, active_name_ink); a theme file folds a nested decor literal field by field. Left out, with why, in docs/effects.md: the fonts, the ornaments, a decor crossfade, and in the tty anything but the colours (a tag row has no spare cell for a shadow). An empty column is the page. The effect id is masked to 27 bits (ui.vert/ui.frag) for the fifth flag. Tests: the cell flags land only on page ground and file-name cells, never a cursor, nothing without decor; lapis's plaques stay inside their tag's band, clear of every grip, only the focused one striped; its checker is in the track; no other theme draws any; the separator and focus tests cover lapis. Goldens: theme and themesel (the ring gains lapis after acme). Gates as G4. Feel review: .scratch/render/lapis/ (lapis.png, lapis-2x.png, tags-focused-vs-unfocused-2x.png, a PanelSlide at 60 fps and a quarter).
Diffstat (limited to 'src/themes/lapis.zig')
-rw-r--r--src/themes/lapis.zig92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/themes/lapis.zig b/src/themes/lapis.zig
new file mode 100644
index 00000000..46623fc2
--- /dev/null
+++ b/src/themes/lapis.zig
@@ -0,0 +1,92 @@
+//! Lapis: 0x4200.cafe's illuminated manuscript (web/theme/lapis.css) as a
+//! pardes theme. Ultramarine vellum, gold leaf and vermilion rubrics: the
+//! page is lapis-deep, the tags lapis with their names in gold, the text
+//! vellum. The site's ornament comes with it as the theme's `decor`, drawn
+//! inside the existing chrome (docs/render-pipeline.md ยง10, decision 1):
+//! a gold dot grid on the page under the pane bodies, a gold and lapis
+//! checker in the scroll column, every tag a gold-framed plaque with the
+//! trail's hard vermilion shadow (inside its own band: in a tiled layout a
+//! shadow past it would fall on the next pane or its grip, and no ornament
+//! may cover a focus indicator), the focused one striped like the code
+//! window's title bar, and the file name's vermilion offset shadow.
+pub const theme = .{
+ .name = "lapis",
+ // --lapis-deep, --vellum
+ .bg = .{ 0x0a, 0x10, 0x30 },
+ .fg = .{ 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 },
+ // --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 },
+ // 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 },
+ // 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 },
+ .comment = .{ 0x9a, 0xa6, 0xd9 },
+ .lineno = .{ 0x5a, 0x6a, 0xa8 },
+ .lineno_active = .{ 0x6a, 0x7a, 0xb8 },
+ // --lapis-ink under a gold thumb (the page's scrollbar-color).
+ .scroll_track = .{ 0x05, 0x0a, 0x24 },
+ .scroll_thumb = .{ 0xe8, 0xc4, 0x6a },
+ // Gold rules, a vermilion hairline between a tag and its text.
+ .border = .{ 0xe8, 0xc4, 0x6a },
+ // An empty column is the page, not a slab of gold leaf.
+ .empty_col = .{ 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 },
+ .decor = .{
+ .page_dots = .{ 0xe8, 0xc4, 0x6a },
+ // #e8c46a22 on the site: a dot a pixel and a half across every 22.
+ .page_dot_alpha = 0x22,
+ .page_dot_px = 22,
+ .rail_checker = .{ 0xe8, 0xc4, 0x6a },
+ .rail_checker_px = 3,
+ // The trail: a 2px gold frame and a 5px vermilion shadow; the code
+ // window's title bar: gold and lapis stripes of 2px.
+ .tag_border = .{ 0xe8, 0xc4, 0x6a },
+ .tag_border_px = 2,
+ .tag_shadow = .{ 0xd4, 0x41, 0x2f },
+ .tag_shadow_px = 5,
+ .tag_stripe = .{ 0xe8, 0xc4, 0x6a },
+ .tag_stripe_px = 2,
+ .title_shadow = .{ 0xd4, 0x41, 0x2f },
+ .title_shadow_px = 2,
+ },
+ .palette = .{
+ .{ 0x0a, 0x10, 0x30 },
+ .{ 0xff, 0x6a, 0x4a },
+ .{ 0xa8, 0xe0, 0xc0 },
+ .{ 0xe8, 0xc4, 0x6a },
+ .{ 0x9a, 0xc6, 0xff },
+ .{ 0xd8, 0xa0, 0xe8 },
+ .{ 0x8a, 0xd8, 0xd8 },
+ .{ 0xee, 0xe6, 0xd2 },
+ .{ 0x9a, 0xa6, 0xd9 },
+ .{ 0xff, 0x9a, 0x6a },
+ .{ 0xc8, 0xf0, 0xd8 },
+ .{ 0xff, 0xde, 0x90 },
+ .{ 0xc0, 0xdc, 0xff },
+ .{ 0xe8, 0xc0, 0xf4 },
+ .{ 0xb0, 0xec, 0xec },
+ .{ 0xff, 0xf8, 0xe8 },
+ },
+};