lcars_theme.sg ships the LCARS (Library Computer Access/Retrieval System) UI skin for Lumen WM — the Star Trek aesthetic as a fully-integrated sigilOS theme. 7 palette colors, 5 geometry primitives, and bitmap text labels via glyph.sg. Both GPU-first (gpu_submit; silicon-pending) and software-2D fallback paths are present. LCARS-PASS + LCARS-LABEL-PASS on x86. (sigil-video d1faa81, 3b57ba3)
The LCARS palette
Commit d1faa81 defines 7 compile-time palette constants via the Lumen theme token system:
| Token | Role |
|---|---|
lcars_orange() | Title bar color — the defining LCARS stripe |
lcars_gold() | Bottom sidebar section accent |
lcars_tan() | Panel fill — large content area background |
lcars_blue() | Section accent |
lcars_purple() | Secondary accent |
lcars_black() | Background / corner cutout |
lcars_ltblue() | Light blue highlight |
All values are compile-time constants. The theme token system means Lumen apps reference lcars_orange() symbolically — no magic numbers, no runtime palette lookup.
5 geometry primitives
The LCARS visual language is built from a small set of shapes: filled rectangles, rounded bars, and the signature elbow with its inner corner cutout. lcars_theme.sg delivers all of them:
lcars_fill_rect(x,y,w,h,color) — rectangle fill. GPU path: gpu_submit rect-fill CAP_ACCEL. Software-2D: fill_span loops.lcars_fill_circle(cx,cy,r,color) — solid filled circle for rounded bar caps.lcars_fill_qcircle_br(cx,cy,r,color) — bottom-right quarter-circle for inner corner cutouts. The characteristic "bitten corner" of the LCARS elbow.lcars_hbar(x,y,w,h,color) — horizontal pill bar: rectangle body + left semicircle cap.lcars_elbow(x,y,w,h,color) — L-shaped bar with rounded inner corner cutout. The LCARS signature shape — the structural element that defines the aesthetic.The lcars_panel_header(x,y,w,fh,hh,sw) function composes these primitives into a full-width header bar with a 3-color sidebar stack: orange top section, tan mid section, gold bottom section.
lcars_label() — bitmap text
Commit 3b57ba3 adds lcars_label(): up to 8 ASCII characters rendered as 8×16 bitmap glyphs in any LCARS palette color.
The implementation uses glyph.sg gch() for 1-bit glyph extraction. GPU path: identical to lcars_fill_rect — gpu_submit (silicon-pending bind at kernel integration; no code change needed). Software-2D fallback: gch() MSB-first 1-bit blit, scales with cpuaccel fill_span.
The label test populates an 'L' atlas (all 16 rows = 0xFF for a fully-lit glyph block), draws a tan panel bar, then renders "LCARS" at coordinates (8, 20) in lcars_orange(). The pixel oracle checks two things:
- Lit glyph pixel =
lcars_orange()— confirmed - Tan bar pixel =
lcars_tan()— confirmed
Result: LCARS-LABEL-PASS glyph=ok bar=ok.
GPU-first pattern
Every primitive follows the standing GPU-first / software-2D-floor rule. GPU path calls gpu_submit with the appropriate CAP_ACCEL command — the silicon bind happens at kernel integration and requires no code change in lcars_theme.sg. The software-2D fallback is always present for the Pi 3 / 1 GB floor. One HAL, two backends.
lcars_fill_rect(x,y,w,h,color)
├── GPU path → gpu_submit(rect-fill, CAP_ACCEL) # silicon-pending
└── SW-2D → fill_span loop (Pi 3 floor)
The same structure applies to lcars_fill_circle, lcars_fill_qcircle_br, lcars_hbar, lcars_elbow, and lcars_label. No primitive is GPU-only; every primitive has a tested software fallback.
LCARS-PASS oracle
The acceptance test runs on a 160×120 framebuffer. lcars_panel_header(hh=20, sw=32) is called, then pixel oracles check 6 zones:
| Zone | Expected color | Result |
|---|---|---|
| Orange header stripe | lcars_orange() | ok |
| Tan panel fill | lcars_tan() | ok |
| Gold sidebar bottom | lcars_gold() | ok |
| Blue section accent | lcars_blue() | ok |
| Untouched content area | background | ok |
| Black quarter-circle corner cutout | lcars_black() | ok |
All 6 zones verified. LCARS-PASS x86.