palette: give the spectral mid and the envelope trace their own roles
Decouples the keyboard strip's mid stop from accent/secondary, which the deep-teal darkening had inverted. Adds overlay/trace (#816AA6), the first value to clear 3:1 against the waveform. Replaces the frozen-premise test.
This commit is contained in:
+10
-8
@@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
// theme — the palette + type-scale core of the shared drawing kit: a ROLE-based color model
|
||||
// (bg/base, bg/panel, bg/cell, line/hairline, text/primary, text/dim, accent/primary,
|
||||
// accent/secondary, accent/tertiary, accent/hot, warn), an interaction-state model
|
||||
// (rest/hover/active/pressed/dragging/focus/disabled), and the WCAG contrast math that lets a
|
||||
// unit test prove every text-on-surface pair clears its floor.
|
||||
// accent/secondary, accent/tertiary, accent/hot, overlay/trace, warn), an interaction-state
|
||||
// model (rest/hover/active/pressed/dragging/focus/disabled), and the WCAG contrast math that
|
||||
// lets a unit test prove every text-on-surface pair clears its floor.
|
||||
//
|
||||
// Every role color is produced by roleColor() from ONE direction constants block (theme.cpp) —
|
||||
// the single point of change; no shell hardcodes a color, it asks by role. The spectral hue ramp
|
||||
// (spectralColor) lives here too so the keyboard strip derives its per-note hue from the same
|
||||
// source, anchored on the three accents (primary -> secondary -> tertiary).
|
||||
// source.
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
@@ -36,9 +36,11 @@ enum class Role {
|
||||
TextPrimary, // labels, values
|
||||
TextDim, // secondary / units
|
||||
AccentPrimary, // live / active / selected — where the punch lives (pastel lime)
|
||||
AccentSecondary,// categorical role A (pastel teal) — a distinct KIND, never intensity
|
||||
AccentSecondary,// categorical role A (deep teal) — a distinct KIND, never intensity
|
||||
AccentTertiary,// categorical role B (pastel purple) — a distinct KIND, never intensity
|
||||
AccentHot, // hover / live / drag feedback (a brighter tint OF the primary accent)
|
||||
OverlayTrace, // a line/handle traced OVER an accent fill — reads against the fill AND the
|
||||
// surface behind it, which no accent role can do (they are all too light)
|
||||
Warn, // clip / destructive (prune, delete) — reserved for byte-deleting states
|
||||
};
|
||||
|
||||
@@ -70,9 +72,9 @@ KitColor roleColor(Role role);
|
||||
KitColor roleColorState(Role role, InteractionState state);
|
||||
|
||||
// Spectral hue ramp for the keyboard strip: maps normalized position t in [0, 1] (low note ->
|
||||
// high note) through accent/primary (low) -> accent/secondary (mid) -> accent/tertiary (high),
|
||||
// so the strip reads as an extension of the accent system rather than a separate flourish.
|
||||
// t is clamped to [0, 1].
|
||||
// high note) through a pastel lime -> teal -> purple arc, so the strip reads as part of the
|
||||
// palette rather than a separate flourish. The arc is its own three stops — a categorical
|
||||
// accent move must not be able to reorder it. t is clamped to [0, 1].
|
||||
KitColor spectralColor(double t);
|
||||
|
||||
// --- WCAG contrast (the "punch" rule, made testable) --------------------------
|
||||
|
||||
Reference in New Issue
Block a user