Files
kryon/docs
waozi d40967fc05 Add StyleTokenColor: read registered color tokens at runtime
The missing piece for migrating legacy theme getters: apps register named
color tokens through RegisterStylePackVariant, but nothing could read one back
outside the widget cascade. style_pack_source.kry now retains each pack's
token table (a flat 32x64 global; .kry has no nested fixed arrays) and exposes
StyleTokenColor(name) and StyleTokenColorOr(name, fallback) — declared in
style_pack_props — which read the active pack's table and unpack the u32
in-raylib byte order locally (no GetColor dependency, so the style suites link
without a backend).

Downstream, GetThemeBackground()/GetThemeText() calls become
StyleTokenColor("canvas")/StyleTokenColor("text") against the token names the
app already registers — the mechanical path B-001's deletion needs.

Two debugging notes recorded for the plan: an apostrophe in a top-level .kry
comment silently truncates parsing (the tokenizer swallows the rest of the
file as an unterminated char literal — keep prose out of top-level comments),
and nested fixed arrays are a hard parse error.

Gates: generated-runtime-parity-test, fast-test, style-pack-source/registry/
picker/release-startup suites, kss-host-ledger-check, kryon-boundary-check,
refreshed snapshots, plus a functional register/activate/read/fallback test.
2026-09-21 10:24:39 -03:00
..
2026-09-18 23:09:02 -03:00