Skip to content

project themes

Aisjam edited this page Nov 15, 2026 · 1 revision

Themes and semantic colours

Home · Section index

Working manual · 0.0.1-alpha · source snapshot 16 November 2026

Contour, Theme Edit and Glyph Editor share exactly 32 semantic colour roles. src/core/theme/ThemeColours.inc is the authoritative ordered definition of IDs, names, groups and Shiro RGB defaults. It generates ThemeColour, Theme members and ThemeFields metadata. Both editors use this metadata for palette order, group headings and navigation. ThemeManager owns the live theme; colours resolve at draw time, so switching themes updates open scenes and previews without changing artwork or musical data. SDL conversion stays in the rendering boundary.

Theme colours describe semantic UI roles. UI code asks for a semantic role rather than assuming a particular hue. Flash means urgent feedback; it need not be red. The expressive pairs define each theme's identity independently of text.

Group Role Intended purpose
SURFACES background Deepest canvas, scene background, beneath panels
surface Normal working panels, editors, menus and control groups
surfaceRaised Floating menus, dialogs, inspectors and raised panels
COLOURS core Primary theme identity and strong identity accents
coreSecondary Less prominent companion to core
signal Information, secondary musical data and signal indicators
signalSecondary Less prominent companion to signal
pulse Activity, rhythm, constructive and positive feedback
pulseSecondary Less prominent companion to pulse
flash Warnings, errors, recording and immediate high-attention feedback
flashSecondary Less prominent companion to flash
tone Tonal colour and expressive artwork accents
toneSecondary Less prominent companion to tone
shadow Depth, recessed areas and darkening; always 30% alpha
TEXT textPrimary Normal interface text
textSecondary Supporting labels and information
textMuted Metadata, hints, units and low-priority text
textSelected Text inside user-selected fills
textInverse Text over bright surfaces where normal text loses contrast
textDisabled Text of unavailable controls
DISABLED disabled Unavailable control foreground
disabledSurface Unavailable normal surface
disabledRaised Unavailable raised surface
INTERACTION cursor Position where the next edit occurs
selected Deliberately chosen item, note, row or selection region
focus Editor, pane, track or control group that owns input
marker Persistent positional reference, bookmark, cue or edit anchor
TIMELINE beat Normal rhythmic division and beat feedback
accent Downbeat, bar start, pattern boundary or musical emphasis
playhead Current playback position
highlight Temporary system emphasis: sounding note, trigger or changed value
meter Continuously changing level, resource usage or progress

Keep these distinctions: cursor != selected, selected != highlight, cursor != playhead, marker != playhead, focus != selected, and textMuted != disabled. Disabled means unavailable; textMuted also represents inactive previews and onion skins. Modulation shading uses signalSecondary with its existing envelope fill opacity. Raised surfaces use value differences in this flat UI.

Status types do not consume palette slots. dialogStatusRole maps Info to signal, Note to core, Tip/Success to pulse and Warning/Error to flash. Wording, icons and context distinguish warning from error. These mappings are code, never theme data. Default dialog text and status button outlines choose the higher-contrast textPrimary/textInverse at render time; explicit caller text roles and overrides remain authoritative.

Shadow alpha

Every use of shadow, including dialogs, keyboard panels, palette swatches and CONTCII drop shadows, uses 30% alpha, represented as 77/255 (nearest byte). Themes may edit its RGB only. Theme::colour(Shadow) enforces the fixed alpha; the serializer rejects any other stored shadow alpha. Dialog shadow overrides also use the fixed alpha. Never multiply it by another stored shadow alpha or by an onion-skin opacity. Glyph rendering respects semantic alpha in every preview.

Tone and Tone Secondary replace the removed Ghost and Overlay roles. The palette remains at 32 entries; both new roles are in COLOURS. CTT v5 marks this required-field change. Older custom themes must be reauthored; bundled themes are updated during staging. CTG semantic names stay explicit: ghost and overlay are rejected, not remapped.

Bundled palettes and editing

Asset/Theme supplies Shiro, Light, Dark, PETSCII, Aizome, Beni, Matcha, Shikkoku, Ume, Washi and Drumming Sitar in the new format. Palettes retain their surfaces and identity while shifting positive feedback to pulse and urgent feedback to flash. Cursor, selection, focus, marker and playhead have distinct values. Shiro's compiled defaults match its bundled file. Bundled normal/selected text and automatic status text meet 4.5:1 contrast; muted and disabled text meet 3:1 on their working surfaces. Tests enforce these checks.

Theme Edit exposes all 32 RGB entries in six groups. Shadow alpha remains fixed; other alpha values are preserved. START applies, B cancels, Y/SAVE persists through the existing atomic save workflow. Glyph Editor's palette, context viewer, animation previews and saved semantic inks use the same definitions. Onion skins use textMuted; explicit selection uses selected; the current edit cell uses cursor.

Build asset staging replaces obsolete bundled-name runtime CTT files with the new bundled versions. Current v5 user edits are preserved. User-created old files with other names remain untouched and fail clearly if loaded.

Two-colour diagnostic palettes

z_Black on White and z_White on Black are selectable bundled themes for minimal styling and checking readability without colour cues. Following the surface/foreground arrangement of z_DMG, they reduce all 32 roles to pure black and white: surfaces and inverse/selected text use the background colour; all foregrounds, including secondary, muted, disabled and interaction roles, use the opposite colour. The two palettes are exact RGB inverses.

These palettes intentionally share colours across semantic roles, exempting them from the normal bundled-palette requirement for distinct interaction colours. Role identities remain separate. Labels, shapes, outlines, placement and motion must carry distinctions; any ambiguous or disappearing state is a useful visual test finding. Check cursor, selection, focus, playback, menus and disabled controls in both themes. This is a two-colour palette, not a one-bit rendering mode: the fixed 77/255 shadow and existing transparency effects can produce grey pixels.

What should be here

Documentation still to add
Annotated current-build screenshots and a recorded controller walkthrough for this topic.

Evidence and verification

Repository sources used for this page:

  • docs/themes.md

This is a documentation/source review, not a new runtime or hardware test. Physical response, screenshots and listening examples still need verification on a recorded build.

Clone this wiki locally