# `mod theme` :::::{rust:module} paranoid_cli::theme :index: 0 :vis: pub ::: Shared ratatui theme module — the CLI/TUI half of the cross-surface token system defined in `docs/design/system.md`. Every color, spacing step, and status glyph the TUI renders traces back to a named token in `docs/design/system.md` §1-§5. Both `tui.rs` (the generator/audit TUI) and `vault_tui.rs` (the vault TUI) import from this module instead of defining their own `Color` constants — consolidating what were previously two duplicated (and, in `tui.rs`'s case, one off-palette) const blocks per `docs/design/system.md` §7. Naming mirrors the token table exactly: `color.bg.base` -> [`BG_BASE`], `color.status.verified` -> [`STATUS_VERIFIED`], and so on. Short aliases (`BG`, `PANEL`, `TEXT`, `GREEN`, `BLUE`, `AMBER`, `RED`) are kept so the existing call sites across both TUIs did not need to churn their bare identifiers; new code should prefer the intent-named constants. `docs/design/system.md` §7 flags a `PURPLE = #a78bfa` constant in the old `tui.rs` const block as off-palette — it maps to no token meaning and is deliberately not carried forward here. ::: :::{rust:use} paranoid_cli::theme :used_name: self ::: :::{rust:use} paranoid_cli :used_name: crate ::: :::{rust:use} ratatui::style::Color :used_name: Color ::: :::{rust:use} ratatui::style::Modifier :used_name: Modifier ::: :::{rust:use} ratatui::style::Style :used_name: Style ::: :::{rubric} Variables ::: ::::{rust:variable} paranoid_cli::theme::ACCENT_ACTION :index: 0 :vis: pub :toc: const ACCENT_ACTION :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ACCENT_ACTION"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.accent.action` — the one next thing to do. One per screen. ::: :::: ::::{rust:variable} paranoid_cli::theme::AMBER :index: 0 :vis: pub :toc: const AMBER :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"AMBER"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::ANSI_ACCENT_ACTION :index: 0 :vis: pub :toc: const ANSI_ACCENT_ACTION :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ANSI_ACCENT_ACTION"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.accent.action` 16-ANSI fallback — bright-blue (12). ::: :::: ::::{rust:variable} paranoid_cli::theme::ANSI_STATUS_CAUTION :index: 0 :vis: pub :toc: const ANSI_STATUS_CAUTION :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ANSI_STATUS_CAUTION"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.status.caution` 16-ANSI fallback — yellow (3). ::: :::: ::::{rust:variable} paranoid_cli::theme::ANSI_STATUS_DANGER :index: 0 :vis: pub :toc: const ANSI_STATUS_DANGER :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ANSI_STATUS_DANGER"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.status.danger` 16-ANSI fallback — red (1). ::: :::: ::::{rust:variable} paranoid_cli::theme::ANSI_STATUS_VERIFIED :index: 0 :vis: pub :toc: const ANSI_STATUS_VERIFIED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ANSI_STATUS_VERIFIED"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.status.verified` 16-ANSI fallback — green (2). ::: :::: ::::{rust:variable} paranoid_cli::theme::ANSI_TEXT_MUTED :index: 0 :vis: pub :toc: const ANSI_TEXT_MUTED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ANSI_TEXT_MUTED"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.text.muted` 16-ANSI fallback — bright-black (8). ::: :::: ::::{rust:variable} paranoid_cli::theme::BG :index: 0 :vis: pub :toc: const BG :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"BG"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::BG_BASE :index: 0 :vis: pub :toc: const BG_BASE :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"BG_BASE"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.bg.base` — the ground. Near-black, low-glare; the whole surface. ::: :::: ::::{rust:variable} paranoid_cli::theme::BG_PANEL :index: 0 :vis: pub :toc: const BG_PANEL :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"BG_PANEL"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.bg.panel` — a raised panel or focused region. ::: :::: ::::{rust:variable} paranoid_cli::theme::BLUE :index: 0 :vis: pub :toc: const BLUE :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"BLUE"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::BORDER :index: 0 :vis: pub :toc: const BORDER :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"BORDER"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.border` — structure and separation between regions. ::: :::: ::::{rust:variable} paranoid_cli::theme::GREEN :index: 0 :vis: pub :toc: const GREEN :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"GREEN"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::ICON_ACTION :index: 0 :vis: pub :toc: const ICON_ACTION :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ICON_ACTION"},{"type":"punctuation","value":": "},{"type":"punctuation","value":"&"},{"type":"link","value":"str","target":"str"}] ::: `▸` the one next action. ::: :::: ::::{rust:variable} paranoid_cli::theme::ICON_CAUTION :index: 0 :vis: pub :toc: const ICON_CAUTION :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ICON_CAUTION"},{"type":"punctuation","value":": "},{"type":"punctuation","value":"&"},{"type":"link","value":"str","target":"str"}] ::: `!` attention / unverified. ::: :::: ::::{rust:variable} paranoid_cli::theme::ICON_DANGER :index: 0 :vis: pub :toc: const ICON_DANGER :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ICON_DANGER"},{"type":"punctuation","value":": "},{"type":"punctuation","value":"&"},{"type":"link","value":"str","target":"str"}] ::: `✗` failed / danger. ::: :::: ::::{rust:variable} paranoid_cli::theme::ICON_DRILL_DOWN :index: 0 :vis: pub :toc: const ICON_DRILL_DOWN :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ICON_DRILL_DOWN"},{"type":"punctuation","value":": "},{"type":"punctuation","value":"&"},{"type":"link","value":"str","target":"str"}] ::: `⋯` drill into evidence / progressive disclosure. ::: :::: ::::{rust:variable} paranoid_cli::theme::ICON_LOCKED :index: 0 :vis: pub :toc: const ICON_LOCKED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ICON_LOCKED"},{"type":"punctuation","value":": "},{"type":"punctuation","value":"&"},{"type":"link","value":"str","target":"str"}] ::: `⊘` locked — pairs with `color.text.muted`, never danger red (a locked vault is the safe state, not a failure). ::: :::: ::::{rust:variable} paranoid_cli::theme::ICON_VERIFIED :index: 0 :vis: pub :toc: const ICON_VERIFIED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"ICON_VERIFIED"},{"type":"punctuation","value":": "},{"type":"punctuation","value":"&"},{"type":"link","value":"str","target":"str"}] ::: `✓` verified / passed. ::: :::: ::::{rust:variable} paranoid_cli::theme::PANEL :index: 0 :vis: pub :toc: const PANEL :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"PANEL"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::RED :index: 0 :vis: pub :toc: const RED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"RED"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::SPACE_BASE :index: 0 :vis: pub :toc: const SPACE_BASE :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"SPACE_BASE"},{"type":"punctuation","value":": "},{"type":"link","value":"u16","target":"u16"}] ::: `space.base` — between groups; default panel padding. ::: :::: ::::{rust:variable} paranoid_cli::theme::SPACE_LOOSE :index: 0 :vis: pub :toc: const SPACE_LOOSE :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"SPACE_LOOSE"},{"type":"punctuation","value":": "},{"type":"link","value":"u16","target":"u16"}] ::: `space.loose` — between major regions; around the primary action. ::: :::: ::::{rust:variable} paranoid_cli::theme::SPACE_SNUG :index: 0 :vis: pub :toc: const SPACE_SNUG :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"SPACE_SNUG"},{"type":"punctuation","value":": "},{"type":"link","value":"u16","target":"u16"}] ::: `space.snug` — between stacked lines in a group. ::: :::: ::::{rust:variable} paranoid_cli::theme::SPACE_TIGHT :index: 0 :vis: pub :toc: const SPACE_TIGHT :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"SPACE_TIGHT"},{"type":"punctuation","value":": "},{"type":"link","value":"u16","target":"u16"}] ::: `space.tight` — between a label and its value; intra-row. ::: :::: ::::{rust:variable} paranoid_cli::theme::STATUS_CAUTION :index: 0 :vis: pub :toc: const STATUS_CAUTION :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"STATUS_CAUTION"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.status.caution` — attention / unverified / in-between. ::: :::: ::::{rust:variable} paranoid_cli::theme::STATUS_DANGER :index: 0 :vis: pub :toc: const STATUS_DANGER :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"STATUS_DANGER"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.status.danger` — danger / failure / irreversible. A stop, never decoration. ::: :::: ::::{rust:variable} paranoid_cli::theme::STATUS_VERIFIED :index: 0 :vis: pub :toc: const STATUS_VERIFIED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"STATUS_VERIFIED"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.status.verified` — verified / safe / passed. Earned only after a real check; never a default "all fine" wash. ::: :::: ::::{rust:variable} paranoid_cli::theme::TEXT :index: 0 :vis: pub :toc: const TEXT :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TEXT"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: ::: :::: ::::{rust:variable} paranoid_cli::theme::TEXT_MUTED :index: 0 :vis: pub :toc: const TEXT_MUTED :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TEXT_MUTED"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.text.muted` — secondary text, labels, footer keys, hints. ::: :::: ::::{rust:variable} paranoid_cli::theme::TEXT_PRIMARY :index: 0 :vis: pub :toc: const TEXT_PRIMARY :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TEXT_PRIMARY"},{"type":"punctuation","value":": "},{"type":"link","value":"Color","target":"Color"}] ::: `color.text.primary` — primary reading text. ::: :::: ::::{rust:variable} paranoid_cli::theme::TYPE_BODY :index: 0 :vis: pub :toc: const TYPE_BODY :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TYPE_BODY"},{"type":"punctuation","value":": "},{"type":"link","value":"Modifier","target":"Modifier"}] ::: `type.body` — primary content and reading text (no modifier). ::: :::: ::::{rust:variable} paranoid_cli::theme::TYPE_LABEL :index: 0 :vis: pub :toc: const TYPE_LABEL :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TYPE_LABEL"},{"type":"punctuation","value":": "},{"type":"link","value":"Modifier","target":"Modifier"}] ::: `type.label` — field labels, footer keys, hints. ::: :::: ::::{rust:variable} paranoid_cli::theme::TYPE_MONO :index: 0 :vis: pub :toc: const TYPE_MONO :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TYPE_MONO"},{"type":"punctuation","value":": "},{"type":"link","value":"Modifier","target":"Modifier"}] ::: `type.mono` — secrets, hashes, phrases, generated passwords. The terminal's cell font is implicitly monospace; no modifier is needed, but the constant documents the mapping so call sites can name the intent. ::: :::: ::::{rust:variable} paranoid_cli::theme::TYPE_TITLE :index: 0 :vis: pub :toc: const TYPE_TITLE :layout: [{"type":"keyword","value":"const"},{"type":"space"},{"type":"name","value":"TYPE_TITLE"},{"type":"punctuation","value":": "},{"type":"link","value":"Modifier","target":"Modifier"}] ::: `type.title` — screen title, one per screen, states its one job. ::: :::: :::{rubric} Functions ::: ::::{rust:function} paranoid_cli::theme::accent_action :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"accent_action"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for the single primary action on a screen: `color.accent.action`, bold (docs/design/system.md §4.2). Exactly one element per screen may use this. ::: :::: ::::{rust:function} paranoid_cli::theme::base :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"base"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Base ground style: `color.bg.base` background. ::: :::: ::::{rust:function} paranoid_cli::theme::body :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"body"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for primary reading text: `color.text.primary`. ::: :::: ::::{rust:function} paranoid_cli::theme::caution :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"caution"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for attention/unverified status text: `color.status.caution`. ::: :::: ::::{rust:function} paranoid_cli::theme::danger :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"danger"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for failed/danger status text: `color.status.danger`, bold. ::: :::: ::::{rust:function} paranoid_cli::theme::locked :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"locked"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for locked state: `color.text.muted` — deliberately not danger red, since locking is the safe state (docs/design/system.md §4.4). ::: :::: ::::{rust:function} paranoid_cli::theme::muted :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"muted"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for muted/secondary text: `color.text.muted`, dim. ::: :::: ::::{rust:function} paranoid_cli::theme::panel :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"panel"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Base panel style: `color.bg.panel` background, `color.text.primary` foreground (docs/design/system.md §4.1). ::: :::: ::::{rust:function} paranoid_cli::theme::verified :index: 0 :vis: pub :layout: [{"type":"keyword","value":"fn"},{"type":"space"},{"type":"name","value":"verified"},{"type":"punctuation","value":"("},{"type":"punctuation","value":")"},{"type":"space"},{"type":"returns"},{"type":"space"},{"type":"link","value":"Style","target":"Style"}] ::: Style for verified/passed status text: `color.status.verified`, bold. ::: :::: :::::