Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
C# audioaudio-unitavaloniacpp20cross-platformdawdigital-audio-workstationdspjucelinux-audiomcp-servermidimusicmusic-productionpiano-rollplugin-hostsequencersynthesizervstvst3
(feat) Choose the accent colour in Settings → Appearance (#311) (#524)
Egor Khindikayneneb00b3e0c046
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4e919e39..c615bfaf 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -22,6 +22,15 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.## [Unreleased]+### Added+- **Choose the accent colour** (#311): Settings → Appearance → Accent replaces the orange of+ everything live or chosen — the playhead, the loop, selection, toggles that are on, the+ play key, menu hover — with one of seven presets (Orange, Lime, Aqua, Sky, Violet,+ Magenta, Pink) or your own colour, picked in a colour picker with a hex field. The accent+ applies at once, in every theme, tuned to each so it stays readable; a colour that would+ be confused with the record red, mute, solo or the meter green, or a grey, is explained+ and not applied. Nota Remote follows. Orange looks exactly as before.+### Fixed- **Default Projects/Samples folders follow the OS locations** (#522): the browser andsave dialogs no longer default to hardcoded `~/Documents/Nota Projects` anddiff --git a/DESIGN.md b/DESIGN.mdindex 40eb9128..0b7570f0 100644--- a/DESIGN.md+++ b/DESIGN.md@@ -101,6 +101,18 @@ settings carry over: Dark → Studio Dark, Light → Studio Light, System → fothe two Studio themes. An unknown or wrong-kind id falls back to the Studio theme of thekind needed (`Nota.Application.Appearance`).+**Accent.** Preferences → Appearance → Accent picks the accent colour (specs/084, #311): a+preset (Orange — the default — Lime, Aqua, Sky, Violet, Magenta, Pink) or a custom colour.+One choice for the whole app, worn in whichever theme is active. It is not stored in the+themes: `Nota.Application.AccentColours` re-colours a theme's accent family in OKLCH — each+token keeps its lightness relation to the theme's own orange and takes the new hue; the+washes (`AccentDim`, `AccentEdge`, `AccentMute`, `AccentSubtle`, `BorderBrass`) keep the+theme's lightness — and moves the accent's lightness by the smallest step that passes the+bar when it would fail. Orange is the theme file itself. A custom colour that no lightness+within reach makes readable, a grey, or one that sits on a state colour is refused, never+worn. The accented theme is what the palette, Fluent's ramp, the theme cards and Nota+Remote get. Where the accent goes does not change.+**Adding a theme.** Add `Theme/Themes/<id>.json` with every token and append its id to`NotaThemes.BuiltInOrder`. Nothing else names a theme. The smoke test checks the fileagainst the catalogue and the readability bar.@@ -122,6 +134,19 @@ Studio: WCAG where Studio meets it, Studio's own value where it does not.| T3.8 | `Accent`, `Mute`, `Solo`, `Record`, pairwise | ΔE ≥ 15 || T3.9 | `RecordInk` on `Record`, `SuccessInk` on `Success` | 4.5 |+Every accent a theme can wear (the presets, and any custom colour the picker accepts) meets+T3.4, T3.5 and T3.8, and two rules more (specs/084 research R3):++| | Pairing | Minimum |+|---|---|---|+| A1 | `Accent` vs `Success` (the meter green) | ΔE ≥ 15 |+| A2 | `Accent` vs `Record`, `Mute`, `Solo`, `Success`, colour only (Δa\*b\*, lightness left out) | 15 |+| A3 | A preset's `Accent` vs the nine track colours | ΔE ≥ 15 |++A2 keeps a lighter or darker copy of a state colour out; a custom colour is judged on itself+as well as on what it becomes. The shipped orange meets all three (its tightest is A2 vs+`Mute` in Ember Paper, 16.7).+Track colours are not compared with state colours: solo blue is the Keys track blue bydesign. **Known gap:** in Studio Light the accent line on the ground (2.39) and faint ink(2.58) sit below WCAG's 3:1 for graphics and incidental text; T3.3 / T3.4 hold Studio at@@ -262,7 +287,10 @@ ground) and `SurfaceInset` `#232427` / `#DCDEE0` (rail, sunken chip) for custom| `Brush.AccentDeep` | pressed | `#C77612` | `#D47800` | Pressed accent || `Brush.AccentDim` | accent-dim | `#C77612` | `#F7C27A` | The soft accent |-Fluent's `SystemAccentColor` ramps are retinted to the orange, so stock controls match.+The values are the default, Orange. The user's accent choice replaces this family (and the+ramp, and `TextOnAccent` by the derived ink) — see § Colour themes, **Accent**.++Fluent's `SystemAccentColor` ramps are retinted to the accent, so stock controls match.### Semantics@@ -878,6 +906,10 @@ Places where a screen's needs override a general rule, kept on purpose:(specs/070, #386): the wide meter is what keeps a 72 px compact strip readable, and it isalso the strip's fader. Zones, the hold mark and the −60…+6 scale are unchanged.+- **The accent picker's spectrum** (Settings → Appearance → Accent → Custom, specs/084) is+ the one rainbow in the app: a saturation/brightness area and a hue strip, drawn as bitmaps+ (no gradient brush). It is the thing being chosen, content like a waveform, not chrome.+## Known driftTrue today, not yet fixed:diff --git a/FEATURES.md b/FEATURES.mdindex 8bd14d62..81387db9 100644--- a/FEATURES.md+++ b/FEATURES.md@@ -531,7 +531,7 @@ docks as a panel under any of the three, or floats in its own window — see- **Nota Remote in Nota's theme**: the phone wears the colour theme Nota wears and followsevery change live (including Follow system); **Follow phone** (⋯ → Theme) wears theIn dark mode / In light mode themes by the phone's own scheme. Its screens follow the- Studio look — one orange accent for what is live or chosen, semantic mute / solo / arm+ Studio look — one accent (Nota's chosen accent) for what is live or chosen, semantic mute / solo / armcolours, sentence-case labels — and a returning phone paints in its last theme at once.- **Nota Remote Keys — Expressive**: on a track whose instrument takes MPE, the phone'sKeyboard and Scale modes can keep each finger on the note it struck: sliding sideways bends@@ -1316,8 +1316,9 @@ audio effects after it keep running and keep their settings; saved with the projorange accent; the default, and what a DAW wants for long sessions in a dark room),**Studio Light** (the same system in light greys, the orange a shade deeper), and**Ember Graphite** / **Ember Paper** (warm browns with a brass accent, dark and light).- A theme changes colours only — track colours included — never the layout. Panels dock edge- to edge on thin seams; orange marks only what is playing, selected or switched on, and a+ A theme changes colours only — track colours included — never the layout; the accent+ colour is a separate choice (see [Preferences](#preferences)). Panels dock edge+ to edge on thin seams; orange (or the chosen accent) marks only what is playing, selected or switched on, and aknob or fader turns orange while you hover or drag it; mute is amber, solo blue,record-arm red; labels are in sentence case. Switching applies immediately, across everyopen window — including the custom-drawn arrangement, piano roll, mixer and device cards.@@ -1425,7 +1426,12 @@ audio effects after it keep running and keep their settings; saved with the projrows of cards (Studio Dark and Ember Graphite; Studio Light and Ember Paper), each aminiature Nota window in its own colours. Pick one theme, or with Follow system one fordark mode and one for light mode, switched with the OS appearance; the choice applies- live and is remembered. **Interface scale** — 75 / 100 / 125 / 150 / 200 % for the whole+ live and is remembered. **Accent** — the colour of what is live or chosen: seven presets+ (Orange — the default — Lime, Aqua, Sky, Violet, Magenta, Pink) or **Custom**, a colour+ picker (saturation/brightness area, hue strip, hex field) that previews the colour in all+ four themes. One accent for every theme, tuned to each so it stays readable; a grey or a+ colour too close to the record red, mute, solo or the meter green is refused with the+ reason. Applied live, Esc in the picker puts the previous one back. **Interface scale** — 75 / 100 / 125 / 150 / 200 % for the wholeinterface (every window, menu, tooltip and dialog; text stays sharp), applied live andremembered; timeline, piano roll and audio editor zoom work on top of it. **Waveform** —**Smooth** (default), **Solid** or **Bars** for audio clips on the lanes. **Fade audiodiff --git a/specs/084-accent-colour/checklists/requirements.md b/specs/084-accent-colour/checklists/requirements.mdnew file mode 100644index 00000000..44fe8e82--- /dev/null+++ b/specs/084-accent-colour/checklists/requirements.md@@ -0,0 +1,38 @@+# Specification Quality Checklist: Choose the accent colour++**Purpose**: Validate specification completeness and quality before proceeding to planning+**Created**: 2026-11-05+**Feature**: [spec.md](../spec.md)++## Content Quality++- [x] No implementation details (languages, frameworks, APIs)+- [x] Focused on user value and business needs+- [x] Written for non-technical stakeholders+- [x] All mandatory sections completed++## Requirement Completeness++- [x] No [NEEDS CLARIFICATION] markers remain+- [x] Requirements are testable and unambiguous+- [x] Success criteria are measurable+- [x] Success criteria are technology-agnostic (no implementation details)+- [x] All acceptance scenarios are defined+- [x] Edge cases are identified+- [x] Scope is clearly bounded+- [x] Dependencies and assumptions identified++## Feature Readiness++- [x] All functional requirements have clear acceptance criteria+- [x] User scenarios cover primary flows+- [x] Feature meets measurable outcomes defined in Success Criteria+- [x] No implementation details leak into specification++## Notes++- Token names (`Success`, readability-bar rows T3.4/T3.5/T3.8) are referenced because they+ are the project's design vocabulary (DESIGN.md), not implementation; the Nota Context+ section is the template's designated place for code areas.+- The two open questions (custom colour across themes; one accent vs per theme) were+ answered by the user on 2026-11-05 and recorded in the spec's Clarifications.diff --git a/specs/084-accent-colour/contracts/ui-contract.md b/specs/084-accent-colour/contracts/ui-contract.mdnew file mode 100644index 00000000..fd436ca3--- /dev/null+++ b/specs/084-accent-colour/contracts/ui-contract.md@@ -0,0 +1,61 @@+# UI contract: the Accent row and the colour picker++Visual reference: [`../mockup/accent.html`](../mockup/accent.html).++## Accent row (Settings → Appearance → UI)++- Position: directly under the colour theme picker and its caption; label **Accent**+ (`preferences.accent`), caption under it (`preferences.accent_caption`): "The colour of+ what is live or chosen — the playhead, the loop, selection, toggles that are on. Tuned to+ each theme so it stays readable."+- Content, left to right: 7 preset swatches · 6 px gap · **Custom** button · readout.+- Swatch: 22 × 22 hit area, 2 px ring slot (transparent; `Rule` on hover; `TextPrimary`+ when chosen), 2 px gap, 14 × 14 fill radius `Radius.Clip` (2) in the preset's accent *as+ worn in the active theme*. Tooltip: the preset name.+- Custom button: default button (raised, seam, bevel), content = 14 × 14 chip of the+ custom colour (or `SurfaceHover` with no custom colour yet), label "Custom"+ (`preferences.accent_custom`), `GlyphKind.Edit` 10 px. Chosen → the same `TextPrimary`+ ring. Click opens the picker.+- Readout: `TextMuted`, 12 px — the preset name, or "Custom · #RRGGBB" (hex in Geist Mono).+- Theme cards above preview each theme with the chosen accent.+- A pick applies at once (re-tint + repaint every window) and saves.++## Colour picker (Flyout below the Custom button)++- Body 240 wide, padding 10, `SurfaceRaised`, seam ring (popups carry no blur).+- Rows, gap 8:+ 1. Saturation/value area 216 × 132, radius 3, `Rule` frame; handle 12 px circle,+ `HandleSel` 2 px ring + `Seam` 1 px outer ring.+ 2. Hue strip 216 × 10, radius 3, `Rule` frame; handle 4 × 14 `HandleSel` with `Seam` edge.+ 3. Before/after chip (two 18 × 22 halves, `Rule` frame) · hex field (`TextBox.field`, Geist+ Mono 12, accepts `#RGB`, `#RRGGBB`, with or without `#`).+ 4. "In themes" (`preferences.accent_in_themes`, `CellLabel`) and four chips (theme names+ abbreviated in a tooltip) showing the derived `Accent` per theme; a 4 px `TextPrimary`+ dot marks a theme where lightness was adjusted; a refused theme shows `BgSunken`.+ 5. Note (11 px, `TextMuted`; `Danger` when refused), two lines reserved so the flyout never+ changes height:+ - `preferences.accent_note_as_is` — "Worn as is in every theme."+ - `preferences.accent_note_adjusted` — "Lightness adjusted in {0} to stay readable."+ (`{0}` = the theme names, or `preferences.accent_note_adjusted_all` when all four)+ - `preferences.accent_note_grey` — "Pick a colour, not a grey — the accent has to read+ as a colour."+ - `preferences.accent_note_clash` — "Too close to {0} in {1} — pick another colour. The+ accent stays as it was." (`{0}`: `preferences.accent_clash_record` "the record red",+ `…_mute` "mute", `…_solo` "solo", `…_meter` "the meter green")+ - `preferences.accent_note_unreadable` — "No lightness keeps this readable in {0} — pick+ another colour. The accent stays as it was."+- Interaction: drag in the area / strip (left button) or type a valid hex → applied live+ (not saved) when accepted; refused → shown in the chip and the note only. Opening+ preselects the custom accent, or the last custom colour while a preset is worn, or — when+ none was ever chosen — the worn preset's colour.+ Closing (outside click, Return in the hex field) saves the last accepted colour as Custom;+ Esc restores the accent worn before opening and closes.++## Preset names (localization keys)++`accent.orange` Orange · `accent.lime` Lime · `accent.aqua` Aqua · `accent.sky` Sky ·+`accent.violet` Violet · `accent.magenta` Magenta · `accent.pink` Pink.++## Nota Remote++No UI. The theme message carries the accented theme(s); the phone repaints on change.diff --git a/specs/084-accent-colour/data-model.md b/specs/084-accent-colour/data-model.mdnew file mode 100644index 00000000..c7937213--- /dev/null+++ b/specs/084-accent-colour/data-model.md@@ -0,0 +1,59 @@+# Data model: Choose the accent colour++## Settings (settings.json)++| Field | Type | Default | Meaning |+|---|---|---|---|+| `Accent` | string | `""` | `""` or `"orange"` → Orange; a preset id; `"custom"` → `CustomAccent` |+| `CustomAccent` | string | `""` | last custom colour, `#RRGGBB`; kept while a preset is worn |++## AccentChoice (Nota.Application)++`record AccentChoice(string Preset, uint? Custom)` — `Preset` is a preset id or `"custom"`;+`Custom` is `0xRRGGBB` when `Preset == "custom"`.++- `Accent.Resolve(Settings) → AccentChoice` — `""`, unknown id, `"custom"` with a missing or+ malformed `CustomAccent` → Orange. Never throws, never writes.+- `Accent.Store(Settings, AccentChoice)` — writes `Accent` (and `CustomAccent` for custom).+- `AccentChoice.IsDefault` — Orange.++## AccentPreset++`record AccentPreset(string Id, double Chroma, double Hue)` — Orange has no+chroma/hue (identity). The list, in display order: orange, lime, aqua, sky, violet,+magenta, pink (values: research R4). Names are the localization keys `accent.<id>`,+looked up by a literal switch in the Preferences page (the localization check rejects+computed keys).++## Derivation (Nota.Application, pure)++`AccentColours.Wear(IReadOnlyDictionary<string, uint> theme, AccentChoice) → AccentResult`++- `AccentResult { IReadOnlyDictionary<string, uint>? Tokens; bool Adjusted; AccentRefusal? Refusal }`+- `Tokens` holds the accent family (`SolidTokens` + `BlendTokens`) and `TextOnAccent`; the+ caller overlays them on the theme. Orange → `Tokens` = the theme's own values.+- `AccentRefusal { Reason: Grey | Clash | Unreadable; string? ClashWith }` — `ClashWith` is the+ token (`Record`, `Mute`, `Solo`, `Success`).+- `AccentColours.Failures(theme, tokens, includeTracks)` — the rule set R3, for the tests.+- A preset never refuses (asserted by the smoke test); if it ever did, the app falls back to+ Orange for that theme.++Helpers (public for the smoke test): `OkLch(uint)`, `FromOkLch(L, C, h)`, `Contrast`,+`DeltaE76`, `DeltaAb`, `InkOn(uint)`.++## Accented theme (Nota.App)++`NotaAccent.Wear(NotaColourTheme, AccentChoice) → NotaColourTheme` — same `Id`, `Name`,+`Kind`; `Colors` = theme colours with `Tokens` overlaid. Cached per `(Id, AccentChoice)`;+Orange returns the theme object itself.++## State transitions++```text+ pick preset ─────────────► worn + saved+Accent row ─ Custom ─► picker open ─ drag / hex ─► worn (not saved)+ │ refused colour ─► note, accent unchanged+ ├ click outside / close ─► saved (Accent = custom, CustomAccent = hex)+ └ Esc ─► previous accent worn again, nothing saved+theme switch / OS mode flip ─► same AccentChoice worn in the new theme+```diff --git a/specs/084-accent-colour/mockup/accent.html b/specs/084-accent-colour/mockup/accent.htmlnew file mode 100644index 00000000..b415bcca--- /dev/null+++ b/specs/084-accent-colour/mockup/accent.html@@ -0,0 +1,291 @@+<!-- SPDX-License-Identifier: AGPL-3.0-only -->+<!-- Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms. -->+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8">+<title>specs/084 · Accent colour — mockup</title>+<style>+ @font-face { font-family: "Geist"; src: url("../../../assets/fonts/Geist-Regular.ttf"); font-weight: 400; }+ @font-face { font-family: "Geist"; src: url("../../../assets/fonts/Geist-SemiBold.ttf"); font-weight: 600; }+ @font-face { font-family: "Geist Mono"; src: url("../../../assets/fonts/GeistMono-Regular.ttf"); font-weight: 400; }+ * { box-sizing: border-box; }+ body { margin: 0; padding: 24px 28px 40px; background: #101113; color: #E8E9EB; font: 11px "Geist", system-ui, sans-serif; }+ h1 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }+ h2 { font-size: 12px; font-weight: 600; margin: 28px 0 8px; color: #C0C4C9; }+ p.note { color: #92969D; margin: 0 0 14px; max-width: 900px; line-height: 1.5; }+ .mono { font-family: "Geist Mono", ui-monospace, monospace; }+ .bar { display: flex; gap: 2px; margin: 10px 0 0; }+ .bar button { font: 11px "Geist"; color: #C0C4C9; background: #2B2D31; border: 1px solid #141517; padding: 4px 10px; border-radius: 3px; cursor: pointer; }+ .bar button.on { background: #E8E9EB; color: #17181A; }+ .row { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }+ .cap { color: #92969D; font-size: 10px; margin-top: 6px; max-width: 520px; line-height: 1.45; }++ /* ---- a scope wears one theme + accent through CSS variables ---- */+ .scope { background: var(--BgApp); color: var(--TextPrimary); border: 1px solid var(--Seam); }++ /* Settings pane excerpt */+ .pane { width: 640px; padding: 18px 22px 20px; background: var(--Panel); }+ .sect { font-size: 11px; font-weight: 600; color: var(--TextSecondary); margin-bottom: 12px; }+ .prow { display: grid; grid-template-columns: 128px 1fr; column-gap: 16px; align-items: start; margin-bottom: 8px; }+ .plabel { font-size: 12px; color: var(--TextSecondary); padding-top: 3px; }+ .pcap { font-size: 11px; color: var(--TextMuted); line-height: 1.45; }+ .seg { display: inline-flex; gap: 1px; background: var(--Seam); border: 1px solid var(--Seam); border-radius: 3px; overflow: hidden; }+ .seg span { font-size: 12px; padding: 3px 10px; background: var(--SurfaceRaised); color: var(--TextSecondary); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }+ .seg span.on { background: var(--Accent); color: var(--TextOnAccent); }+ .cards { display: flex; gap: 12px; margin: 10px 0 4px; }+ .tcard { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--TextPrimary); }+ .tframe { padding: 2px; border-radius: 4px; border: 2px solid transparent; }+ .tframe.on { border-color: var(--Accent); }+ .mini { width: 120px; height: 72px; border-radius: 2px; position: relative; overflow: hidden; border: 1px solid #0006; }+ .mini i { position: absolute; display: block; }+ .mlabel { font-size: 11px; color: var(--TextMuted); margin: 6px 0 0; }++ /* the accent row */+ .accents { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }+ .sw { width: 22px; height: 22px; border-radius: 4px; padding: 2px; border: 2px solid transparent; cursor: pointer; }+ .sw i { display: block; width: 100%; height: 100%; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }+ .sw.on { border-color: var(--TextPrimary); }+ .sw:hover:not(.on) { border-color: var(--Rule); }+ .gap { width: 6px; }+ .btn { height: 22px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 4px; border-radius: 3px; font-size: 12px;+ background: var(--SurfaceRaised); color: var(--TextSecondary); border: 1px solid var(--Seam); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); cursor: pointer; }+ .btn.on { outline: 2px solid var(--TextPrimary); outline-offset: 1px; }+ .btn b { width: 14px; height: 14px; border-radius: 2px; display: block; }+ .btn svg { width: 10px; height: 10px; }+ .readout { font-size: 12px; color: var(--TextMuted); margin-left: 6px; }++ /* the picker popover */+ .pop { width: 240px; padding: 10px; border-radius: 3px; background: var(--SurfaceRaised); border: 1px solid var(--Seam);+ box-shadow: 0 10px 28px rgba(0,0,0,.42); display: flex; flex-direction: column; gap: 8px; position: relative; }+ .sv { height: 132px; border-radius: 3px; position: relative; border: 1px solid var(--Rule); }+ .sv .h { position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #0008; transform: translate(-6px,-6px); }+ .hue { height: 10px; border-radius: 3px; position: relative; border: 1px solid var(--Rule);+ background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }+ .hue .h { position: absolute; top: -3px; width: 4px; height: 14px; background: #fff; border-radius: 1px; box-shadow: 0 0 0 1px #0008; transform: translateX(-2px); }+ .prow2 { display: flex; align-items: center; gap: 6px; }+ .chips2 { display: flex; height: 22px; border: 1px solid var(--Rule); border-radius: 3px; overflow: hidden; }+ .chips2 i { width: 18px; display: block; }+ .field { flex: 1; height: 22px; display: flex; align-items: center; padding: 0 6px; border-radius: 3px; background: var(--BgSunken);+ border: 1px solid var(--Rule); color: var(--TextPrimary); font: 12px "Geist Mono"; }+ .field.focus { border-color: var(--AccentBright); }+ .inthemes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }+ .inthemes div { display: flex; flex-direction: column; gap: 3px; align-items: center; font-size: 9px; color: var(--TextMuted); }+ .inthemes i { display: block; width: 100%; height: 14px; border-radius: 2px; border: 1px solid #0005; position: relative; }+ .inthemes i.adj::after { content: ""; position: absolute; right: 2px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--TextPrimary); box-shadow: 0 0 0 1px #0008; }+ .pnote { font-size: 11px; color: var(--TextMuted); line-height: 1.4; min-height: 30px; }+ .pnote.bad { color: var(--Danger); }++ /* specimens — accent in use */+ .spec { padding: 12px; display: grid; grid-template-columns: auto auto; gap: 10px 16px; align-items: center; width: 640px; background: var(--BgApp); }+ .lbl { color: var(--TextTertiary); font-size: 10px; }+ .tp { display: flex; gap: 2px; }+ .key { width: 26px; height: 20px; border-radius: 3px; background: var(--SurfaceRaised); border: 1px solid var(--Seam); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }+ .key.on { background: var(--Accent); }+ .key svg { width: 10px; height: 10px; }+ .lane { position: relative; height: 40px; width: 300px; background: var(--LaneB); border: 1px solid var(--Seam); }+ .clip { position: absolute; top: 4px; height: 30px; border-radius: 2px; }+ .clip.sel { box-shadow: 0 0 0 1px var(--Accent); }+ .ph { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--Accent); }+ .loop { position: absolute; top: -1px; height: 4px; background: var(--Accent); }+ .list { width: 220px; background: var(--Panel); border: 1px solid var(--Seam); padding: 3px; }+ .li { height: 20px; display: flex; align-items: center; padding: 0 8px; font-size: 11px; color: var(--TextSecondary); border-radius: 2px; }+ .li.pick { background: var(--AccentSubtle); color: var(--TextPrimary); }+ .li.hov { background: var(--Accent); color: var(--TextOnAccent); }+ .knobs { display: flex; gap: 14px; align-items: center; }+ .knob { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; color: var(--TextMuted); }+ .sw2 { width: 18px; height: 10px; border-radius: 5px; background: var(--BgSunken); border: 1px solid var(--Rule); position: relative; }+ .sw2.on { background: var(--Accent); border-color: var(--Accent); }+ .sw2 i { position: absolute; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--TextPrimary); }+ .sw2.on i { right: 1px; background: var(--TextOnAccent); }+ .brass { width: 140px; height: 40px; border-radius: 3px; background: var(--BgSunken); border: 1px solid var(--BorderBrass); display: flex; align-items: flex-end; padding: 4px; gap: 2px; }+ .brass u { flex: 1; background: var(--VizInk); border-radius: 1px; }+ .brass u.hot { background: var(--AccentBright); }+ .txt { font-size: 11px; color: var(--AccentBright); }++ /* matrix */+ table.m { border-collapse: separate; border-spacing: 6px; }+ table.m th { font-weight: 600; font-size: 10px; color: #92969D; text-align: left; padding: 0 2px; }+ .cell { padding: 8px; display: flex; gap: 6px; align-items: center; width: 220px; }+ .cell .lane { width: 92px; height: 26px; }+ .cell .clip { height: 18px; }+ .cell .li { height: 18px; width: 46px; padding: 0 4px; font-size: 10px; }+ .hexes { font: 9px "Geist Mono"; color: var(--TextMuted); line-height: 1.3; }+</style>+</head>+<body>+<h1>Choose the accent colour — specs/084 · nota-daw/nota#311</h1>+<p class="note">Every colour on this page is computed from the theme files by the derivation in research.md: Orange is the theme files+verbatim; another accent keeps each accent token's lightness relation to the theme's own orange and swaps hue and saturation,+then — only if the readability bar would fail — moves the lightness by the smallest step that passes. Click a swatch or a theme+to try it. The swatches, the Custom button and the picker are the new controls; everything else is the existing UI wearing the accent.</p>+<div class="bar" id="themeBar"></div>++<h2>1 · Settings → Appearance (excerpt, true size)</h2>+<div class="row">+ <div class="scope pane" id="pane">+ <div class="sect">UI</div>+ <div class="prow"><div class="plabel">Colour theme</div>+ <div>+ <div class="seg"><span class="on">Dark</span><span>Light</span><span>Follow system</span></div>+ <div class="mlabel">Dark</div>+ <div class="cards" id="cardsDark"></div>+ <div class="mlabel">Light</div>+ <div class="cards" id="cardsLight"></div>+ </div>+ </div>+ <div class="prow"><div></div><div class="pcap">Themes change colours only. Follow system wears a dark theme in dark mode and a light one in light mode.</div></div>+ <div class="prow" style="margin-top:10px"><div class="plabel">Accent</div>+ <div class="accents" id="accents"></div>+ </div>+ <div class="prow"><div></div><div class="pcap">The colour of what is live or chosen — the playhead, the loop, selection, toggles that are on. Tuned to each theme so it stays readable.</div></div>+ <div class="prow" style="margin-top:10px"><div class="plabel">Waveform</div><div><div class="seg"><span class="on">Smooth</span><span>Solid</span><span>Bars</span></div></div></div>+ </div>+ <div class="cap" style="max-width:300px">+ <b>Accent</b> sits directly under the theme picker. Seven presets, then <b>Custom</b>; the chosen one carries a 2 px ring in+ <span class="mono">TextPrimary</span> (colour only — the ring slot is always there, so nothing moves). A swatch's name is its+ tooltip; the chosen name is the readout at the end of the row. The theme cards preview each theme <i>with</i> the chosen accent.+ <br><br>Presets: Orange (default) · Lime · Aqua · Sky · Violet · Magenta · Pink — no yellow (mute), red (record), green (meter) or+ mid blue (solo). Each passes T3.4, T3.5, T3.8, the meter green and every track colour (ΔE ≥ 15) in all four themes — the smoke test enforces it.+ </div>+</div>++<h2>2 · Custom — the picker (a popover under the Custom button)</h2>+<div class="row" id="pickers"></div>+<p class="cap" style="max-width:900px">Saturation/brightness area, hue strip, the old/new chip and a hex field (Geist Mono; typing a valid value applies at once).+The <b>In themes</b> strip shows the colour as each theme will wear it; a dot marks a theme where its lightness was moved to stay readable.+Everything applies live while dragging; clicking outside keeps it and saves; Esc puts back the accent worn before the picker opened.+A colour no lightness can rescue (a grey, or one that sits on the record red / mute / solo / meter green in some theme) is not applied:+the note says why in Danger ink and the accent stays as it was. The spectrum is the one gradient in the app — content, like a waveform — listed in DESIGN.md's accepted exceptions.</p>++<h2>3 · The accent in use (current theme · current accent)</h2>+<div class="scope spec" id="spec"></div>++<h2>4 · Every preset in every theme</h2>+<table class="m" id="matrix"></table>++<script>+const THEMES = {"studio-dark": {"SurfaceAbyss": "#17181A", "BgApp": "#1E1F22", "Gutter": "#141517", "BgSunken": "#17181A", "CanvasBg": "#1E1F22", "SurfaceDeep": "#1B1C1F", "LaneB": "#222326", "Panel": "#2B2D31", "SurfaceCard": "#2B2D31", "SurfaceInset": "#232427", "SurfaceRaised": "#34363B", "SurfaceHover": "#393C41", "TrackOff": "#17181A", "SurfaceActive": "#17181A", "GridSubBeat": "#242528", "GridBeat": "#2A2C30", "GridRow": "#1B1C1F", "GridBar": "#3A3C41", "GraphBorder": "#45484E", "WellGrid": "#2E2F32", "PadGrid": "#2A2C30", "TextHeading": "#F4F5F6", "TextPrimary": "#E8E9EB", "TextStrong": "#D4D6DA", "TextSecondary": "#C0C4C9", "TextMuted": "#A4A9B0", "TextTertiary": "#92969D", "TextDisabled": "#82868C", "TextAxis": "#82868C", "TextOnAccent": "#17181A", "TextFaint": "#82868C", "VizInk": "#D7D8DA", "VizGrid": "#2E2F32", "BorderDefault": "#141517", "BorderStrong": "#45484E", "BorderBrass": "#BF7D22", "Seam": "#141517", "Rule": "#45484E", "Accent": "#FF9F1C", "AccentBright": "#FFB547", "AccentHover": "#FFB547", "AccentDeep": "#C77612", "AccentDim": "#C77612", "AccentEdge": "#BF7D22", "AccentMute": "#7A5F3D", "AccentPale": "#FFD08A", "AccentSubtle": "#4D3F2E", "Record": "#F06A6E", "RecordInk": "#17181A", "Success": "#6CC673", "SuccessInk": "#17181A", "SuccessDim": "#3F8A45", "Warning": "#F2B53C", "Mute": "#F2B53C", "Solo": "#6A9FD8", "Danger": "#F06A6E", "DangerHover": "#F48386", "DangerBright": "#F58F92", "DangerDeep": "#C4474B", "DangerPale": "#F7A5A7", "Teal": "#5FB3A8", "TealBright": "#86C9C0", "Rose": "#D77A8F", "RoseBright": "#E49EAE", "Steel": "#6A9FD8", "Sage": "#7FB08A", "Threshold": "#E0A84A", "Marker": "#7FC4E0", "MarkerHot": "#CDEEF8", "Frozen": "#7FC7EC", "SignalIn": "#5A6170", "SignalInFill": "#3A3E46", "HandleSel": "#FFFFFF", "SelHeaderBg": "#393C41", "FrozenHeaderBg": "#24323B", "MuteTint": "#3B3426", "Veil": "#1E1F22", "TooltipBg": "#34363B", "TooltipText": "#E8E9EB", "KeyWhite": "#2B2D31", "KeyBlack": "#17181A", "MiniKeyWhite": "#3A3C41", "MiniKeyBlack": "#17181A", "ShadeUp": "#FFFFFF", "ShadeDown": "#17181A", "Master": "#A4A9B0", "Track1": "#7FB87A", "Track2": "#5FB3A8", "Track3": "#5AA6C4", "Track4": "#6A9FD8", "Track5": "#E0A84A", "Track6": "#9D90C9", "Track7": "#D77A8F", "Track8": "#B3B45E", "Track9": "#8E9DB0", "ReturnA": "#8E9DB0", "ReturnB": "#7A889A", "SystemAccent": "#FF9F1C", "SystemAccentLight1": "#FFAB37", "SystemAccentLight2": "#FFB652", "SystemAccentLight3": "#FFC26E", "SystemAccentDark1": "#E68F19", "SystemAccentDark2": "#CC7F16", "SystemAccentDark3": "#B26F14"}, "studio-light": {"SurfaceAbyss": "#D6D8DB", "BgApp": "#C9CBCF", "Gutter": "#9DA0A6", "BgSunken": "#D6D8DB", "CanvasBg": "#C9CBCF", "SurfaceDeep": "#CFD1D4", "LaneB": "#C4C6CA", "Panel": "#E4E5E7", "SurfaceCard": "#E4E5E7", "SurfaceInset": "#DCDEE0", "SurfaceRaised": "#EEEFF1", "SurfaceHover": "#F7F8F9", "TrackOff": "#D6D8DB", "SurfaceActive": "#D6D8DB", "GridSubBeat": "#C3C5C9", "GridBeat": "#BDC0C4", "GridRow": "#C5C7CB", "GridBar": "#ADB0B5", "GraphBorder": "#B3B6BB", "WellGrid": "#C0C3C6", "PadGrid": "#C8CACD", "TextHeading": "#0E0F11", "TextPrimary": "#16171A", "TextStrong": "#282A2E", "TextSecondary": "#3A3D42", "TextMuted": "#4F535A", "TextTertiary": "#65696F", "TextDisabled": "#797C81", "TextAxis": "#797C81", "TextOnAccent": "#17181A", "TextFaint": "#797C81", "VizInk": "#252629", "VizGrid": "#C0C3C6", "BorderDefault": "#9DA0A6", "BorderStrong": "#B3B6BB", "BorderBrass": "#ECA54E", "Seam": "#9DA0A6", "Rule": "#B3B6BB", "Accent": "#EF8A0C", "AccentBright": "#C46A00", "AccentHover": "#C46A00", "AccentDeep": "#D47800", "AccentDim": "#F7C27A", "AccentEdge": "#ECA54E", "AccentMute": "#C9A77A", "AccentPale": "#8A4A00", "AccentSubtle": "#E6D6C4", "Record": "#B3262C", "RecordInk": "#FFFFFF", "Success": "#22692B", "SuccessInk": "#FFFFFF", "SuccessDim": "#79B880", "Warning": "#7A4F00", "Mute": "#7A4F00", "Solo": "#3F78B8", "Danger": "#B3262C", "DangerHover": "#C2343A", "DangerBright": "#9C1F24", "DangerDeep": "#8E1C21", "DangerPale": "#7F161B", "Teal": "#3A8A7F", "TealBright": "#2E7067", "Rose": "#B4566B", "RoseBright": "#93404F", "Steel": "#3F78B8", "Sage": "#4A7F56", "Threshold": "#8A5F14", "Marker": "#1B6E8C", "MarkerHot": "#0E5470", "Frozen": "#1C6E96", "SignalIn": "#7A818C", "SignalInFill": "#C9CDD3", "HandleSel": "#16171A", "SelHeaderBg": "#F7F8F9", "FrozenHeaderBg": "#D3E2EA", "MuteTint": "#BDB49F", "Veil": "#E4E5E7", "TooltipBg": "#EEEFF1", "TooltipText": "#16171A", "KeyWhite": "#EEEFF1", "KeyBlack": "#C9CBCF", "MiniKeyWhite": "#F7F8F9", "MiniKeyBlack": "#3A3D42", "ShadeUp": "#FFFFFF", "ShadeDown": "#16171A", "Master": "#4F535A", "Track1": "#4A7F46", "Track2": "#3A8A7F", "Track3": "#357C99", "Track4": "#3F78B8", "Track5": "#B8862F", "Track6": "#7363A8", "Track7": "#B4566B", "Track8": "#7E7F2F", "Track9": "#5D6C80", "ReturnA": "#5D6C80", "ReturnB": "#4E5B6D", "SystemAccent": "#EF8A0C", "SystemAccentLight1": "#F19829", "SystemAccentLight2": "#F3A646", "SystemAccentLight3": "#F5B463", "SystemAccentDark1": "#D77C0B", "SystemAccentDark2": "#BF6E0A", "SystemAccentDark3": "#A76108"}, "ember-graphite": {"SurfaceAbyss": "#0A0908", "BgApp": "#0B0A09", "Gutter": "#0C0B09", "BgSunken": "#100F0D", "CanvasBg": "#121110", "SurfaceDeep": "#131210", "LaneB": "#131210", "Panel": "#141310", "SurfaceCard": "#171613", "SurfaceInset": "#1A1815", "SurfaceRaised": "#1C1A16", "SurfaceHover": "#252219", "TrackOff": "#26231E", "SurfaceActive": "#100F0D", "GridSubBeat": "#191712", "GridBeat": "#1E1C18", "GridRow": "#141311", "GridBar": "#2A2721", "GraphBorder": "#221F1A", "WellGrid": "#232019", "PadGrid": "#1C1A16", "TextHeading": "#F2EDE1", "TextPrimary": "#E9E4D8", "TextStrong": "#C7C0B0", "TextSecondary": "#A39D8F", "TextMuted": "#8F897C", "TextTertiary": "#716D60", "TextDisabled": "#646054", "TextAxis": "#65614F", "TextOnAccent": "#171613", "TextFaint": "#646054", "VizInk": "#D8D3C8", "VizGrid": "#232019", "BorderDefault": "#2C2923", "BorderStrong": "#3A362D", "BorderBrass": "#6B5326", "Seam": "#0C0B09", "Rule": "#3A362D", "Accent": "#D8A03D", "AccentBright": "#F0C060", "AccentHover": "#E9BE6A", "AccentDeep": "#B08536", "AccentDim": "#8A6B2E", "AccentEdge": "#5E4A22", "AccentMute": "#7A6130", "AccentPale": "#FCE5B8", "AccentSubtle": "#241F17", "Record": "#BE563E", "RecordInk": "#FFFFFF", "Success": "#58B368", "SuccessInk": "#171613", "SuccessDim": "#7FB069", "Warning": "#D9C34C", "Mute": "#D9C34C", "Solo": "#6D8FB5", "Danger": "#C2554A", "DangerHover": "#D0685C", "DangerBright": "#E08A72", "DangerDeep": "#A8453B", "DangerPale": "#F0928A", "Teal": "#5B9E9C", "TealBright": "#7FC0BE", "Rose": "#B57286", "RoseBright": "#D79BAB", "Steel": "#6D8FB5", "Sage": "#6FA383", "Threshold": "#C9884F", "Marker": "#7FCCE1", "MarkerHot": "#CDEEF8", "Frozen": "#7FC7EC", "SignalIn": "#52604F", "SignalInFill": "#3E4A3C", "HandleSel": "#FFFFFF", "SelHeaderBg": "#241F17", "FrozenHeaderBg": "#1B2A33", "MuteTint": "#3A2320", "Veil": "#121418", "TooltipBg": "#18181E", "TooltipText": "#F0E4C8", "KeyWhite": "#1C1A16", "KeyBlack": "#0E0D0B", "MiniKeyWhite": "#2A2721", "MiniKeyBlack": "#151310", "ShadeUp": "#FFFFFF", "ShadeDown": "#141210", "Master": "#8D8779", "Track1": "#58B368", "Track2": "#4E9E7A", "Track3": "#3E8E8E", "Track4": "#5AA0B8", "Track5": "#C77F55", "Track6": "#7A6FB0", "Track7": "#B05A7A", "Track8": "#9AA64A", "Track9": "#7FA88E", "ReturnA": "#7FA88E", "ReturnB": "#6B907B", "SystemAccent": "#D8A03D", "SystemAccentLight1": "#DDAB54", "SystemAccentLight2": "#E1B76C", "SystemAccentLight3": "#E6C283", "SystemAccentDark1": "#C29037", "SystemAccentDark2": "#AD8031", "SystemAccentDark3": "#97702B"}, "ember-paper": {"SurfaceAbyss": "#D8D1BE", "BgApp": "#DCD6C5", "Gutter": "#E0DAC9", "BgSunken": "#E4DFD1", "CanvasBg": "#E6E1D3", "SurfaceDeep": "#E7E2D4", "LaneB": "#E7E2D4", "Panel": "#EAE5D7", "SurfaceCard": "#EFEADE", "SurfaceInset": "#E9E4D6", "SurfaceRaised": "#F8F5EC", "SurfaceHover": "#E7E1D0", "TrackOff": "#DBD4C0", "SurfaceActive": "#D5CEBB", "GridSubBeat": "#E5DFCE", "GridBeat": "#DED8C8", "GridRow": "#E6E1D2", "GridBar": "#CFC8B4", "GraphBorder": "#D5CFBE", "WellGrid": "#DDD7C6", "PadGrid": "#DED8C7", "TextHeading": "#1A150E", "TextPrimary": "#241F17", "TextStrong": "#3E382C", "TextSecondary": "#5E5849", "TextMuted": "#625B50", "TextTertiary": "#7E786C", "TextDisabled": "#8D866F", "TextAxis": "#8D8669", "TextOnAccent": "#FFFBF2", "TextFaint": "#8D866F", "VizInk": "#332E26", "VizGrid": "#DDD7C6", "BorderDefault": "#D5CEBB", "BorderStrong": "#BDB5A0", "BorderBrass": "#C9A254", "Seam": "#E0DAC9", "Rule": "#BDB5A0", "Accent": "#AD7716", "AccentBright": "#744D07", "AccentHover": "#8F6110", "AccentDeep": "#7A5008", "AccentDim": "#9C8034", "AccentEdge": "#D3B173", "AccentMute": "#C39B4F", "AccentPale": "#5C3C04", "AccentSubtle": "#F2E4C4", "Record": "#B54A32", "RecordInk": "#FFF4EE", "Success": "#2C7A3E", "SuccessInk": "#FFFBF2", "SuccessDim": "#609548", "Warning": "#837010", "Mute": "#837010", "Solo": "#3E6288", "Danger": "#B13E33", "DangerHover": "#C64A36", "DangerBright": "#A3391B", "DangerDeep": "#9C3221", "DangerPale": "#8E2416", "Teal": "#2F7472", "TealBright": "#3E8A88", "Rose": "#86465B", "RoseBright": "#7F2D43", "Steel": "#3E6288", "Sage": "#42765A", "Threshold": "#8A5218", "Marker": "#1B6E8C", "MarkerHot": "#0E5470", "Frozen": "#1C6E96", "SignalIn": "#6E7C68", "SignalInFill": "#D3DCCF", "HandleSel": "#1E1A14", "SelHeaderBg": "#F2E4C4", "FrozenHeaderBg": "#D8E8F0", "MuteTint": "#F0D9D3", "Veil": "#F2EFE6", "TooltipBg": "#2A251C", "TooltipText": "#F5EEDC", "KeyWhite": "#F3EFE4", "KeyBlack": "#DAD3C2", "MiniKeyWhite": "#F5F1E4", "MiniKeyBlack": "#38332A", "ShadeUp": "#FFFCF2", "ShadeDown": "#3A3227", "Master": "#746D5C", "Track1": "#328140", "Track2": "#306F53", "Track3": "#256464", "Track4": "#317187", "Track5": "#985127", "Track6": "#4B4082", "Track7": "#7F3450", "Track8": "#6C752C", "Track9": "#598C69", "ReturnA": "#598C69", "ReturnB": "#3E6A4D", "SystemAccent": "#AD7716", "SystemAccentLight1": "#B78732", "SystemAccentLight2": "#C1984E", "SystemAccentLight3": "#CBA86A", "SystemAccentDark1": "#9C6B14", "SystemAccentDark2": "#8A5F12", "SystemAccentDark3": "#79530F"}};+const ACCENTS = {"studio-dark": {"orange": {"Accent": "#FF9F1C", "AccentBright": "#FFB547", "AccentHover": "#FFB547", "AccentDeep": "#C77612", "AccentPale": "#FFD08A", "SystemAccent": "#FF9F1C", "SystemAccentLight1": "#FFAB37", "SystemAccentLight2": "#FFB652", "SystemAccentLight3": "#FFC26E", "SystemAccentDark1": "#E68F19", "SystemAccentDark2": "#CC7F16", "SystemAccentDark3": "#B26F14", "AccentDim": "#C77612", "AccentEdge": "#BF7D22", "AccentMute": "#7A5F3D", "AccentSubtle": "#4D3F2E", "BorderBrass": "#BF7D22", "TextOnAccent": "#17181A"}, "lime": {"Accent": "#A2C854", "AccentBright": "#A5D87B", "AccentHover": "#A5D87B", "AccentDeep": "#809837", "AccentPale": "#BEE7AA", "SystemAccent": "#A2C854", "SystemAccentLight1": "#A4D16A", "SystemAccentLight2": "#AAD77E", "SystemAccentLight3": "#B3DE93", "SystemAccentDark1": "#92B54C", "SystemAccentDark2": "#81A043", "SystemAccentDark3": "#708C3B", "AccentDim": "#809837", "AccentEdge": "#799A4A", "AccentMute": "#5A6B4B", "AccentSubtle": "#3C4535", "BorderBrass": "#799A4A", "TextOnAccent": "#17181A"}, "aqua": {"Accent": "#45D1C2", "AccentBright": "#66DBD7", "AccentHover": "#66DBD7", "AccentDeep": "#31A091", "AccentPale": "#9EE8E8", "SystemAccent": "#45D1C2", "SystemAccentLight1": "#58D7CE", "SystemAccentLight2": "#6EDCD6", "SystemAccentLight3": "#86E1DE", "SystemAccentDark1": "#3EBCAF", "SystemAccentDark2": "#36A79C", "SystemAccentDark3": "#309288", "AccentDim": "#31A091", "AccentEdge": "#3C9F98", "AccentMute": "#476D6A", "AccentSubtle": "#334645", "BorderBrass": "#3C9F98", "TextOnAccent": "#17181A"}, "sky": {"Accent": "#40C9F6", "AccentBright": "#7AD2FD", "AccentHover": "#7AD2FD", "AccentDeep": "#239BBB", "AccentPale": "#B0E0FD", "SystemAccent": "#40C9F6", "SystemAccentLight1": "#5CCFFC", "SystemAccentLight2": "#79D3FD", "SystemAccentLight3": "#93D9FD", "SystemAccentDark1": "#39B5DD", "SystemAccentDark2": "#33A1C5", "SystemAccentDark3": "#2E8CAC", "AccentDim": "#239BBB", "AccentEdge": "#3E99BC", "AccentMute": "#486A7A", "AccentSubtle": "#34454D", "BorderBrass": "#3E99BC", "TextOnAccent": "#17181A"}, "violet": {"Accent": "#BEA8FE", "AccentBright": "#D2B6FD", "AccentHover": "#D2B6FD", "AccentDeep": "#8E7DD2", "AccentPale": "#E4CDFE", "SystemAccent": "#BEA8FE", "SystemAccentLight1": "#C8B0FC", "SystemAccentLight2": "#D1B8FD", "SystemAccentLight3": "#D9C2FD", "SystemAccentDark1": "#AD93F3", "SystemAccentDark2": "#9A82D8", "SystemAccentDark3": "#8671BC", "AccentDim": "#8E7DD2", "AccentEdge": "#967DCA", "AccentMute": "#6A5E7F", "AccentSubtle": "#443E4F", "BorderBrass": "#967DCA", "TextOnAccent": "#17181A"}, "magenta": {"Accent": "#F190E9", "AccentBright": "#FDA3E5", "AccentHover": "#FDA3E5", "AccentDeep": "#B66DB7", "AccentPale": "#FEC5E9", "SystemAccent": "#F190E9", "SystemAccentLight1": "#F999E8", "SystemAccentLight2": "#FDA4E8", "SystemAccentLight3": "#FEB2E9", "SystemAccentDark1": "#D981D2", "SystemAccentDark2": "#C173BA", "SystemAccentDark3": "#A964A2", "AccentDim": "#B66DB7", "AccentEdge": "#B970AD", "AccentMute": "#7A5871", "AccentSubtle": "#4D3B48", "BorderBrass": "#B970AD", "TextOnAccent": "#17181A"}, "pink": {"Accent": "#FE90BD", "AccentBright": "#FEA9C0", "AccentHover": "#FEA9C0", "AccentDeep": "#C56A94", "AccentPale": "#FFC8D2", "SystemAccent": "#FE90BD", "SystemAccentLight1": "#FE9EBE", "SystemAccentLight2": "#FFAAC3", "SystemAccentLight3": "#FFB8CA", "SystemAccentDark1": "#E87FAA", "SystemAccentDark2": "#CF7097", "SystemAccentDark3": "#B56283", "AccentDim": "#C56A94", "AccentEdge": "#C56E8D", "AccentMute": "#7F5863", "AccentSubtle": "#503B41", "BorderBrass": "#C56E8D", "TextOnAccent": "#17181A"}, "custom": {"Accent": "#5276FE", "AccentBright": "#7582FE", "AccentHover": "#7582FE", "AccentDeep": "#284FC0", "AccentPale": "#9299F4", "SystemAccent": "#5276FE", "SystemAccentLight1": "#657CFE", "SystemAccentLight2": "#7385FB", "SystemAccentLight3": "#808EFA", "SystemAccentDark1": "#4464E6", "SystemAccentDark2": "#3953C7", "SystemAccentDark3": "#2E43A9", "AccentDim": "#5684FA", "AccentEdge": "#6A83F1", "AccentMute": "#576191", "AccentSubtle": "#3B4059", "BorderBrass": "#6A83F1", "TextOnAccent": "#17181A"}, "custom-adjusted": true}, "studio-light": {"orange": {"Accent": "#EF8A0C", "AccentBright": "#C46A00", "AccentHover": "#C46A00", "AccentDeep": "#D47800", "AccentPale": "#8A4A00", "SystemAccent": "#EF8A0C", "SystemAccentLight1": "#F19829", "SystemAccentLight2": "#F3A646", "SystemAccentLight3": "#F5B463", "SystemAccentDark1": "#D77C0B", "SystemAccentDark2": "#BF6E0A", "SystemAccentDark3": "#A76108", "AccentDim": "#F7C27A", "AccentEdge": "#ECA54E", "AccentMute": "#C9A77A", "AccentSubtle": "#E6D6C4", "BorderBrass": "#ECA54E", "TextOnAccent": "#17181A"}, "lime": {"Accent": "#8EB33D", "AccentBright": "#758D21", "AccentHover": "#758D21", "AccentDeep": "#7D9D31", "AccentPale": "#506316", "SystemAccent": "#8EB33D", "SystemAccentLight1": "#8FBD57", "SystemAccentLight2": "#96C76E", "SystemAccentLight3": "#A1CF85", "SystemAccentDark1": "#7FA137", "SystemAccentDark2": "#708F30", "SystemAccentDark3": "#607D2C", "AccentDim": "#AEDC9D", "AccentEdge": "#98C675", "AccentMute": "#9AB88F", "AccentSubtle": "#D2DDCB", "BorderBrass": "#98C675", "TextOnAccent": "#17181A"}, "aqua": {"Accent": "#1DB8AA", "AccentBright": "#039383", "AccentHover": "#039383", "AccentDeep": "#0EA295", "AccentPale": "#0E655B", "SystemAccent": "#1DB8AA", "SystemAccentLight1": "#3AC0B8", "SystemAccentLight2": "#55C7C3", "SystemAccentLight3": "#71CECD", "SystemAccentDark1": "#19A599", "SystemAccentDark2": "#159287", "SystemAccentDark3": "#127F77", "AccentDim": "#8DDDDF", "AccentEdge": "#63C9C6", "AccentMute": "#86B8B9", "AccentSubtle": "#C9DEDD", "BorderBrass": "#63C9C6", "TextOnAccent": "#17181A"}, "sky": {"Accent": "#18B2DE", "AccentBright": "#038EAE", "AccentHover": "#038EAE", "AccentDeep": "#039DC3", "AccentPale": "#04637A", "SystemAccent": "#18B2DE", "SystemAccentLight1": "#44B9E7", "SystemAccentLight2": "#61C0EE", "SystemAccentLight3": "#7BC9F2", "SystemAccentDark1": "#16A0C7", "SystemAccentDark2": "#138DB1", "SystemAccentDark3": "#157B9B", "AccentDim": "#96D6FD", "AccentEdge": "#6BC2EC", "AccentMute": "#8CB3CD", "AccentSubtle": "#CADCE6", "BorderBrass": "#6BC2EC", "TextOnAccent": "#17181A"}, "violet": {"Accent": "#AE92FA", "AccentBright": "#8774CD", "AccentHover": "#8774CD", "AccentDeep": "#997FDE", "AccentPale": "#5F5091", "SystemAccent": "#AE92FA", "SystemAccentLight1": "#BC9AFB", "SystemAccentLight2": "#C8A4FD", "SystemAccentLight3": "#D2B0FD", "SystemAccentDark1": "#9D83E1", "SystemAccentDark2": "#8B74C8", "SystemAccentDark3": "#7B65AF", "AccentDim": "#DEBCFF", "AccentEdge": "#C5A3F5", "AccentMute": "#B9A3CE", "AccentSubtle": "#DDD5E8", "BorderBrass": "#C5A3F5", "TextOnAccent": "#17181A"}, "magenta": {"Accent": "#DD7ED6", "AccentBright": "#B063B1", "AccentHover": "#B063B1", "AccentDeep": "#C36EBE", "AccentPale": "#7D447C", "SystemAccent": "#DD7ED6", "SystemAccentLight1": "#E888D6", "SystemAccentLight2": "#F095D8", "SystemAccentLight3": "#F6A4DC", "SystemAccentDark1": "#C771C0", "SystemAccentDark2": "#B164AB", "SystemAccentDark3": "#9C5894", "AccentDim": "#FDB1DF", "AccentEdge": "#EA95D2", "AccentMute": "#CD9CB9", "AccentSubtle": "#E7D2DF", "BorderBrass": "#EA95D2", "TextOnAccent": "#17181A"}, "pink": {"Accent": "#EE7BAB", "AccentBright": "#BF608D", "AccentHover": "#BF608D", "AccentDeep": "#D26B97", "AccentPale": "#874262", "SystemAccent": "#EE7BAB", "SystemAccentLight1": "#F687AD", "SystemAccentLight2": "#FC94B1", "SystemAccentLight3": "#FDA5BA", "SystemAccentDark1": "#D66F9A", "SystemAccentDark2": "#BF6288", "SystemAccentDark3": "#A85676", "AccentDim": "#FDB6C2", "AccentEdge": "#F594AF", "AccentMute": "#D39DA5", "AccentSubtle": "#EAD2D6", "BorderBrass": "#F594AF", "TextOnAccent": "#17181A"}, "custom": {"Accent": "#5276FE", "AccentBright": "#2E57D0", "AccentHover": "#2E57D0", "AccentDeep": "#4162E4", "AccentPale": "#1A348A", "SystemAccent": "#5276FE", "SystemAccentLight1": "#6A7FFB", "SystemAccentLight2": "#7B89FA", "SystemAccentLight3": "#8A93FD", "SystemAccentDark1": "#4665E7", "SystemAccentDark2": "#3B56CA", "SystemAccentDark3": "#3448AE", "AccentDim": "#C3C7FE", "AccentEdge": "#A2AFFF", "AccentMute": "#A3A6E8", "AccentSubtle": "#D2D7F3", "BorderBrass": "#A2AFFF", "TextOnAccent": "#17181A"}, "custom-adjusted": true}, "ember-graphite": {"orange": {"Accent": "#D8A03D", "AccentBright": "#F0C060", "AccentHover": "#E9BE6A", "AccentDeep": "#B08536", "AccentPale": "#FCE5B8", "SystemAccent": "#D8A03D", "SystemAccentLight1": "#DDAB54", "SystemAccentLight2": "#E1B76C", "SystemAccentLight3": "#E6C283", "SystemAccentDark1": "#C29037", "SystemAccentDark2": "#AD8031", "SystemAccentDark3": "#97702B", "AccentDim": "#8A6B2E", "AccentEdge": "#5E4A22", "AccentMute": "#7A6130", "AccentSubtle": "#241F17", "BorderBrass": "#6B5326", "TextOnAccent": "#171613"}, "lime": {"Accent": "#96BB46", "AccentBright": "#A9DA71", "AccentHover": "#A9D678", "AccentDeep": "#799B40", "AccentPale": "#D7F2C0", "SystemAccent": "#96BB46", "SystemAccentLight1": "#9EC45D", "SystemAccentLight2": "#A8CD76", "SystemAccentLight3": "#B4D58B", "SystemAccentDark1": "#86A840", "SystemAccentDark2": "#789638", "SystemAccentDark3": "#688332", "AccentDim": "#5E7C38", "AccentEdge": "#405529", "AccentMute": "#566F38", "AccentSubtle": "#1D2218", "BorderBrass": "#4A602D", "TextOnAccent": "#17181A"}, "aqua": {"Accent": "#32C4B5", "AccentBright": "#5CE0D8", "AccentHover": "#69DBD3", "AccentDeep": "#2FA197", "AccentPale": "#BBF5F1", "SystemAccent": "#32C4B5", "SystemAccentLight1": "#50CBBF", "SystemAccentLight2": "#6CD2C9", "SystemAccentLight3": "#85DAD1", "SystemAccentDark1": "#2DB0A3", "SystemAccentDark2": "#299D91", "SystemAccentDark3": "#24897F", "AccentDim": "#2A7F7A", "AccentEdge": "#205754", "AccentMute": "#2E726D", "AccentSubtle": "#182221", "BorderBrass": "#24635E", "TextOnAccent": "#17181A"}, "sky": {"Accent": "#2BBCE8", "AccentBright": "#7CD5FD", "AccentHover": "#73D3FC", "AccentDeep": "#2F9ABF", "AccentPale": "#CCEEFF", "SystemAccent": "#2BBCE8", "SystemAccentLight1": "#4FC4ED", "SystemAccentLight2": "#6DCCF2", "SystemAccentLight3": "#86D4F5", "SystemAccentDark1": "#29A9D1", "SystemAccentDark2": "#2497BA", "SystemAccentDark3": "#2183A3", "AccentDim": "#2D7A98", "AccentEdge": "#235468", "AccentMute": "#316D86", "AccentSubtle": "#172226", "BorderBrass": "#255F75", "TextOnAccent": "#17181A"}, "violet": {"Accent": "#B298FB", "AccentBright": "#D1BAFE", "AccentHover": "#CEB6FD", "AccentDeep": "#957CD0", "AccentPale": "#ECE2FF", "SystemAccent": "#B298FB", "SystemAccentLight1": "#BCA2FE", "SystemAccentLight2": "#C6AEFF", "SystemAccentLight3": "#CEBBFD", "SystemAccentDark1": "#A187E5", "SystemAccentDark2": "#8F78CD", "SystemAccentDark3": "#7D69B3", "AccentDim": "#7862A3", "AccentEdge": "#53446F", "AccentMute": "#6C5A8F", "AccentSubtle": "#201E28", "BorderBrass": "#5D4D7E", "TextOnAccent": "#17181A"}, "magenta": {"Accent": "#E283DB", "AccentBright": "#FDA6EB", "AccentHover": "#FCA1E9", "AccentDeep": "#BB6DB2", "AccentPale": "#FFDBF5", "SystemAccent": "#E283DB", "SystemAccentLight1": "#E990DF", "SystemAccentLight2": "#EF9EE2", "SystemAccentLight3": "#F3ADE7", "SystemAccentDark1": "#CC76C4", "SystemAccentDark2": "#B669AF", "SystemAccentDark3": "#9F5B99", "AccentDim": "#96578A", "AccentEdge": "#673C5E", "AccentMute": "#85507A", "AccentSubtle": "#261C24", "BorderBrass": "#73446C", "TextOnAccent": "#17181A"}, "pink": {"Accent": "#F380B0", "AccentBright": "#FFACC6", "AccentHover": "#FEA8C2", "AccentDeep": "#C86B8F", "AccentPale": "#FEDEE6", "SystemAccent": "#F380B0", "SystemAccentLight1": "#F98DB7", "SystemAccentLight2": "#FD9CBE", "SystemAccentLight3": "#FDADC8", "SystemAccentDark1": "#DB739E", "SystemAccentDark2": "#C3668D", "SystemAccentDark3": "#AB597B", "AccentDim": "#9F566F", "AccentEdge": "#6D3C4C", "AccentMute": "#8C5064", "AccentSubtle": "#271C20", "BorderBrass": "#7B4357", "TextOnAccent": "#17181A"}, "custom": {"Accent": "#5276FE", "AccentBright": "#8197FF", "AccentHover": "#7E93FC", "AccentDeep": "#425ACE", "AccentPale": "#ACBAFC", "SystemAccent": "#5276FE", "SystemAccentLight1": "#6181FE", "SystemAccentLight2": "#728DFC", "SystemAccentLight3": "#7E98FC", "SystemAccentDark1": "#4665E7", "SystemAccentDark2": "#3A56CA", "SystemAccentDark3": "#3047AC", "AccentDim": "#5567C4", "AccentEdge": "#3C4786", "AccentMute": "#4F5EAB", "AccentSubtle": "#1B1F2D", "BorderBrass": "#415197", "TextOnAccent": "#17181A"}, "custom-adjusted": true}, "ember-paper": {"orange": {"Accent": "#AD7716", "AccentBright": "#744D07", "AccentHover": "#8F6110", "AccentDeep": "#7A5008", "AccentPale": "#5C3C04", "SystemAccent": "#AD7716", "SystemAccentLight1": "#B78732", "SystemAccentLight2": "#C1984E", "SystemAccentLight3": "#CBA86A", "SystemAccentDark1": "#9C6B14", "SystemAccentDark2": "#8A5F12", "SystemAccentDark3": "#79530F", "AccentDim": "#9C8034", "AccentEdge": "#D3B173", "AccentMute": "#C39B4F", "AccentSubtle": "#F2E4C4", "BorderBrass": "#C9A254", "TextOnAccent": "#FFFBF2"}, "lime": {"Accent": "#6F920C", "AccentBright": "#4A5F08", "AccentHover": "#5B7704", "AccentDeep": "#4F6304", "AccentPale": "#3A4B04", "SystemAccent": "#6F920C", "SystemAccentLight1": "#77A036", "SystemAccentLight2": "#84AF55", "SystemAccentLight3": "#95BC70", "SystemAccentDark1": "#64830B", "SystemAccentDark2": "#57740D", "SystemAccentDark3": "#4C660B", "AccentDim": "#5C9549", "AccentEdge": "#9DC57A", "AccentMute": "#84B258", "AccentSubtle": "#D5EECA", "BorderBrass": "#88BA60", "TextOnAccent": "#17181A"}, "aqua": {"Accent": "#18978B", "AccentBright": "#07645B", "AccentHover": "#127C72", "AccentDeep": "#09685E", "AccentPale": "#044F47", "SystemAccent": "#18978B", "SystemAccentLight1": "#03A79D", "SystemAccentLight2": "#40B4AE", "SystemAccentLight3": "#64C0BB", "SystemAccentDark1": "#16887D", "SystemAccentDark2": "#027970", "SystemAccentDark3": "#026A62", "AccentDim": "#1C9599", "AccentEdge": "#6DC8C4", "AccentMute": "#40B6B2", "AccentSubtle": "#C4EFEF", "BorderBrass": "#45BDBA", "TextOnAccent": "#17181A"}, "sky": {"Accent": "#1191B4", "AccentBright": "#0D5F76", "AccentHover": "#087794", "AccentDeep": "#0A647B", "AccentPale": "#074B5E", "SystemAccent": "#1191B4", "SystemAccentLight1": "#139FCA", "SystemAccentLight2": "#47ACD6", "SystemAccentLight3": "#68B9DF", "SystemAccentDark1": "#1082A3", "SystemAccentDark2": "#117390", "SystemAccentDark3": "#0E657F", "AccentDim": "#3A8CBC", "AccentEdge": "#73C2E8", "AccentMute": "#4AAEDB", "AccentSubtle": "#CBEAFF", "BorderBrass": "#52B5E3", "TextOnAccent": "#17181A"}, "violet": {"Accent": "#8C6FD4", "AccentBright": "#5C4890", "AccentHover": "#735BB0", "AccentDeep": "#5F4C97", "AccentPale": "#483873", "SystemAccent": "#8C6FD4", "SystemAccentLight1": "#9D7DDD", "SystemAccentLight2": "#AE8DE5", "SystemAccentLight3": "#BB9FEB", "SystemAccentDark1": "#7E64C0", "SystemAccentDark2": "#7158AA", "SystemAccentDark3": "#634D95", "AccentDim": "#986EBC", "AccentEdge": "#C3A6F1", "AccentMute": "#B08DE6", "AccentSubtle": "#EDDEFF", "BorderBrass": "#B993EC", "TextOnAccent": "#17181A"}, "magenta": {"Accent": "#BB5FB5", "AccentBright": "#7E3D7B", "AccentHover": "#9B4E97", "AccentDeep": "#834182", "AccentPale": "#653062", "SystemAccent": "#BB5FB5", "SystemAccentLight1": "#CB6EBD", "SystemAccentLight2": "#D881C6", "SystemAccentLight3": "#E195CF", "SystemAccentDark1": "#A956A4", "SystemAccentDark2": "#974C91", "SystemAccentDark3": "#85437F", "AccentDim": "#B96198", "AccentEdge": "#E699D2", "AccentMute": "#D77EC2", "AccentSubtle": "#FED9EF", "BorderBrass": "#E084C7", "TextOnAccent": "#17181A"}, "pink": {"Accent": "#CB5C8C", "AccentBright": "#893B5E", "AccentHover": "#A84B74", "AccentDeep": "#8F3E64", "AccentPale": "#6E2E4B", "SystemAccent": "#CB5C8C", "SystemAccentLight1": "#D96C95", "SystemAccentLight2": "#E480A0", "SystemAccentLight3": "#EC94AF", "SystemAccentDark1": "#B7537F", "SystemAccentDark2": "#A34A70", "SystemAccentDark3": "#904062", "AccentDim": "#C06175", "AccentEdge": "#F098B1", "AccentMute": "#E37D9C", "AccentSubtle": "#FEDBE0", "BorderBrass": "#EC83A1", "TextOnAccent": "#17181A"}, "custom": {"Accent": "#5276FE", "AccentBright": "#304CB1", "AccentHover": "#3F5FD8", "AccentDeep": "#2E50B9", "AccentPale": "#243B8E", "SystemAccent": "#5276FE", "SystemAccentLight1": "#6D87FC", "SystemAccentLight2": "#8497FE", "SystemAccentLight3": "#97A8FD", "SystemAccentDark1": "#4769EB", "SystemAccentDark2": "#415CD1", "SystemAccentDark3": "#3851B8", "AccentDim": "#7670EA", "AccentEdge": "#A2B1FD", "AccentMute": "#8899FC", "AccentSubtle": "#E0E3FE", "BorderBrass": "#92A0FB", "TextOnAccent": "#17181A"}, "custom-adjusted": true}};+const PRESETS = [["orange", "Orange"], ["lime", "Lime"], ["aqua", "Aqua"], ["sky", "Sky"], ["violet", "Violet"], ["magenta", "Magenta"], ["pink", "Pink"]];+const NAMES = {"studio-dark": "Studio Dark", "studio-light": "Studio Light", "ember-graphite": "Ember Graphite", "ember-paper": "Ember Paper"};+const CUSTOM = "#4C6FFF";+const EXAMPLES = {"#00B5D8": {"rows": {"studio-dark": {"Accent": "#00B5D8", "adjusted": false}, "studio-light": {"Accent": "#00B5D8", "adjusted": false}, "ember-graphite": {"Accent": "#00B5D8", "adjusted": false}, "ember-paper": {"Accent": "#00B5D8", "adjusted": false}}, "why": [], "hsv": [190, 100, 85]}, "#4C6FFF": {"rows": {"studio-dark": {"Accent": "#5276FE", "adjusted": true}, "studio-light": {"Accent": "#5276FE", "adjusted": true}, "ember-graphite": {"Accent": "#5276FE", "adjusted": true}, "ember-paper": {"Accent": "#5276FE", "adjusted": true}}, "why": [], "hsv": [228, 70, 100]}, "#3FA7FF": {"rows": {"studio-dark": {"Accent": "#3FA7FF", "adjusted": false}, "studio-light": null, "ember-graphite": {"Accent": "#3FA7FF", "adjusted": false}, "ember-paper": {"Accent": "#3FA7FF", "adjusted": false}}, "why": [["Studio Light", "solo"]], "hsv": [207, 75, 100]}, "#8C8C8C": {"rows": {"studio-dark": null, "studio-light": null, "ember-graphite": null, "ember-paper": null}, "why": [["Studio Dark", "grey"], ["Studio Light", "grey"], ["Ember Graphite", "grey"], ["Ember Paper", "grey"]], "hsv": [0, 0, 55]}};+const PICK = ["Accent","AccentBright","AccentHover","AccentDeep","AccentPale","AccentDim","AccentEdge","AccentMute","AccentSubtle","BorderBrass","TextOnAccent"];+let theme = "studio-dark", accent = "violet";+const TRACK = i => `var(--Track${i})`;+function vars(tid, aid) {+ const t = THEMES[tid], a = ACCENTS[tid][aid];+ return Object.entries(t).map(([k, v]) => `--${k}:${(PICK.includes(k) && a[k]) || v}`).join(";")+ + ";--TextOnAccent:" + a.TextOnAccent;+}+const svgPlay = c => `<svg viewBox="0 0 16 16"><path d="M4 2.5v11l9-5.5z" fill="${c}"/></svg>`;+const svgLoop = c => `<svg viewBox="0 0 16 16" fill="none" stroke="${c}" stroke-width="1.6" stroke-linecap="round"><path d="M3 9V7a3 3 0 0 1 3-3h7M11 2l2 2-2 2M13 7v2a3 3 0 0 1-3 3H3M5 14l-2-2 2-2"/></svg>`;+const svgMet = c => `<svg viewBox="0 0 16 16" fill="none" stroke="${c}" stroke-width="1.5" stroke-linejoin="round"><path d="M5 14h6L9 2H7zM8 10l4-6"/></svg>`;+const svgPen = c => `<svg viewBox="0 0 16 16" fill="none" stroke="${c}" stroke-width="1.6" stroke-linecap="round"><path d="M3 13l1-3 7-7 2 2-7 7z"/></svg>`;+function knob(val, hot, label) {+ const a0 = 135, a1 = 135 + 270 * val, r = 14, cx = 18, cy = 18;+ const p = d => [cx + r * Math.cos(d * Math.PI / 180), cy + r * Math.sin(d * Math.PI / 180)];+ const [x0, y0] = p(a0), [x1, y1] = p(a1), [xe, ye] = p(45);+ const large = (a1 - a0) > 180 ? 1 : 0;+ return `<div class="knob"><svg width="36" height="36"><path d="M${x0} ${y0}A${r} ${r} 0 1 1 ${xe} ${ye}" stroke="var(--BgSunken)" stroke-width="3" fill="none" stroke-linecap="round"/>+ <path d="M${x0} ${y0}A${r} ${r} 0 ${large} 1 ${x1} ${y1}" stroke="${hot ? "var(--Accent)" : "var(--VizInk)"}" stroke-width="3" fill="none" stroke-linecap="round"/>+ <circle cx="18" cy="18" r="9" fill="var(--SurfaceRaised)"/></svg><span>${label}</span></div>`;+}+function mini(tid, aid) {+ const t = THEMES[tid], a = ACCENTS[tid][aid];+ return `<div class="mini" style="background:${t.BgApp}">+ <i style="left:0;right:0;top:0;height:11px;background:${t.Panel}"></i>+ <i style="left:3px;top:3px;width:8px;height:5px;border-radius:1px;background:${a.Accent}"></i>+ <i style="left:13px;top:3px;width:8px;height:5px;border-radius:1px;background:${t.SurfaceRaised}"></i>+ <i style="left:0;top:12px;width:28px;bottom:18px;background:${t.Panel}"></i>+ <i style="left:4px;top:18px;width:16px;height:2px;background:${t.TextMuted}"></i>+ <i style="left:2px;top:23px;width:24px;height:6px;border-radius:1px;background:${a.AccentSubtle}"></i>+ <i style="left:34px;top:16px;width:40px;height:10px;border-radius:1px;background:${t.Track1}"></i>+ <i style="left:52px;top:29px;width:50px;height:10px;border-radius:1px;background:${t.Track2};box-shadow:0 0 0 1px ${a.Accent}"></i>+ <i style="left:38px;top:42px;width:30px;height:10px;border-radius:1px;background:${t.Track3}"></i>+ <i style="left:78px;top:12px;width:1px;bottom:18px;background:${a.Accent}"></i>+ <i style="left:0;right:0;bottom:0;height:17px;background:${t.Panel}"></i>+ <i style="left:4px;bottom:3px;width:50px;height:11px;border-radius:1px;background:${t.SurfaceCard}"></i>+ <i style="left:48px;bottom:9px;width:4px;height:2px;border-radius:1px;background:${a.Accent}"></i></div>`;+}+function render() {+ document.querySelectorAll("#themeBar button").forEach(b => b.classList.toggle("on", b.dataset.t === theme));+ const pane = document.getElementById("pane"); pane.setAttribute("style", vars(theme, accent));+ const card = tid => `<div class="tcard"><div class="tframe ${tid === theme ? "on" : ""}">${mini(tid, accent)}</div>${NAMES[tid]}</div>`;+ document.getElementById("cardsDark").innerHTML = card("studio-dark") + card("ember-graphite");+ document.getElementById("cardsLight").innerHTML = card("studio-light") + card("ember-paper");+ const acc = ACCENTS[theme];+ document.getElementById("accents").innerHTML =+ PRESETS.map(([id, name]) => `<div class="sw ${id === accent ? "on" : ""}" title="${name}" data-a="${id}"><i style="background:${acc[id].Accent}"></i></div>`).join("")+ + `<span class="gap"></span><span class="btn ${accent === "custom" ? "on" : ""}" data-a="custom"><b style="background:${acc.custom.Accent}"></b>Custom${svgPen("var(--TextMuted)")}</span>`+ + `<span class="readout">${accent === "custom" ? "Custom · " + CUSTOM : PRESETS.find(p => p[0] === accent)[1]}</span>`;+ document.querySelectorAll("[data-a]").forEach(e => e.onclick = () => { accent = e.dataset.a; render(); });++ // pickers: three states, worn in the current theme+ const picker = (title, hex, sv, hue, inT, note, bad) => `<div><div class="cap" style="margin:0 0 6px">${title}</div>+ <div class="scope" style="${vars(theme, accent)};padding:14px;background:var(--Panel)"><div class="pop">+ <div class="sv" style="background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(${hue},100%,50%))"><span class="h" style="left:${sv[0]}%;top:${sv[1]}%"></span></div>+ <div class="hue"><span class="h" style="left:${hue / 3.6}%"></span></div>+ <div class="prow2"><div class="chips2"><i style="background:${ACCENTS[theme].violet.Accent}" title="Before"></i><i style="background:${hex}" title="New"></i></div>+ <div class="field focus">${hex}</div></div>+ <div class="lbl">In themes</div>+ <div class="inthemes">${inT}</div>+ <div class="pnote ${bad ? "bad" : ""}">${note}</div>+ </div></div></div>`;+ const short = n => n.replace("Studio ", "S. ").replace("Ember ", "E. ");+ const reason = w => w === "grey" ? "Pick a colour, not a grey — the accent has to read as a colour."+ : w === "unreadable" ? "No lightness keeps this readable"+ : `Too close to ${w}`;+ const ex = (hexv, title) => {+ const e = EXAMPLES[hexv], rows = e.rows;+ const strip = Object.keys(NAMES).map(tid => `<div><i class="${rows[tid] && rows[tid].adjusted ? "adj" : ""}" style="background:${rows[tid] ? rows[tid].Accent : "var(--BgSunken)"}"></i>${short(NAMES[tid])}</div>`).join("");+ let note, bad = false;+ if (e.why.length) {+ bad = true;+ note = e.why[0][1] === "grey" ? reason("grey")+ : `${reason(e.why[0][1])} in ${e.why.map(w => w[0]).join(", ")} — pick another colour. The accent stays as it was.`;+ } else {+ const adj = Object.keys(NAMES).filter(t => rows[t].adjusted).map(t => NAMES[t]);+ note = adj.length === 4 ? "Lightness adjusted slightly in every theme so the ink on it stays readable."+ : adj.length ? `Lightness adjusted in ${adj.join(", ")} to stay readable.` : "Worn as is in every theme.";+ }+ const [hh, ss, vv] = e.hsv;+ return picker(title, hexv, [ss, 100 - vv], hh, strip, note, bad);+ };+ document.getElementById("pickers").innerHTML =+ ex("#00B5D8", "Fits as is") + ex("#4C6FFF", "Adjusted") + ex("#3FA7FF", "Refused: clashes in one theme") + ex("#8C8C8C", "Refused: a grey");++ // specimens+ const spec = document.getElementById("spec"); spec.setAttribute("style", vars(theme, accent));+ spec.innerHTML = `+ <div class="lbl">Transport: play, loop, metronome on</div>+ <div class="tp"><span class="key on">${svgPlay("var(--TextOnAccent)")}</span><span class="key on">${svgLoop("var(--TextOnAccent)")}</span><span class="key">${svgMet("var(--TextSecondary)")}</span>+ <span style="width:10px"></span><div class="seg"><span class="on">Arrangement</span><span>Session</span></div></div>+ <div class="lbl">Lane: loop brace, selected clip, playhead</div>+ <div class="lane"><span class="loop" style="left:40px;width:150px"></span><span class="clip" style="left:10px;width:90px;background:${TRACK(1)}"></span>+ <span class="clip sel" style="left:120px;width:110px;background:${TRACK(5)}"></span><span class="ph" style="left:170px"></span></div>+ <div class="lbl">List: picked row (soft tint), menu hover (solid)</div>+ <div class="row" style="gap:10px"><div class="list"><div class="li">Drums</div><div class="li pick">Bass · picked</div><div class="li">Keys</div></div>+ <div class="list" style="width:150px"><div class="li">Rename</div><div class="li hov">Duplicate</div><div class="li">Delete</div></div></div>+ <div class="lbl">Device values: at rest neutral, dragged accent · power on</div>+ <div class="knobs">${knob(0.62, false, "Cutoff")}${knob(0.4, true, "Reso · drag")}<span class="sw2 on"><i></i></span><span class="sw2"><i></i></span></div>+ <div class="lbl">Accent line (graph frame on listen) · accent text</div>+ <div class="row" style="gap:16px;align-items:center"><div class="brass">${[3,6,9,7,12,15,11,8,5,9].map((h,i)=>`<u class="${i==5?"hot":""}" style="height:${h*2}px"></u>`).join("")}</div>+ <span class="txt">Link · 4 bars</span><span class="mono" style="color:var(--TextMuted)">${ACCENTS[theme][accent].Accent}</span></div>`;++ // matrix+ const m = document.getElementById("matrix");+ m.innerHTML = `<tr><th></th>${Object.values(NAMES).map(n => `<th>${n}</th>`).join("")}</tr>` ++ PRESETS.concat([["custom", "Custom " + CUSTOM]]).map(([id, name]) => `<tr><th>${name}</th>${Object.keys(NAMES).map(tid =>+ `<td><div class="scope cell" style="${vars(tid, id)}"><span class="key on">${svgPlay("var(--TextOnAccent)")}</span>+ <div class="lane"><span class="clip sel" style="left:8px;width:60px;background:${TRACK(5)}"></span><span class="ph" style="left:40px"></span></div>+ <div class="li pick" style="color:var(--AccentBright)">Bass</div>+ <div class="hexes">${ACCENTS[tid][id].Accent}<br>${ACCENTS[tid][id].AccentSubtle}</div></div></td>`).join("")}</tr>`).join("");+}+document.getElementById("themeBar").innerHTML = Object.entries(NAMES).map(([id, n]) => `<button data-t="${id}">${n}</button>`).join("");+document.querySelectorAll("#themeBar button").forEach(b => b.onclick = () => { theme = b.dataset.t; render(); });+render();+</script>+</body>+</html>diff --git a/specs/084-accent-colour/mockup/accent.template.html b/specs/084-accent-colour/mockup/accent.template.htmlnew file mode 100644index 00000000..8f69ad80--- /dev/null+++ b/specs/084-accent-colour/mockup/accent.template.html@@ -0,0 +1,286 @@+<!-- SPDX-License-Identifier: AGPL-3.0-only -->+<!-- Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms. -->+<!doctype html>+<html lang="en">+<head>+<meta charset="utf-8">+<title>specs/084 · Accent colour — mockup</title>+<style>+ @font-face { font-family: "Geist"; src: url("{{FONTS}}/Geist-Regular.ttf"); font-weight: 400; }+ @font-face { font-family: "Geist"; src: url("{{FONTS}}/Geist-SemiBold.ttf"); font-weight: 600; }+ @font-face { font-family: "Geist Mono"; src: url("{{FONTS}}/GeistMono-Regular.ttf"); font-weight: 400; }+ * { box-sizing: border-box; }+ body { margin: 0; padding: 24px 28px 40px; background: #101113; color: #E8E9EB; font: 11px "Geist", system-ui, sans-serif; }+ h1 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }+ h2 { font-size: 12px; font-weight: 600; margin: 28px 0 8px; color: #C0C4C9; }+ p.note { color: #92969D; margin: 0 0 14px; max-width: 900px; line-height: 1.5; }+ .mono { font-family: "Geist Mono", ui-monospace, monospace; }+ .bar { display: flex; gap: 2px; margin: 10px 0 0; }+ .bar button { font: 11px "Geist"; color: #C0C4C9; background: #2B2D31; border: 1px solid #141517; padding: 4px 10px; border-radius: 3px; cursor: pointer; }+ .bar button.on { background: #E8E9EB; color: #17181A; }+ .row { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }+ .cap { color: #92969D; font-size: 10px; margin-top: 6px; max-width: 520px; line-height: 1.45; }++ /* ---- a scope wears one theme + accent through CSS variables ---- */+ .scope { background: var(--BgApp); color: var(--TextPrimary); border: 1px solid var(--Seam); }++ /* Settings pane excerpt */+ .pane { width: 640px; padding: 18px 22px 20px; background: var(--Panel); }+ .sect { font-size: 11px; font-weight: 600; color: var(--TextSecondary); margin-bottom: 12px; }+ .prow { display: grid; grid-template-columns: 128px 1fr; column-gap: 16px; align-items: start; margin-bottom: 8px; }+ .plabel { font-size: 12px; color: var(--TextSecondary); padding-top: 3px; }+ .pcap { font-size: 11px; color: var(--TextMuted); line-height: 1.45; }+ .seg { display: inline-flex; gap: 1px; background: var(--Seam); border: 1px solid var(--Seam); border-radius: 3px; overflow: hidden; }+ .seg span { font-size: 12px; padding: 3px 10px; background: var(--SurfaceRaised); color: var(--TextSecondary); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }+ .seg span.on { background: var(--Accent); color: var(--TextOnAccent); }+ .cards { display: flex; gap: 12px; margin: 10px 0 4px; }+ .tcard { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--TextPrimary); }+ .tframe { padding: 2px; border-radius: 4px; border: 2px solid transparent; }+ .tframe.on { border-color: var(--Accent); }+ .mini { width: 120px; height: 72px; border-radius: 2px; position: relative; overflow: hidden; border: 1px solid #0006; }+ .mini i { position: absolute; display: block; }+ .mlabel { font-size: 11px; color: var(--TextMuted); margin: 6px 0 0; }++ /* the accent row */+ .accents { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }+ .sw { width: 22px; height: 22px; border-radius: 4px; padding: 2px; border: 2px solid transparent; cursor: pointer; }+ .sw i { display: block; width: 100%; height: 100%; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }+ .sw.on { border-color: var(--TextPrimary); }+ .sw:hover:not(.on) { border-color: var(--Rule); }+ .gap { width: 6px; }+ .btn { height: 22px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 4px; border-radius: 3px; font-size: 12px;+ background: var(--SurfaceRaised); color: var(--TextSecondary); border: 1px solid var(--Seam); box-shadow: inset 0 1px 0 rgba(255,255,255,.07); cursor: pointer; }+ .btn.on { outline: 2px solid var(--TextPrimary); outline-offset: 1px; }+ .btn b { width: 14px; height: 14px; border-radius: 2px; display: block; }+ .btn svg { width: 10px; height: 10px; }+ .readout { font-size: 12px; color: var(--TextMuted); margin-left: 6px; }++ /* the picker popover */+ .pop { width: 240px; padding: 10px; border-radius: 3px; background: var(--SurfaceRaised); border: 1px solid var(--Seam);+ box-shadow: 0 10px 28px rgba(0,0,0,.42); display: flex; flex-direction: column; gap: 8px; position: relative; }+ .sv { height: 132px; border-radius: 3px; position: relative; border: 1px solid var(--Rule); }+ .sv .h { position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #0008; transform: translate(-6px,-6px); }+ .hue { height: 10px; border-radius: 3px; position: relative; border: 1px solid var(--Rule);+ background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }+ .hue .h { position: absolute; top: -3px; width: 4px; height: 14px; background: #fff; border-radius: 1px; box-shadow: 0 0 0 1px #0008; transform: translateX(-2px); }+ .prow2 { display: flex; align-items: center; gap: 6px; }+ .chips2 { display: flex; height: 22px; border: 1px solid var(--Rule); border-radius: 3px; overflow: hidden; }+ .chips2 i { width: 18px; display: block; }+ .field { flex: 1; height: 22px; display: flex; align-items: center; padding: 0 6px; border-radius: 3px; background: var(--BgSunken);+ border: 1px solid var(--Rule); color: var(--TextPrimary); font: 12px "Geist Mono"; }+ .field.focus { border-color: var(--AccentBright); }+ .inthemes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }+ .inthemes div { display: flex; flex-direction: column; gap: 3px; align-items: center; font-size: 9px; color: var(--TextMuted); }+ .inthemes i { display: block; width: 100%; height: 14px; border-radius: 2px; border: 1px solid #0005; position: relative; }+ .inthemes i.adj::after { content: ""; position: absolute; right: 2px; top: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--TextPrimary); box-shadow: 0 0 0 1px #0008; }+ .pnote { font-size: 11px; color: var(--TextMuted); line-height: 1.4; min-height: 30px; }+ .pnote.bad { color: var(--Danger); }++ /* specimens — accent in use */+ .spec { padding: 12px; display: grid; grid-template-columns: auto auto; gap: 10px 16px; align-items: center; width: 640px; background: var(--BgApp); }+ .lbl { color: var(--TextTertiary); font-size: 10px; }+ .tp { display: flex; gap: 2px; }+ .key { width: 26px; height: 20px; border-radius: 3px; background: var(--SurfaceRaised); border: 1px solid var(--Seam); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.07); }+ .key.on { background: var(--Accent); }+ .key svg { width: 10px; height: 10px; }+ .lane { position: relative; height: 40px; width: 300px; background: var(--LaneB); border: 1px solid var(--Seam); }+ .clip { position: absolute; top: 4px; height: 30px; border-radius: 2px; }+ .clip.sel { box-shadow: 0 0 0 1px var(--Accent); }+ .ph { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--Accent); }+ .loop { position: absolute; top: -1px; height: 4px; background: var(--Accent); }+ .list { width: 220px; background: var(--Panel); border: 1px solid var(--Seam); padding: 3px; }+ .li { height: 20px; display: flex; align-items: center; padding: 0 8px; font-size: 11px; color: var(--TextSecondary); border-radius: 2px; }+ .li.pick { background: var(--AccentSubtle); color: var(--TextPrimary); }+ .li.hov { background: var(--Accent); color: var(--TextOnAccent); }+ .knobs { display: flex; gap: 14px; align-items: center; }+ .knob { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 9px; color: var(--TextMuted); }+ .sw2 { width: 18px; height: 10px; border-radius: 5px; background: var(--BgSunken); border: 1px solid var(--Rule); position: relative; }+ .sw2.on { background: var(--Accent); border-color: var(--Accent); }+ .sw2 i { position: absolute; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--TextPrimary); }+ .sw2.on i { right: 1px; background: var(--TextOnAccent); }+ .brass { width: 140px; height: 40px; border-radius: 3px; background: var(--BgSunken); border: 1px solid var(--BorderBrass); display: flex; align-items: flex-end; padding: 4px; gap: 2px; }+ .brass u { flex: 1; background: var(--VizInk); border-radius: 1px; }+ .brass u.hot { background: var(--AccentBright); }+ .txt { font-size: 11px; color: var(--AccentBright); }++ /* matrix */+ table.m { border-collapse: separate; border-spacing: 6px; }+ table.m th { font-weight: 600; font-size: 10px; color: #92969D; text-align: left; padding: 0 2px; }+ .cell { padding: 8px; display: flex; gap: 6px; align-items: center; width: 220px; }+ .cell .lane { width: 92px; height: 26px; }+ .cell .clip { height: 18px; }+ .cell .li { height: 18px; width: 46px; padding: 0 4px; font-size: 10px; }+ .hexes { font: 9px "Geist Mono"; color: var(--TextMuted); line-height: 1.3; }+</style>+</head>+<body>+<h1>Choose the accent colour — specs/084 · nota-daw/nota#311</h1>+<p class="note">Every colour on this page is computed from the theme files by the derivation in research.md: Orange is the theme files+verbatim; another accent keeps each accent token's lightness relation to the theme's own orange and swaps hue and saturation,+then — only if the readability bar would fail — moves the lightness by the smallest step that passes. Click a swatch or a theme+to try it. The swatches, the Custom button and the picker are the new controls; everything else is the existing UI wearing the accent.</p>+<div class="bar" id="themeBar"></div>++<h2>1 · Settings → Appearance (excerpt, true size)</h2>+<div class="row">+ <div class="scope pane" id="pane">+ <div class="sect">UI</div>+ <div class="prow"><div class="plabel">Colour theme</div>+ <div>+ <div class="seg"><span class="on">Dark</span><span>Light</span><span>Follow system</span></div>+ <div class="mlabel">Dark</div>+ <div class="cards" id="cardsDark"></div>+ <div class="mlabel">Light</div>+ <div class="cards" id="cardsLight"></div>+ </div>+ </div>+ <div class="prow"><div></div><div class="pcap">Themes change colours only. Follow system wears a dark theme in dark mode and a light one in light mode.</div></div>+ <div class="prow" style="margin-top:10px"><div class="plabel">Accent</div>+ <div class="accents" id="accents"></div>+ </div>+ <div class="prow"><div></div><div class="pcap">The colour of what is live or chosen — the playhead, the loop, selection, toggles that are on. Tuned to each theme so it stays readable.</div></div>+ <div class="prow" style="margin-top:10px"><div class="plabel">Waveform</div><div><div class="seg"><span class="on">Smooth</span><span>Solid</span><span>Bars</span></div></div></div>+ </div>+ <div class="cap" style="max-width:300px">+ <b>Accent</b> sits directly under the theme picker. Seven presets, then <b>Custom</b>; the chosen one carries a 2 px ring in+ <span class="mono">TextPrimary</span> (colour only — the ring slot is always there, so nothing moves). A swatch's name is its+ tooltip; the chosen name is the readout at the end of the row. The theme cards preview each theme <i>with</i> the chosen accent.+ <br><br>Presets: Orange (default) · Lime · Aqua · Sky · Violet · Magenta · Pink — no yellow (mute), red (record), green (meter) or+ mid blue (solo). Each passes T3.4, T3.5, T3.8, the meter green and every track colour (ΔE ≥ 15) in all four themes — the smoke test enforces it.+ </div>+</div>++<h2>2 · Custom — the picker (a popover under the Custom button)</h2>+<div class="row" id="pickers"></div>+<p class="cap" style="max-width:900px">Saturation/brightness area, hue strip, the old/new chip and a hex field (Geist Mono; typing a valid value applies at once).+The <b>In themes</b> strip shows the colour as each theme will wear it; a dot marks a theme where its lightness was moved to stay readable.+Everything applies live while dragging; clicking outside keeps it and saves; Esc puts back the accent worn before the picker opened.+A colour no lightness can rescue (a grey, or one that sits on the record red / mute / solo / meter green in some theme) is not applied:+the note says why in Danger ink and the accent stays as it was. The spectrum is the one gradient in the app — content, like a waveform — listed in DESIGN.md's accepted exceptions.</p>++<h2>3 · The accent in use (current theme · current accent)</h2>+<div class="scope spec" id="spec"></div>++<h2>4 · Every preset in every theme</h2>+<table class="m" id="matrix"></table>++<script>+/*DATA*/+const PICK = ["Accent","AccentBright","AccentHover","AccentDeep","AccentPale","AccentDim","AccentEdge","AccentMute","AccentSubtle","BorderBrass","TextOnAccent"];+let theme = "studio-dark", accent = "violet";+const TRACK = i => `var(--Track${i})`;+function vars(tid, aid) {+ const t = THEMES[tid], a = ACCENTS[tid][aid];+ return Object.entries(t).map(([k, v]) => `--${k}:${(PICK.includes(k) && a[k]) || v}`).join(";")+ + ";--TextOnAccent:" + a.TextOnAccent;+}+const svgPlay = c => `<svg viewBox="0 0 16 16"><path d="M4 2.5v11l9-5.5z" fill="${c}"/></svg>`;+const svgLoop = c => `<svg viewBox="0 0 16 16" fill="none" stroke="${c}" stroke-width="1.6" stroke-linecap="round"><path d="M3 9V7a3 3 0 0 1 3-3h7M11 2l2 2-2 2M13 7v2a3 3 0 0 1-3 3H3M5 14l-2-2 2-2"/></svg>`;+const svgMet = c => `<svg viewBox="0 0 16 16" fill="none" stroke="${c}" stroke-width="1.5" stroke-linejoin="round"><path d="M5 14h6L9 2H7zM8 10l4-6"/></svg>`;+const svgPen = c => `<svg viewBox="0 0 16 16" fill="none" stroke="${c}" stroke-width="1.6" stroke-linecap="round"><path d="M3 13l1-3 7-7 2 2-7 7z"/></svg>`;+function knob(val, hot, label) {+ const a0 = 135, a1 = 135 + 270 * val, r = 14, cx = 18, cy = 18;+ const p = d => [cx + r * Math.cos(d * Math.PI / 180), cy + r * Math.sin(d * Math.PI / 180)];+ const [x0, y0] = p(a0), [x1, y1] = p(a1), [xe, ye] = p(45);+ const large = (a1 - a0) > 180 ? 1 : 0;+ return `<div class="knob"><svg width="36" height="36"><path d="M${x0} ${y0}A${r} ${r} 0 1 1 ${xe} ${ye}" stroke="var(--BgSunken)" stroke-width="3" fill="none" stroke-linecap="round"/>+ <path d="M${x0} ${y0}A${r} ${r} 0 ${large} 1 ${x1} ${y1}" stroke="${hot ? "var(--Accent)" : "var(--VizInk)"}" stroke-width="3" fill="none" stroke-linecap="round"/>+ <circle cx="18" cy="18" r="9" fill="var(--SurfaceRaised)"/></svg><span>${label}</span></div>`;+}+function mini(tid, aid) {+ const t = THEMES[tid], a = ACCENTS[tid][aid];+ return `<div class="mini" style="background:${t.BgApp}">+ <i style="left:0;right:0;top:0;height:11px;background:${t.Panel}"></i>+ <i style="left:3px;top:3px;width:8px;height:5px;border-radius:1px;background:${a.Accent}"></i>+ <i style="left:13px;top:3px;width:8px;height:5px;border-radius:1px;background:${t.SurfaceRaised}"></i>+ <i style="left:0;top:12px;width:28px;bottom:18px;background:${t.Panel}"></i>+ <i style="left:4px;top:18px;width:16px;height:2px;background:${t.TextMuted}"></i>+ <i style="left:2px;top:23px;width:24px;height:6px;border-radius:1px;background:${a.AccentSubtle}"></i>+ <i style="left:34px;top:16px;width:40px;height:10px;border-radius:1px;background:${t.Track1}"></i>+ <i style="left:52px;top:29px;width:50px;height:10px;border-radius:1px;background:${t.Track2};box-shadow:0 0 0 1px ${a.Accent}"></i>+ <i style="left:38px;top:42px;width:30px;height:10px;border-radius:1px;background:${t.Track3}"></i>+ <i style="left:78px;top:12px;width:1px;bottom:18px;background:${a.Accent}"></i>+ <i style="left:0;right:0;bottom:0;height:17px;background:${t.Panel}"></i>+ <i style="left:4px;bottom:3px;width:50px;height:11px;border-radius:1px;background:${t.SurfaceCard}"></i>+ <i style="left:48px;bottom:9px;width:4px;height:2px;border-radius:1px;background:${a.Accent}"></i></div>`;+}+function render() {+ document.querySelectorAll("#themeBar button").forEach(b => b.classList.toggle("on", b.dataset.t === theme));+ const pane = document.getElementById("pane"); pane.setAttribute("style", vars(theme, accent));+ const card = tid => `<div class="tcard"><div class="tframe ${tid === theme ? "on" : ""}">${mini(tid, accent)}</div>${NAMES[tid]}</div>`;+ document.getElementById("cardsDark").innerHTML = card("studio-dark") + card("ember-graphite");+ document.getElementById("cardsLight").innerHTML = card("studio-light") + card("ember-paper");+ const acc = ACCENTS[theme];+ document.getElementById("accents").innerHTML =+ PRESETS.map(([id, name]) => `<div class="sw ${id === accent ? "on" : ""}" title="${name}" data-a="${id}"><i style="background:${acc[id].Accent}"></i></div>`).join("")+ + `<span class="gap"></span><span class="btn ${accent === "custom" ? "on" : ""}" data-a="custom"><b style="background:${acc.custom.Accent}"></b>Custom${svgPen("var(--TextMuted)")}</span>`+ + `<span class="readout">${accent === "custom" ? "Custom · " + CUSTOM : PRESETS.find(p => p[0] === accent)[1]}</span>`;+ document.querySelectorAll("[data-a]").forEach(e => e.onclick = () => { accent = e.dataset.a; render(); });++ // pickers: three states, worn in the current theme+ const picker = (title, hex, sv, hue, inT, note, bad) => `<div><div class="cap" style="margin:0 0 6px">${title}</div>+ <div class="scope" style="${vars(theme, accent)};padding:14px;background:var(--Panel)"><div class="pop">+ <div class="sv" style="background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(${hue},100%,50%))"><span class="h" style="left:${sv[0]}%;top:${sv[1]}%"></span></div>+ <div class="hue"><span class="h" style="left:${hue / 3.6}%"></span></div>+ <div class="prow2"><div class="chips2"><i style="background:${ACCENTS[theme].violet.Accent}" title="Before"></i><i style="background:${hex}" title="New"></i></div>+ <div class="field focus">${hex}</div></div>+ <div class="lbl">In themes</div>+ <div class="inthemes">${inT}</div>+ <div class="pnote ${bad ? "bad" : ""}">${note}</div>+ </div></div></div>`;+ const short = n => n.replace("Studio ", "S. ").replace("Ember ", "E. ");+ const reason = w => w === "grey" ? "Pick a colour, not a grey — the accent has to read as a colour."+ : w === "unreadable" ? "No lightness keeps this readable"+ : `Too close to ${w}`;+ const ex = (hexv, title) => {+ const e = EXAMPLES[hexv], rows = e.rows;+ const strip = Object.keys(NAMES).map(tid => `<div><i class="${rows[tid] && rows[tid].adjusted ? "adj" : ""}" style="background:${rows[tid] ? rows[tid].Accent : "var(--BgSunken)"}"></i>${short(NAMES[tid])}</div>`).join("");+ let note, bad = false;+ if (e.why.length) {+ bad = true;+ note = e.why[0][1] === "grey" ? reason("grey")+ : `${reason(e.why[0][1])} in ${e.why.map(w => w[0]).join(", ")} — pick another colour. The accent stays as it was.`;+ } else {+ const adj = Object.keys(NAMES).filter(t => rows[t].adjusted).map(t => NAMES[t]);+ note = adj.length === 4 ? "Lightness adjusted slightly in every theme so the ink on it stays readable."+ : adj.length ? `Lightness adjusted in ${adj.join(", ")} to stay readable.` : "Worn as is in every theme.";+ }+ const [hh, ss, vv] = e.hsv;+ return picker(title, hexv, [ss, 100 - vv], hh, strip, note, bad);+ };+ document.getElementById("pickers").innerHTML =+ ex("#00B5D8", "Fits as is") + ex("#4C6FFF", "Adjusted") + ex("#3FA7FF", "Refused: clashes in one theme") + ex("#8C8C8C", "Refused: a grey");++ // specimens+ const spec = document.getElementById("spec"); spec.setAttribute("style", vars(theme, accent));+ spec.innerHTML = `+ <div class="lbl">Transport: play, loop, metronome on</div>+ <div class="tp"><span class="key on">${svgPlay("var(--TextOnAccent)")}</span><span class="key on">${svgLoop("var(--TextOnAccent)")}</span><span class="key">${svgMet("var(--TextSecondary)")}</span>+ <span style="width:10px"></span><div class="seg"><span class="on">Arrangement</span><span>Session</span></div></div>+ <div class="lbl">Lane: loop brace, selected clip, playhead</div>+ <div class="lane"><span class="loop" style="left:40px;width:150px"></span><span class="clip" style="left:10px;width:90px;background:${TRACK(1)}"></span>+ <span class="clip sel" style="left:120px;width:110px;background:${TRACK(5)}"></span><span class="ph" style="left:170px"></span></div>+ <div class="lbl">List: picked row (soft tint), menu hover (solid)</div>+ <div class="row" style="gap:10px"><div class="list"><div class="li">Drums</div><div class="li pick">Bass · picked</div><div class="li">Keys</div></div>+ <div class="list" style="width:150px"><div class="li">Rename</div><div class="li hov">Duplicate</div><div class="li">Delete</div></div></div>+ <div class="lbl">Device values: at rest neutral, dragged accent · power on</div>+ <div class="knobs">${knob(0.62, false, "Cutoff")}${knob(0.4, true, "Reso · drag")}<span class="sw2 on"><i></i></span><span class="sw2"><i></i></span></div>+ <div class="lbl">Accent line (graph frame on listen) · accent text</div>+ <div class="row" style="gap:16px;align-items:center"><div class="brass">${[3,6,9,7,12,15,11,8,5,9].map((h,i)=>`<u class="${i==5?"hot":""}" style="height:${h*2}px"></u>`).join("")}</div>+ <span class="txt">Link · 4 bars</span><span class="mono" style="color:var(--TextMuted)">${ACCENTS[theme][accent].Accent}</span></div>`;++ // matrix+ const m = document.getElementById("matrix");+ m.innerHTML = `<tr><th></th>${Object.values(NAMES).map(n => `<th>${n}</th>`).join("")}</tr>` ++ PRESETS.concat([["custom", "Custom " + CUSTOM]]).map(([id, name]) => `<tr><th>${name}</th>${Object.keys(NAMES).map(tid =>+ `<td><div class="scope cell" style="${vars(tid, id)}"><span class="key on">${svgPlay("var(--TextOnAccent)")}</span>+ <div class="lane"><span class="clip sel" style="left:8px;width:60px;background:${TRACK(5)}"></span><span class="ph" style="left:40px"></span></div>+ <div class="li pick" style="color:var(--AccentBright)">Bass</div>+ <div class="hexes">${ACCENTS[tid][id].Accent}<br>${ACCENTS[tid][id].AccentSubtle}</div></div></td>`).join("")}</tr>`).join("");+}+document.getElementById("themeBar").innerHTML = Object.entries(NAMES).map(([id, n]) => `<button data-t="${id}">${n}</button>`).join("");+document.querySelectorAll("#themeBar button").forEach(b => b.onclick = () => { theme = b.dataset.t; render(); });+render();+</script>+</body>+</html>diff --git a/specs/084-accent-colour/mockup/build.py b/specs/084-accent-colour/mockup/build.pynew file mode 100644index 00000000..6b89f503--- /dev/null+++ b/specs/084-accent-colour/mockup/build.py@@ -0,0 +1,213 @@+# SPDX-License-Identifier: AGPL-3.0-only+# Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+#+# Builds accent.html — the specs/084 mockup (Settings → Appearance → Accent, the custom+# colour picker, every preset in every theme) — with every colour computed from the theme+# files by the same derivation the app uses (research.md § Derivation), so the mockup+# shows real values, not a painter's guess.+# Usage: python3 build.py → accent.html next to this file.++import json+import math+import pathlib++HERE = pathlib.Path(__file__).resolve().parent+ROOT = HERE.parents[2]+THEMES = ROOT / "src/managed/Nota.App/Theme/Themes"+IDS = ["studio-dark", "studio-light", "ember-graphite", "ember-paper"]+NAMES = {"studio-dark": "Studio Dark", "studio-light": "Studio Light",+ "ember-graphite": "Ember Graphite", "ember-paper": "Ember Paper"}++# The accent family. Solid tokens move with the accent's lightness; blend tokens are+# washes over the theme's surfaces and keep the theme's lightness.+SOLID = ["Accent", "AccentBright", "AccentHover", "AccentDeep", "AccentPale",+ "SystemAccent", "SystemAccentLight1", "SystemAccentLight2", "SystemAccentLight3",+ "SystemAccentDark1", "SystemAccentDark2", "SystemAccentDark3"]+BLEND = ["AccentDim", "AccentEdge", "AccentMute", "AccentSubtle", "BorderBrass"]++# id, name, OKLCH chroma, OKLCH hue. Orange is the theme files themselves.+PRESETS = [("orange", "Orange", None, None), ("lime", "Lime", 0.15, 125), ("aqua", "Aqua", 0.12, 185),+ ("sky", "Sky", 0.13, 224), ("violet", "Violet", 0.15, 295), ("magenta", "Magenta", 0.16, 330),+ ("pink", "Pink", 0.15, 355)]+CUSTOM = "#4C6FFF"+# Picker examples: one worn as is, one adjusted, one refused (no lightness within reach passes).+EXAMPLES = ["#00B5D8", "#4C6FFF", "#3FA7FF", "#8C8C8C"]+MAX_SHIFT = 0.12 # OKLCH lightness a custom colour may be moved, at most+MIN_CHROMA = 0.05 # below this a colour reads as grey+++def hx(h):+ h = h.lstrip("#")[-6:]+ return tuple(int(h[i:i + 2], 16) / 255 for i in (0, 2, 4))+++def tohex(rgb):+ return "#" + "".join(f"{round(min(1, max(0, v)) * 255):02X}" for v in rgb)+++def lin(c): return c / 12.92 if c <= 0.04045 else ((c + 0.055) / 1.055) ** 2.4+def gam(c): return 12.92 * c if c <= 0.0031308 else 1.055 * c ** (1 / 2.4) - 0.055+++def oklch(rgb):+ r, g, b = (lin(v) for v in rgb)+ l = (0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b) ** (1 / 3)+ m = (0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b) ** (1 / 3)+ s = (0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b) ** (1 / 3)+ L = 0.2104542553 * l + 0.7936177850 * m - 0.0040720468 * s+ A = 1.9779984951 * l - 2.4285922050 * m + 0.4505937099 * s+ B = 0.0259040371 * l + 0.7827717662 * m - 0.8086757660 * s+ return L, math.hypot(A, B), math.degrees(math.atan2(B, A)) % 360+++def srgb(L, C, h):+ A, B = C * math.cos(math.radians(h)), C * math.sin(math.radians(h))+ l = (L + 0.3963377774 * A + 0.2158037573 * B) ** 3+ m = (L - 0.1055613458 * A - 0.0638541728 * B) ** 3+ s = (L - 0.0894841775 * A - 1.2914855480 * B) ** 3+ lr = (4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,+ -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,+ -0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s)+ ok = all(-1e-4 <= v <= 1 + 1e-4 for v in lr)+ return [gam(min(1, max(0, v))) for v in lr], ok+++def in_gamut(L, C, h):+ L = min(max(L, 0.0), 1.0)+ for _ in range(60):+ rgb, ok = srgb(L, C, h)+ if ok:+ return tohex(rgb)+ C *= 0.95+ return tohex(srgb(L, 0, h)[0])+++def lum(h):+ r, g, b = (lin(v) for v in hx(h))+ return 0.2126 * r + 0.7152 * g + 0.0722 * b+++def contrast(a, b):+ la, lb = lum(a), lum(b)+ return (max(la, lb) + .05) / (min(la, lb) + .05)+++def lab(h):+ r, g, b = (lin(v) for v in hx(h))+ x, y, z = (0.4124 * r + 0.3576 * g + 0.1805 * b) / 0.95047, 0.2126 * r + 0.7152 * g + 0.0722 * b, \+ (0.0193 * r + 0.1192 * g + 0.9505 * b) / 1.08883+ def t(v): return v ** (1 / 3) if v > 0.008856 else 7.787 * v + 16 / 116+ return 116 * t(y) - 16, 500 * (t(x) - t(y)), 200 * (t(y) - t(z))+++def delta_e(a, b): return math.dist(lab(a), lab(b))+++# Colour difference with lightness left out: a lighter or darker copy of the mute amber is+# still the mute amber. Orange's smallest today is 16.7 (Mute, Ember Paper).+def delta_ab(a, b):+ la, lb = lab(a), lab(b)+ return math.hypot(la[1] - lb[1], la[2] - lb[2])+def ink(f): return "#17181A" if contrast("#17181A", f) >= contrast("#FFFFFF", f) else "#FFFFFF"+++T = {i: json.loads((THEMES / f"{i}.json").read_text())["colors"] for i in IDS}+++def tint(c, L1, C1, h1):+ La, Ca, ha = oklch(hx(c["Accent"]))+ out = {}+ for k in SOLID + BLEND:+ Lk, Ck, hk = oklch(hx(c[k]))+ out[k] = in_gamut(Lk + (L1 - La if k in SOLID else 0), Ck * (C1 / Ca), hk + (h1 - ha))+ out["TextOnAccent"] = ink(out["Accent"])+ return out+++def failures(c, o, tracks):+ f = []+ for s in ("BgApp", "Panel", "BgSunken"):+ if contrast(o["AccentBright"], c[s]) < 2.3:+ f.append("contrast")+ if contrast(ink(o["Accent"]), o["Accent"]) < 4.5:+ f.append("ink")+ for s, word in STATES:+ if delta_e(o["Accent"], c[s]) < 15 or delta_ab(o["Accent"], c[s]) < 15:+ f.append(word)+ if tracks:+ f += [f"Track{i}" for i in range(1, 10) if delta_e(o["Accent"], c[f"Track{i}"]) < 15]+ return f+++STATES = (("Record", "the record red"), ("Mute", "mute"), ("Solo", "solo"), ("Success", "the meter green"))+++def clash(c, colour):+ """The state colour a chosen colour sits on, if any — checked on the colour itself, so+ moving its lightness cannot talk it past the record red."""+ for s, word in STATES:+ if delta_e(colour, c[s]) < 15 or delta_ab(colour, c[s]) < 15:+ return word+ return None+++def wear(tid, C1, h1, L1=None, tracks=False, why=None):+ c = T[tid]+ start = oklch(hx(c["Accent"]))[0] if L1 is None else L1+ if C1 < MIN_CHROMA:+ if why is not None: why.append("grey")+ return None, False+ if L1 is not None:+ word = clash(c, in_gamut(L1, C1, h1))+ if word:+ if why is not None: why.append(word)+ return None, False+ for step in range(int(MAX_SHIFT / 0.005) + 1 if L1 is not None else 80):+ for sgn in ([0] if step == 0 else [1, -1]):+ L = start + sgn * step * 0.005+ if 0.2 < L < 0.95:+ o = tint(c, L, C1, h1)+ if not failures(c, o, tracks):+ return o, step != 0+ if why is not None: why.append("unreadable")+ return None, False+++table = {}+for tid in IDS:+ table[tid] = {}+ for pid, _, C, h in PRESETS:+ if pid == "orange":+ table[tid][pid] = {k: T[tid][k] for k in SOLID + BLEND + ["TextOnAccent"]}+ continue+ o, _ = wear(tid, C, h, tracks=True)+ assert o is not None, (tid, pid)+ table[tid][pid] = o+ L, C, h = oklch(hx(CUSTOM))+ o, adjusted = wear(tid, C, h, L1=L)+ table[tid]["custom"] = o+ table[tid]["custom-adjusted"] = adjusted++examples = {}+for hexv in EXAMPLES:+ L, C, h = oklch(hx(hexv))+ row, why = {}, []+ for tid in IDS:+ w = []+ o, adjusted = wear(tid, C, h, L1=L, why=w)+ row[tid] = None if o is None else {"Accent": o["Accent"], "adjusted": adjusted}+ if w: why.append((NAMES[tid], w[0]))+ import colorsys+ hh, ss, vv = colorsys.rgb_to_hsv(*hx(hexv))+ examples[hexv] = {"rows": row, "why": why, "hsv": [round(hh * 360), round(ss * 100), round(vv * 100)]}+ print(hexv, row)++base = {tid: {k: v for k, v in T[tid].items() if len(v) == 7} for tid in IDS}+html = (HERE / "accent.template.html").read_text()+html = html.replace("/*DATA*/", "const THEMES = " + json.dumps(base) + ";\nconst ACCENTS = " + json.dumps(table)+ + ";\nconst PRESETS = " + json.dumps([[p, n] for p, n, _, _ in PRESETS])+ + ";\nconst NAMES = " + json.dumps(NAMES) + ";\nconst CUSTOM = " + json.dumps(CUSTOM) + ";\nconst EXAMPLES = " + json.dumps(examples) + ";")+html = html.replace("{{FONTS}}", "../../../assets/fonts")+(HERE / "accent.html").write_text(html)+for tid in IDS:+ print(tid, " ".join(f"{p}={table[tid][p]['Accent']}" for p, *_ in PRESETS), "custom=" + table[tid]["custom"]["Accent"])diff --git a/specs/084-accent-colour/plan.md b/specs/084-accent-colour/plan.mdnew file mode 100644index 00000000..b526faa0--- /dev/null+++ b/specs/084-accent-colour/plan.md@@ -0,0 +1,124 @@+# Implementation Plan: Choose the accent colour++**Branch**: `feat/accent-colour` | **Date**: 2026-11-05 | **Spec**: [spec.md](spec.md)++**Input**: Feature specification from `specs/084-accent-colour/spec.md` · issue+[nota-daw/nota#311](https://github.com/nota-daw/nota/issues/311) · design: [mockup/accent.html](mockup/accent.html)+(built by `mockup/build.py` from the theme files; approved 2026-11-05).++## Summary++Settings → Appearance gains an **Accent** row under the colour theme: seven presets (Orange —+the default — Lime, Aqua, Sky, Violet, Magenta, Pink) and a **Custom** button that opens a+colour picker popover (saturation/brightness area, hue strip, hex field, a per-theme preview+and a one-line note). The accent is one app preference worn in whichever theme is active.++It works as an **overlay on a theme, not a new theme**: a pure function in+`Nota.Application` takes a theme's colours and an accent choice and returns the theme's+accent tokens re-coloured — each token keeps its OKLCH lightness relation to the theme's own+orange, takes the new hue and a proportional chroma, and (only if the readability bar would+fail) the accent's lightness moves by the smallest step that passes. Orange returns the+theme file verbatim. `NotaThemeService` wears the *accented* theme, so the palette slots,+XAML brushes, Fluent's accent ramp, the theme cards and Nota Remote all follow with the+machinery spec 011 already has.++## Nota: Read Before Planning++- **UI work** → [`DESIGN.md`](../../DESIGN.md) (Studio) and the `nota-design` skill: accent =+ live or chosen only; no literals in views; readability bar (§ Readability bar).+- [`specs/011-colour-themes`](../011-colour-themes/) — themes, `NotaThemeService`, the bar.+- [`specs/014-remote-studio`](../014-remote-studio/) — the phone wears the host's theme tokens.+- [`CONTRIBUTING.md`](../../CONTRIBUTING.md): licensing, dependency policy, PR expectations.++## Technical Context++**Language/Version**: C# / .NET 10 (managed app only)++**Primary Dependencies**: Avalonia (existing). No new dependency — the picker is drawn+with Nota's own controls and a `WriteableBitmap`.++**Storage**: `settings.json` (`Settings.Accent`, `Settings.CustomAccent`).++**Audio-Thread Impact**: None — UI and settings only.++**Testing**: `tests/Nota.SmokeTest` — new `RunAccent` (derivation + resolution, all presets ×+all themes against the bar, identity for Orange, custom refusal cases), existing `RunThemes`,+`RunBans`, `RunLabels`, `RunLocalization`; headless-Avalonia screenshots for the PR.++**Target Platform**: macOS, Windows, Linux (desktop), Nota Remote (web page, unchanged).++**Project Type**: desktop app.++**Performance Goals**: a pick re-tints and repaints in < 100 ms (same path as a theme+switch); dragging in the picker stays smooth — the derivation is ~20 colour conversions ×+up to ~50 lightness steps, microseconds; the spectrum bitmap (200 × 120) is rebuilt only+when the hue changes.++**Constraints**: readability bar rows T3.4, T3.5, T3.8 plus the meter-green and chromatic+distance rules (research R3) for every accent × theme; with Orange, pixel-identical to today.++**Scale/Scope**: ~6 files touched, ~4 new; 1 new settings field pair; ~12 new localization keys.++## Constitution Check++| Principle | Status |+|---|---|+| 0. Approved issue first | #311 carries `approved` (added by core contributor ambertape, 2026-11-05). |+| I. Real-time audio safety | Not touched. |+| II. Boundary discipline | No engine/ABI change; derivation is pure in `Nota.Application`, Avalonia only in `Nota.App`. |+| III. Licensing hygiene | New files carry SPDX headers; no dependency. OKLCH/OKLab conversion is public maths (Björn Ottosson's published matrices), written from the formulas. |+| IV. Verification gate | `scripts/build.sh` + smoke test; new `RunAccent`. |+| V. One logical change | Accent choice only (track controls on the right are #72, separate). |+| VI. Docs in sync | CHANGELOG, FEATURES.md, DESIGN.md (accent section + accepted exception: the picker spectrum), user docs (nota-docs) EN + RU. |+| VII. Spec-first | This spec/plan/tasks. |+| VIII. Safety rules never weakened | The readability bar is enforced on every derived accent; a custom colour that cannot pass is refused, not worn. |++Gate: **PASS** (re-checked after Phase 1: PASS — no new violations).++## Project Structure++### Documentation (this feature)++```text+specs/084-accent-colour/+├── spec.md+├── plan.md # this file+├── research.md # R1–R8 decisions+├── data-model.md # AccentChoice, presets, derivation, settings+├── quickstart.md # how to verify end-to-end+├── contracts/+│ └── ui-contract.md # the Accent row and the picker, states, keys+├── mockup/ # build.py → accent.html (approved design)+├── checklists/requirements.md+└── tasks.md # /speckit-tasks+```++### Source Code (repository root)++```text+src/managed/+├── Nota.Application/+│ ├── Accent.cs # NEW: AccentChoice, presets, Resolve/Store, the derivation (pure)+│ ├── Settings.cs # + Accent, CustomAccent+│ └── Localization/en.json # + preferences.accent*, accent.<preset> names+├── Nota.App/+│ ├── Theme/NotaAccent.cs # NEW: Avalonia bridge — NotaColourTheme × AccentChoice → accented theme (cached)+│ ├── Theme/NotaThemeService.cs # wears the accented theme; SetAccent; Worn(theme) for previews/Remote+│ ├── App.axaml.cs # accent resolved before the first paint+│ ├── PreferencesWindow.cs # Accent row under the theme picker; cards preview Worn(theme)+│ ├── PreferencesWindow.Accent.cs # NEW: swatch row, Custom button, picker flyout+│ ├── Controls/ColourPicker.cs # NEW: SV area + hue strip (WriteableBitmap), hex field+│ └── MainWindow.Remote.cs # Remote theme cache keyed by accent+tests/Nota.SmokeTest/+├── DesignTokenCheck.Accent.cs # NEW: RunAccent+└── Program.cs # run it+DESIGN.md, DESIGN.html (scripts/design-html.py), CHANGELOG.md, FEATURES.md+```++**Structure Decision**: The derivation lives in `Nota.Application` (pure, hex/uint in and+out) so the smoke test can run every preset × theme without Avalonia, exactly like+`Appearance.Resolve`. The app layer only converts to `NotaColourTheme` and caches.++## Complexity Tracking++None.diff --git a/specs/084-accent-colour/quickstart.md b/specs/084-accent-colour/quickstart.mdnew file mode 100644index 00000000..854d9b09--- /dev/null+++ b/specs/084-accent-colour/quickstart.md@@ -0,0 +1,37 @@+# Quickstart: verifying the accent colour++## Prerequisites++`scripts/build.sh` builds the engine and the app and runs the smoke test.++## 1. Data checks (smoke test)++```bash+scripts/build.sh+```++Expect `RunAccent` lines: every preset × theme passes T3.4/T3.5/T3.8/A1/A2/A3; Orange is the+identity; `#8C8C8C` refused as grey; `#3FA7FF` refused in Studio Light (solo); `#4C6FFF`+accepted with an adjustment; resolution fallbacks. `RunThemes`, `RunBans`, `RunLabels`,+`RunLocalization` stay green.++## 2. In the app++1. Launch with a scratch data dir (`NOTA_DATA_DIR=/tmp/nota-accent`), open Settings →+ Appearance: the Accent row shows Orange chosen; nothing else looks different.+2. Click Violet: the play key, loop, selection, toggles, menu hover turn violet at once in+ every window; the theme cards show violet.+3. Switch theme to Studio Light, Ember Graphite, Ember Paper: violet, tuned per theme.+4. Custom → type `#00B5D8`: applied, note "Worn as is in every theme." Type `#8C8C8C`: the+ note refuses, the accent stays cyan. Press Esc: the accent returns to violet.+5. Custom → `#4C6FFF`, click outside: saved; restart Nota: the first frame is that blue.+6. Pick Orange: identical to a build before this change (screenshot diff).++## 3. Nota Remote++Connect the phone, change the accent: the phone's play key and selection repaint within 1 s.++## 4. Mockup++`python3 specs/084-accent-colour/mockup/build.py` regenerates `accent.html`; its values must+match the smoke test's.diff --git a/specs/084-accent-colour/research.md b/specs/084-accent-colour/research.mdnew file mode 100644index 00000000..469e5c4f--- /dev/null+++ b/specs/084-accent-colour/research.md@@ -0,0 +1,108 @@+# Research: Choose the accent colour++All decisions were prototyped in [`mockup/build.py`](mockup/build.py), which computes every+value the mockup shows from the four theme files.++## R1 — An overlay on the theme, not more themes++- **Decision**: The accent is applied by a function `(theme colours, accent) → accent tokens`,+ and the app wears the resulting *accented theme*. Theme files stay as they are.+- **Rationale**: 4 themes × 8 accents of hand-tuned files would be 32 files to keep in step;+ a future user-made theme would need its own accent set. One function also gives Nota+ Remote, the theme previews and Fluent's ramp the right values for free.+- **Alternatives**: per-theme accent tables in each JSON (rejected: drift, no custom colour);+ re-tinting only `Accent` (rejected: the tint, line, hover and ramp would stay orange).++## R2 — Derivation (OKLCH)++- **Decision**: For theme `T` with accent `A = (La, Ca, ha)` and a target `(L1, C1, h1)`, every+ token `K` of the accent family with `(Lk, Ck, hk)` becomes+ `(Lk + ΔL, Ck · C1/Ca, hk + (h1 − ha))`, gamut-mapped by reducing chroma (×0.95 steps)+ until in sRGB. `ΔL = L1 − La` for **solid** tokens (`Accent`, `AccentBright`, `AccentHover`,+ `AccentDeep`, `AccentPale`, `SystemAccent*`) and `0` for **blend** tokens (`AccentDim`,+ `AccentEdge`, `AccentMute`, `AccentSubtle`, `BorderBrass`) — washes over the theme's+ surfaces keep the theme's lightness, or a dark custom colour would sink the "picked" tint+ into the ground. `TextOnAccent` = the derived ink on the new `Accent` (dark `#17181A` or+ white, as `NotaPalette.ReadableInkOn`).+- **Presets** take `L1 = La` (the theme's own lightness); a **custom** colour takes its own+ `L1`, so it is worn exactly where it passes.+- **Orange** is the identity: it returns the theme's own values without computing (FR-004,+ SC-003). The prototype confirms the maths is also an identity for all 17 tokens × 4 themes.+- **Rationale**: OKLCH is perceptually even, so keeping L keeps contrast, and hue rotation+ keeps the theme's designed relations (bright/deep/subtle steps).+- **Alternatives**: HSL rotation (rejected: unequal perceived lightness across hues — yellow+ vs blue); mixing the accent over the panel per token (rejected: needs a per-token alpha+ the theme files do not record).++## R3 — The rules a derived accent must pass++Per theme, on the derived values:++| Rule | Pairing | Minimum | Source |+|---|---|---|---|+| T3.4 | `AccentBright` on `BgApp`, `Panel`, `BgSunken` | contrast 2.3 | DESIGN.md bar |+| T3.5 | derived ink on `Accent` | contrast 4.5 | DESIGN.md bar |+| T3.8 | `Accent` vs `Record`, `Mute`, `Solo` | ΔE76 ≥ 15 | DESIGN.md bar |+| A1 | `Accent` vs `Success` (meter green) | ΔE76 ≥ 15 | issue #311 |+| A2 | `Accent` vs `Record`, `Mute`, `Solo`, `Success` | Δa\*b\* ≥ 15 | new |+| A3 (presets only) | `Accent` vs `Track1`–`Track9` | ΔE76 ≥ 15 | issue #311 |++- **A2** is ΔE with lightness left out. Without it a copy of the mute amber passes T3.8 by+ being lighter. Orange's smallest Δa\*b\* today is 16.7 (vs `Mute`, Ember Paper), so every+ theme passes A2 as shipped.+- **Custom**: A1/A2/T3.8 are checked on the **chosen colour itself** (in gamut, before any+ adjustment) *and* on the result, so moving lightness can never talk a colour past the+ record red. Refused when chroma < 0.05 (a grey), when it clashes, or when no lightness+ within ±0.12 of its own passes T3.4/T3.5.+- **Fit**: lightness steps of 0.005, trying +n then −n, nearest first; presets search up to+ ±0.40, custom up to ±0.12.++## R4 — The preset list++- **Decision**: Orange (identity), Lime (C 0.15, h 125°), Aqua (0.12, 185°), Sky (0.13, 224°),+ Violet (0.15, 295°), Magenta (0.16, 330°), Pink (0.15, 355°).+- **Rationale**: spread around the wheel avoiding the four state colours: no yellow (mute),+ red (record), green (meter) or mid blue (solo — Sky at 232° failed A2 in Studio Dark,+ 224° passes). All pass every rule incl. A3 in all four themes (mockup matrix §4).+- Values (Accent per theme) are in the mockup and asserted by `RunAccent`.++## R5 — Storage and resolution++- **Decision**: `Settings.Accent` = `""` (Orange) | a preset id | `"custom"`;+ `Settings.CustomAccent` = last custom colour `#RRGGBB` (kept when a preset is chosen,+ offered again by Custom). Unknown id or malformed hex → Orange, nothing rewritten.+- **Alternatives**: storing the hex in `Accent` directly (rejected: loses the remembered+ custom colour when a preset is picked, US2-5).++## R6 — Wearing it++- `NotaThemeService` keeps the accent next to the appearance choice; `ApplyActive` wears+ `NotaAccent.Wear(theme, accent)` (cached per theme id + accent, so `ReferenceEquals` still+ short-circuits a no-op). `Worn(theme)` gives previews and Remote the same objects.+- Startup: `App` resolves the accent with the theme, before the first window paints.+- Remote: `MainWindow.Remote` caches `RemoteTheme` by theme id — key it by the worn object+ instead, and include the accent in the appearance key, so the phone is re-sent the theme+ when the accent changes (the hub already re-sends on a new appearance reference).++## R7 — The picker control++- **Decision**: An Avalonia `Flyout` under the Custom button (as the section rename flyout in+ `ArrangementView.Sections.cs`), holding a `ColourPicker`: a 216 × 132 saturation/value area+ and a 216 × 10 hue strip, each a `WriteableBitmap` filled from HSV maths (rebuilt only+ when the hue changes), handles drawn with `HandleSel` + `Seam`, the before/after chip, a+ hex `TextBox.field` in Geist Mono, the *In themes* strip (4 chips with the derived accent,+ a dot where adjusted) and the note line.+- Live: every drag/valid hex applies (`NotaThemeService.SetAccent`) without saving; closing+ the flyout saves; Esc restores the accent worn before it opened and closes. A refused+ colour is shown in the chip and the note (Danger ink) but not applied.+- **Rationale**: bitmaps keep the "no gradients in views" ban intact (the spectrum is+ content, like a waveform); listed in DESIGN.md's accepted exceptions.+- **Alternatives**: Avalonia's `ColorPicker` (Avalonia.Controls.ColorPicker package — rejected:+ a new dependency, Fluent look, no per-theme preview).++## R8 — Accent vs other colours in views++- Device identity hues (`Ink`), graph chromas, track/return colours, state colours, meters:+ untouched by construction (only the accent family is replaced).+- Existing code that compares against accent brushes by reference (`Inactive.cs`) keeps+ working: slots are the same objects, only their colour changes.diff --git a/specs/084-accent-colour/spec.md b/specs/084-accent-colour/spec.mdnew file mode 100644index 00000000..f9973ccf--- /dev/null+++ b/specs/084-accent-colour/spec.md@@ -0,0 +1,225 @@+# Feature Specification: Choose the accent colour++**Feature Branch**: `feat/accent-colour`++**Created**: 2026-11-05++**Status**: Draft++**Input**: User description: "Issue #311: Preferences → Appearance lets the user choose the accent colour (today fixed orange in every theme). The choice is made with a colour picker in Settings: a row of preset (curated) colours plus "Custom" (the user's own colour). The chosen accent drives all accent strengths of the style guide — solid for live, soft tint for picked, accent lines for device values — in all four themes (Studio Dark/Light, Ember Graphite/Paper), tuned per theme so every theme still passes the readability bar (contrast on surfaces, ink on the accent fill) and the accent stays distinct from the record red, mute amber, solo blue and the meter green. Applies live, is saved, reaches Nota Remote."++Issue: [nota-daw/nota#311](https://github.com/nota-daw/nota/issues/311) (approved).++## Nota Context *(fill in — drives plan and tasks)*++**Feature area** *(pick the main one)*:++- [ ] Engine (C++, `src/native/nota.engine`) — real-time audio rules apply, see `ARCHITECTURE.md` AR table+- [x] Managed app (C#, `src/managed/*`) — domain, application, infrastructure, presentation+- [x] UI (Avalonia, `src/managed/Nota.App`) — follow `DESIGN.md` (Studio)+- [ ] Plugin hosting (`pluginhost/`) — the only place JUCE is allowed+- [ ] Build / packaging / CI (`scripts/`, `.github/`) — see `BUILD.md`+- [ ] Docs only++**Nota docs to keep in mind** *(links relative to `specs/<slug>/`, where this file lands)*:+[`ARCHITECTURE.md`](../../ARCHITECTURE.md) (AR rules),+[`CONTRIBUTING.md`](../../CONTRIBUTING.md) (licensing, dependency policy, PR+expectations), [`BUILD.md`](../../BUILD.md), [`DESIGN.md`](../../DESIGN.md),+[`FEATURES.md`](../../FEATURES.md). Builds on [`specs/011-colour-themes`](../011-colour-themes/)+(themes, the readability bar) and [`specs/014-remote-studio`](../014-remote-studio/) (Nota Remote wears the host's theme).++## User Scenarios & Testing *(mandatory)*++### User Story 1 - Pick a preset accent (Priority: P1)++A musician who finds the orange accent tiring (or clashing with their track colours) opens+Settings → Appearance, sees a row of colour swatches under the colour theme, and clicks+one. Everything that is live or chosen — the playhead, the loop, selected clips, toggles+that are on, the play key, menu hover, the device power switch, a knob being dragged —+switches to that colour at once, in every open window. Closing and reopening Nota keeps+the choice.++**Why this priority**: This is the request in the issue; the presets alone deliver it and+are guaranteed readable in every theme.++**Independent Test**: Open Settings → Appearance, click each preset swatch, check the main+window's accent uses change instantly; restart; the choice persists.++**Acceptance Scenarios**:++1. **Given** the default appearance, **When** the user opens Settings → Appearance,+ **Then** an "Accent" row shows the preset swatches with Orange marked as chosen.+2. **Given** Studio Dark, **When** the user clicks a preset, **Then** every accent use in+ every open window (solid fills, the soft "picked" tint, accent lines) takes that hue+ without a restart, and the swatch is marked as chosen.+3. **Given** a preset is chosen, **When** the user switches the colour theme (any of the+ four, or Follow system flips), **Then** the same accent is worn in the new theme, tuned+ to that theme.+4. **Given** a preset is chosen, **When** Nota restarts, **Then** it opens with that accent+ and no frame is painted in orange first.+5. **Given** any preset, **When** the user picks Orange again, **Then** every theme looks+ exactly as it does today (same values as the theme files).++---++### User Story 2 - Use my own colour (Priority: P2)++A user wants their studio's brand colour. They choose "Custom", pick a colour in a colour+picker (spectrum + hue, and a hex field), and see it applied live. If the colour would+not be readable or would be confused with the record red, mute, solo or meter green, Nota+says so and does not wear an unreadable accent.++**Why this priority**: The user explicitly asked for "preset colours + your own"; it builds+on the P1 machinery.++**Independent Test**: Choose Custom, enter `#3FA7FF`, see the accent change; enter a colour+close to the record red, see the explanation and the accent remain readable.++**Acceptance Scenarios**:++1. **Given** Settings → Appearance, **When** the user clicks the Custom swatch, **Then** a+ colour picker opens next to it with the current accent preselected.+2. **Given** the picker is open, **When** the user drags in the spectrum or types a valid+ hex value, **Then** the accent previews live and is saved when the picker closes;+ Esc restores the accent that was worn before opening.+3. **Given** a custom colour that fails the readability bar in some theme, **When** it is+ applied, **Then** Nota keeps the colour's hue and saturation and adjusts only its lightness, per+ theme, by the smallest step that passes the bar — so the hex typed is worn exactly in a+ theme where it already passes, and a close, readable relative of it elsewhere; the+ picker says when the colour was adjusted for the current theme+4. **Given** a custom colour too close to the record red, mute amber, solo blue or meter+ green in some theme, **When** the user picks it, **Then** the picker shows a one-line+ note naming the colour it clashes with, and that colour is not applied.+5. **Given** a custom accent, **When** the user later clicks a preset and then Custom+ again, **Then** the last custom colour is offered again.++---++### User Story 3 - The phone follows (Priority: P3)++With Nota Remote connected, the phone wears the same accent as the desktop window, and+changes with it.++**Why this priority**: Remote already mirrors the theme; leaving it orange would be a+visible inconsistency, but it is secondary to the desktop.++**Independent Test**: Connect Nota Remote, change the accent in Settings, the phone's play+key, selection and toggles change within a second.++**Acceptance Scenarios**:++1. **Given** a connected phone, **When** the accent changes, **Then** the phone repaints in+ the new accent without reconnecting, in whichever theme it wears (including its own+ dark/light pick under Follow phone).++---++### Edge Cases++- A settings file from an older Nota (no accent stored) → Orange; nothing changes visually.+- A stored accent that is unknown (a preset removed later) or a malformed custom value →+ falls back to Orange, never throws, the stored value is not rewritten until the user+ picks again.+- A custom colour that cannot pass the bar in some theme at any lightness (e.g. a grey) →+ refused with a note; the previous accent stays.+- Achromatic or near-grey custom colours → refused: an accent must read as a colour+ (minimum saturation), otherwise "live" and "rest" become indistinguishable.+- Theme preview cards in the picker show each theme *with the chosen accent*, so the user+ judges the combination.+- Device identity hues (`Ink`), graph chromas, track colours, the record red, mute, solo,+ meter colours never change with the accent.+- Follow system: switching OS mode keeps the accent, tuned for the other theme.++## Clarifications++### Session 2026-11-05++- Q: How is a custom colour worn across themes? → A: Tuned per theme — hue and saturation+ are the user's, lightness is moved by the smallest step that passes the bar; exact where+ it already passes; refused only when no lightness passes.+- Q: One accent for the whole app or per theme? → A: One for all themes, tuned to each.++## Requirements *(mandatory)*++### Functional Requirements++- **FR-001**: Settings → Appearance MUST show an "Accent" row directly under the colour+ theme picker: one swatch per preset, then a Custom swatch; the chosen one is marked by+ a selection ring (colour only, no size change).+- **FR-002**: The preset list MUST contain Orange (the default, first) and a small curated+ set of further hues (6–8 in total), each of which passes FR-005/FR-006 in all four+ built-in themes; a smoke test MUST enforce that for every preset and theme.+- **FR-003**: Choosing an accent MUST re-colour every accent token of the active theme —+ the solid accent and its hover/deep/dim steps, the soft "picked" tint, the accent line+ (brass), the accent text on light grounds, the ink on the accent, and the platform+ accent ramp used by built-in controls — and nothing else.+- **FR-004**: With Orange chosen, every theme MUST produce exactly its theme-file values+ (no visual change for anyone who never touches the setting).+- **FR-005**: For every chosen accent and theme, the result MUST meet the readability bar+ rows that involve the accent: accent line on the grounds (T3.4), derived ink on the+ accent fill (T3.5), and Accent vs Mute / Solo / Record pairwise (T3.8).+- **FR-006**: The accent MUST also stay distinct (ΔE ≥ 15) from the meter/positive green+ (`Success`) in every theme.+- **FR-007**: A custom colour MUST be chosen with a colour picker offering a+ saturation/value area, a hue strip, a hex field, and a live preview. Its hue and+ saturation are kept; its lightness is moved per theme by the smallest step that passes+ FR-005/FR-006 (none when it already passes). A colour for which no lightness passes in+ some theme MUST be rejected with a one-line reason, keeping the previous accent.+- **FR-008**: The change MUST apply live to every open window, popup and custom-drawn view,+ with no restart, and be saved to settings immediately.+- **FR-009**: The accent MUST be applied before the first window paints on startup.+- **FR-010**: The accent MUST be one choice for the whole app, worn in whichever theme is+ active (including both themes of Follow system), tuned per theme.+- **FR-011**: Nota Remote MUST receive the accented theme(s) the same way it receives the+ theme today, and repaint when the accent changes.+- **FR-012**: The picker and swatches MUST follow `DESIGN.md` (Studio): tokens only, Geist+ Mono for the hex value, sentence-case labels, no new accent use outside "live or+ chosen".+- **FR-013**: All new user-visible strings MUST go through the localization keys+ (`en.json`).++### Key Entities++- **Accent choice**: either a preset id (e.g. `orange`, `violet`) or a custom colour+ (one sRGB value). Stored in settings; absent means Orange.+- **Accent preset**: an id, a display name, and one base colour (its hue and saturation);+ the per-theme values are derived, not stored.+- **Accented theme**: a colour theme with its accent tokens replaced for the chosen accent —+ what the app, the theme previews and Nota Remote wear.++## Success Criteria *(mandatory)*++### Measurable Outcomes++- **SC-001**: A user can change the accent from the default to any preset in two clicks+ from Settings → Appearance, and see it applied in under 100 ms.+- **SC-002**: 100 % of presets × themes pass every accent row of the readability bar and+ FR-006 (checked by the smoke test).+- **SC-003**: With the default accent, a pixel comparison of the main window before and+ after this change shows no difference.+- **SC-004**: After restart, the chosen accent is worn on the first painted frame in 100 %+ of launches.+- **SC-005**: A connected Nota Remote shows the new accent within 1 s of the change.++## Assumptions++- The accent applies to the four built-in themes; user-made themes (not shipped yet) will+ inherit the same mechanism.+- Accent is an app preference, not per project.+- Track colours keep their palette; selection outlines on clips are drawn so that an accent+ close to a track colour is still visible (as orange vs the amber track today, ΔE ≈ 25);+ presets are additionally kept ΔE ≥ 15 from every track colour.+- Nota Remote needs no new UI: it only wears what the desktop sends.+- Presets are named in English in `en.json`; other languages translate through the usual+ pipeline.++## Nota Compliance Checklist *(review before implementation; re-check in tasks.md)*++- [x] Every new source file will carry the AGPL-3.0-only SPDX header (two lines, see CONTRIBUTING.md)+- [x] No new dependency — the colour picker is drawn with Nota's own controls+- [x] Audio-thread impact considered: none (UI/settings only)+- [x] Managed/native crossings go through the pure C ABI in `nota_engine.h` only (AR-7); none added+- [x] Smoke-test impact assessed: no engine change; the theme/readability checks+ (`RunThemes`) are extended to every preset × theme and the accent resolution logic+- [x] User-visible change → `CHANGELOG.md` `[Unreleased]` entry, FEATURES.md, user docs+- [x] UI change → follows `DESIGN.md` (Studio design language)diff --git a/specs/084-accent-colour/tasks.md b/specs/084-accent-colour/tasks.mdnew file mode 100644index 00000000..87e9d259--- /dev/null+++ b/specs/084-accent-colour/tasks.md@@ -0,0 +1,101 @@+---++description: "Tasks: choose the accent colour (specs/084, issue #311)"+---++# Tasks: Choose the accent colour++**Input**: Design documents from `specs/084-accent-colour/`++**Prerequisites**: plan.md, spec.md, research.md, data-model.md, contracts/ui-contract.md, mockup/++**Tests**: The spec requires smoke-test enforcement (FR-002, SC-002), so test tasks are included.++## Format: `[ID] [P?] [Story] Description`++- **[P]**: Can run in parallel (different files, no dependencies)+- **[Story]**: US1 presets · US2 custom colour · US3 Nota Remote++## Phase 1: Setup++- [X] T001 Confirm the worktree builds on `feat/accent-colour` (`scripts/build.sh`) before any change, recording the smoke-test pass count as the baseline++---++## Phase 2: Foundational (blocking)++- [X] T002 Create `src/managed/Nota.Application/Accent.cs` (SPDX header): `AccentChoice(string Preset, uint? Custom)` with `IsDefault`; `AccentPreset(Id, NameKey, Chroma, Hue)` and `Accent.Presets` in display order orange, lime (0.15, 125°), aqua (0.12, 185°), sky (0.13, 224°), violet (0.15, 295°), magenta (0.16, 330°), pink (0.15, 355°) — research R4+- [X] T003 In `src/managed/Nota.Application/Accent.cs` add the pure derivation `AccentColours`: OKLab/OKLCH ↔ sRGB on `0xRRGGBB`, gamut mapping by ×0.95 chroma steps, `SolidTokens` (`Accent`, `AccentBright`, `AccentHover`, `AccentDeep`, `AccentPale`, `SystemAccent`, `SystemAccentLight1–3`, `SystemAccentDark1–3`) move by ΔL, `BlendTokens` (`AccentDim`, `AccentEdge`, `AccentMute`, `AccentSubtle`, `BorderBrass`) keep lightness; `TextOnAccent` = `InkOn(Accent)` (`#17181A` or `#FFFFFF`, higher WCAG contrast); Orange returns the theme's own values — research R2+- [X] T004 In `src/managed/Nota.Application/Accent.cs` add the rules and the fit: `Failures(theme, tokens, includeTracks)` for T3.4 (`AccentBright` on `BgApp`/`Panel`/`BgSunken` ≥ 2.3), T3.5 (ink on `Accent` ≥ 4.5), T3.8 + A1 (ΔE76 ≥ 15 vs `Record`/`Mute`/`Solo`/`Success`), A2 (Δa\*b\* ≥ 15 vs the same), A3 presets-only (ΔE76 ≥ 15 vs `Track1`–`Track9`); `Wear(theme, choice) → AccentResult { Tokens, Adjusted, Refusal }` searching lightness in 0.005 steps (+n then −n), presets ±0.40, custom ±0.12; custom refused when chroma < 0.05 (`Grey`), when the chosen colour itself clashes (`Clash`, `ClashWith` = token), or when nothing passes (`Unreadable`) — research R3+- [X] T005 [P] In `src/managed/Nota.Application/Settings.cs` add `Accent` (string, default `""`) and `CustomAccent` (string, default `""`, `#RRGGBB`) with doc comments; in `Accent.cs` add `Accent.Resolve(Settings) → AccentChoice` (`""`, unknown id, `custom` with missing/malformed hex → Orange; never throws, never writes) and `Accent.Store(Settings, AccentChoice)` — data-model.md § Settings+- [X] T006 Create `src/managed/Nota.App/Theme/NotaAccent.cs` (SPDX): `Wear(NotaColourTheme, AccentChoice) → NotaColourTheme` overlaying `AccentColours.Wear` tokens, same Id/Name/Kind, cached per (Id, choice), Orange → the same theme object; a preset refusal (never expected) falls back to the theme itself+- [X] T007 In `src/managed/Nota.App/Theme/NotaThemeService.cs` keep `Accent` next to `Choice`; `Set(choice, accent)` / `SetAccent(accent)`; `ApplyActive` wears `NotaAccent.Wear(theme, Accent)` so slots, Brush.* and the Fluent `SystemAccentColor*` ramp follow; `Worn(theme)` for previews and Remote; raise a `Changed` event after an apply+- [X] T008 In `src/managed/Nota.App/App.axaml.cs` resolve the accent with the appearance and pass it to `NotaThemeService.Set` before the first window paints (FR-009)+- [X] T009 Create `tests/Nota.SmokeTest/DesignTokenCheck.Accent.cs` with `RunAccent()` and call it from `tests/Nota.SmokeTest/Program.cs`: loads the four theme files, asserts Orange identity for every theme (all tokens equal the file), every preset × theme has no `Failures` incl. A3, every theme as shipped passes A1/A2, resolution fallbacks (`""`, `"nope"`, `custom` + `"zz"`), store round-trip, custom cases `#00B5D8` as is, `#4C6FFF` adjusted, `#3FA7FF` clash solo in Studio Light only, `#8C8C8C` grey++**Checkpoint**: smoke test green, the app wears Orange as before.++---++## Phase 3: User Story 1 — Pick a preset accent (P1) 🎯 MVP++**Goal**: an Accent row of seven swatches applies live, saves, survives restart and theme switches.++**Independent Test**: Settings → Appearance → click each preset, switch themes, restart.++- [X] T010 [US1] Create `src/managed/Nota.App/PreferencesWindow.Accent.cs` (SPDX, partial class): `AccentPicker()` — swatch per preset (22 × 22 hit, 2 px ring slot: transparent / `Rule` hover / `TextPrimary` chosen, 14 × 14 fill radius `NotaRadius.Clip` in the preset's accent as worn in the active theme, tooltip = name), 6 px gap, Custom button (chip + "Custom" + `GlyphKind.Edit`), readout (`TextMuted` 12; "Custom · #RRGGBB" hex in Geist Mono); a pick → `Accent.Store`, `settings.Save()`, `NotaThemeService.SetAccent`, refresh — contracts/ui-contract.md § Accent row+- [X] T011 [US1] In `src/managed/Nota.App/PreferencesWindow.cs` insert `TopRow(Loc.T("preferences.accent"), AccentPicker())` and its caption under the colour theme rows; theme cards (`ThemeCards`/`ThemePreview`) draw `NotaThemeService.Worn(t)` and repaint on accent change, keeping the `ColorIn(…, _theme)` contract RunThemes checks+- [X] T012 [P] [US1] Add keys to `src/managed/Nota.Application/Localization/en.json`: `preferences.accent`, `preferences.accent_caption`, `preferences.accent_custom`, `accent.orange|lime|aqua|sky|violet|magenta|pink`+- [X] T013 [US1] Verify in the headless app (memory recipe: NOTA_DATA_DIR, env-guarded hook + screencapture): Violet in all four themes, Orange identical to develop++**Checkpoint**: MVP — presets work end-to-end.++---++## Phase 4: User Story 2 — Use my own colour (P2)++**Goal**: Custom opens a picker; colours apply live, are tuned or refused, Esc reverts.++**Independent Test**: Custom → `#00B5D8`, `#4C6FFF`, `#3FA7FF`, `#8C8C8C`; Esc; restart.++- [X] T014 [US2] Create `src/managed/Nota.App/Controls/ColourPicker.cs` (SPDX): saturation/value area 216 × 132 and hue strip 216 × 10 as `WriteableBitmap`s (SV rebuilt only on hue change), `Rule` frames radius 3, handles in `HandleSel` with a `Seam` ring, left-button drag, `ColourChanged(uint rgb)` event, `Set(uint rgb)`; no gradient brushes, no colour literals (RunBans)+- [X] T015 [US2] In `src/managed/Nota.App/PreferencesWindow.Accent.cs` open a `Flyout` under the Custom button: `ColourPicker`, before/after chip, hex `TextBox.field` (Geist Mono 12; `#RGB`/`#RRGGBB`, `#` optional), "In themes" four chips (derived `Accent` per theme via `AccentColours.Wear`, 4 px `TextPrimary` dot when adjusted, `BgSunken` when refused, tooltip = theme name), note line (two lines reserved; `TextMuted`, `Danger` when refused); live apply of accepted colours without saving; close → store `custom` + `CustomAccent` and save; Esc → restore the previous accent and close — contracts/ui-contract.md § Colour picker+- [X] T016 [P] [US2] Add keys to `src/managed/Nota.Application/Localization/en.json`: `preferences.accent_in_themes`, `preferences.accent_note_as_is`, `preferences.accent_note_adjusted`, `preferences.accent_note_adjusted_all`, `preferences.accent_note_grey`, `preferences.accent_note_clash`, `preferences.accent_note_unreadable`, `preferences.accent_clash_record|mute|solo|meter`+- [X] T017 [US2] Verify the four custom examples and Esc in the headless app; screenshots for the PR++---++## Phase 5: User Story 3 — The phone follows (P3)++- [X] T018 [US3] In `src/managed/Nota.App/MainWindow.Remote.cs` build `RemoteTheme`s from `NotaThemeService.Worn(…)`, cache by the worn object (not the id), and include the accent in `_remoteLookFor` so a change re-sends the theme+- [X] T019 [US3] Extend `tests/Nota.SmokeTest/DesignTokenCheck.Remote.cs` (or RunAccent) with a source check that the Remote appearance is built from worn themes++---++## Phase 6: Polish & cross-cutting++- [X] T020 [P] `DESIGN.md`: accent section — the accent is a user choice derived per theme (link specs/084), rules A1/A2 next to the bar, the picker spectrum in Accepted exceptions; run `python3 scripts/design-html.py`+- [X] T021 [P] `CHANGELOG.md` `[Unreleased]` Added entry (#311)+- [X] T022 [P] FEATURES.md via the `nota-features` skill+- [X] T023 [P] User docs EN + RU via the `nota-docs` skill (Settings → Appearance page)+- [ ] T024 Run `scripts/build.sh` (smoke test incl. RunAccent, RunThemes, RunBans, RunLabels, RunLocalization) and fix anything red+- [X] T025 Re-run `specs/084-accent-colour/mockup/build.py`; confirm its preset values equal the app's (RunAccent prints them)++## Dependencies++- Phase 2 blocks all stories (T002 → T003 → T004; T005 ∥; T006 → T007 → T008; T009 after T004/T005).+- US1 (T010–T013) after Phase 2. US2 after T010 (same file). US3 after T007 only — parallel to US1/US2.+- Polish after the stories.++## Parallel opportunities++- T005 ∥ T003/T004 (different file); T012 ∥ T010; T016 ∥ T014; T018 ∥ US1/US2; T020–T023 together.++## Implementation strategy++MVP = Phase 2 + US1 (presets, guaranteed readable). Then US2 (custom), US3 (Remote), polish,+one PR closing #311.++## Phase 7: Convergence++- [X] T026 Open the Custom picker on the remembered custom colour (`Settings.CustomAccent`) when a preset is worn, falling back to the worn accent only when none was ever chosen, in `src/managed/Nota.App/PreferencesWindow.Accent.cs` per US2/AC5 (partial)diff --git a/src/managed/Nota.App/App.axaml.cs b/src/managed/Nota.App/App.axaml.csindex 67d9f23f..8ebcd95a 100644--- a/src/managed/Nota.App/App.axaml.cs+++ b/src/managed/Nota.App/App.axaml.cs@@ -101,7 +101,10 @@ public partial class App : Avalonia.Application// nothing flashes one theme on the way to another. Old Dark / Light / System// settings resolve onto the Studio themes (Appearance.Resolve).foreach (var err in NotaThemes.LoadErrors) log.Error($"Colour theme skipped — {err}", null);- NotaThemeService.Set(Appearance.Resolve(Services.GetRequiredService<ISettingsService>().Current, NotaThemeService.KnownThemes));+ // The accent (spec 084) is resolved with it, so the first frame already wears it too.+ var startSettings = Services.GetRequiredService<ISettingsService>().Current;+ NotaThemeService.Set(Appearance.Resolve(startSettings, NotaThemeService.KnownThemes));+ NotaThemeService.SetAccent(Accent.Resolve(startSettings));// Interface scale (spec 027), likewise before the first window: windows and every// popup they open take it from here.NotaUiScale.InitPopups();diff --git a/src/managed/Nota.App/Controls/ColourPicker.cs b/src/managed/Nota.App/Controls/ColourPicker.csnew file mode 100644index 00000000..ad124127--- /dev/null+++ b/src/managed/Nota.App/Controls/ColourPicker.cs@@ -0,0 +1,197 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+//+// The colour picker of Settings → Appearance → Accent → Custom (spec 084): a+// saturation/brightness area over a hue strip. The spectrum is content, not chrome — like a+// waveform it shows the thing being chosen — so it is drawn into bitmaps from HSV maths+// rather than with gradient brushes (DESIGN.md § Accepted exceptions). Frames are the Rule+// line, handles the selected-handle ink with a seam ring, as on a graph. Left button only;+// a drag reports every step so the caller can preview it live.++using System;+using System.Runtime.InteropServices;+using Avalonia;+using Avalonia.Controls;+using Avalonia.Input;+using Avalonia.Media;+using Avalonia.Media.Imaging;+using Avalonia.Platform;++namespace Nota.App;++internal sealed class ColourPicker : StackPanel+{+ public const double W = 216, AreaH = 132, StripH = 10;++ private readonly SpectrumArea _area;+ private readonly HueStrip _strip;+ private double _h, _s = 1, _v = 1;++ /// <summary>Raised on every step of a drag, with the colour (0xRRGGBB).</summary>+ public event Action<uint>? ColourChanged;++ public ColourPicker()+ {+ Spacing = 8;+ _area = new SpectrumArea(this) { Width = W, Height = AreaH };+ _strip = new HueStrip(this) { Width = W, Height = StripH };+ Children.Add(_area);+ Children.Add(_strip);+ }++ /// <summary>The colour shown, 0xRRGGBB.</summary>+ public uint Rgb => HsvToRgb(_h, _s, _v);++ /// <summary>Show <paramref name="rgb"/> without raising <see cref="ColourChanged"/>. A grey+ /// keeps the hue the strip already had.</summary>+ public void Set(uint rgb)+ {+ var (h, s, v) = RgbToHsv(rgb);+ if (s > 0 && v > 0) _h = h;+ _s = s;+ _v = v;+ _area.InvalidateVisual();+ _strip.InvalidateVisual();+ }++ private void Picked(double? h, double? s, double? v)+ {+ if (h is { } hh) _h = hh;+ if (s is { } ss) _s = ss;+ if (v is { } vv) _v = vv;+ _area.InvalidateVisual();+ _strip.InvalidateVisual();+ ColourChanged?.Invoke(Rgb);+ }++ // ---- colour maths ------------------------------------------------------------------++ public static uint HsvToRgb(double h, double s, double v)+ {+ h = ((h % 360) + 360) % 360 / 60;+ double c = v * s, x = c * (1 - Math.Abs(h % 2 - 1)), m = v - c;+ var (r, g, b) = (int)h switch+ {+ 0 => (c, x, 0.0), 1 => (x, c, 0.0), 2 => (0.0, c, x),+ 3 => (0.0, x, c), 4 => (x, 0.0, c), _ => (c, 0.0, x),+ };+ static uint B(double t) => (uint)Math.Round(Math.Clamp(t, 0, 1) * 255);+ return (B(r + m) << 16) | (B(g + m) << 8) | B(b + m);+ }++ public static (double H, double S, double V) RgbToHsv(uint rgb)+ {+ double r = ((rgb >> 16) & 0xFF) / 255.0, g = ((rgb >> 8) & 0xFF) / 255.0, b = (rgb & 0xFF) / 255.0;+ double max = Math.Max(r, Math.Max(g, b)), min = Math.Min(r, Math.Min(g, b)), d = max - min;+ double h = d == 0 ? 0 : max == r ? 60 * (((g - b) / d) % 6) : max == g ? 60 * ((b - r) / d + 2) : 60 * ((r - g) / d + 4);+ return (h < 0 ? h + 360 : h, max == 0 ? 0 : d / max, max);+ }++ // ---- the two surfaces --------------------------------------------------------------++ // Shared: a bitmap the size of the control, the frame, left-button drag with capture.+ private abstract class Surface : Control+ {+ protected readonly ColourPicker Owner;+ private WriteableBitmap? _bmp;+ private double _builtFor = double.NaN;+ private bool _drag;++ protected Surface(ColourPicker owner)+ {+ Owner = owner;+ Cursor = new Cursor(StandardCursorType.Cross);+ ClipToBounds = false;+ }++ // The pixel at (x, y) of a w × h bitmap, ARGB.+ protected abstract uint Pixel(int x, int y, int w, int h);+ // What the bitmap depends on (the area's hue; the strip never changes).+ protected abstract double Key { get; }+ protected abstract void Pick(double fx, double fy);+ protected abstract void DrawHandle(DrawingContext ctx, Rect r);++ public override void Render(DrawingContext ctx)+ {+ var r = new Rect(Bounds.Size);+ if (r.Width < 2 || r.Height < 2) return;+ var scale = TopLevel.GetTopLevel(this)?.RenderScaling ?? 1;+ int pw = (int)Math.Ceiling(r.Width * scale), ph = (int)Math.Ceiling(r.Height * scale);+ if (_bmp is null || _bmp.PixelSize.Width != pw || _bmp.PixelSize.Height != ph || !Key.Equals(_builtFor))+ {+ _bmp?.Dispose();+ _bmp = new WriteableBitmap(new PixelSize(pw, ph), new Vector(96 * scale, 96 * scale), PixelFormat.Bgra8888, AlphaFormat.Premul);+ using var fb = _bmp.Lock();+ var row = new int[pw];+ for (int y = 0; y < ph; y++)+ {+ for (int x = 0; x < pw; x++) row[x] = unchecked((int)Pixel(x, y, pw, ph));+ Marshal.Copy(row, 0, fb.Address + y * fb.RowBytes, pw);+ }+ _builtFor = Key;+ }+ var rr = new RoundedRect(r, NotaRadius.ControlValue);+ using (ctx.PushClip(rr)) ctx.DrawImage(_bmp, new Rect(_bmp.Size), r);+ ctx.DrawRectangle(null, new Pen(NotaPalette.Rule, 1), new RoundedRect(r.Deflate(0.5), NotaRadius.ControlValue));+ DrawHandle(ctx, r);+ }++ protected override void OnPointerPressed(PointerPressedEventArgs e)+ {+ if (!e.GetCurrentPoint(this).Properties.IsLeftButtonPressed) return;+ _drag = true;+ e.Pointer.Capture(this);+ PickAt(e.GetPosition(this));+ e.Handled = true;+ }++ protected override void OnPointerMoved(PointerEventArgs e)+ {+ if (_drag) PickAt(e.GetPosition(this));+ }++ protected override void OnPointerReleased(PointerReleasedEventArgs e)+ {+ if (!_drag) return;+ _drag = false;+ e.Pointer.Capture(null);+ }++ private void PickAt(Point p) =>+ Pick(Math.Clamp(p.X / Math.Max(1, Bounds.Width), 0, 1), Math.Clamp(p.Y / Math.Max(1, Bounds.Height), 0, 1));++ // A round handle: the selected-handle ink, ringed by the seam so it reads on any colour.+ protected static void Ring(DrawingContext ctx, Point c, double radius)+ {+ ctx.DrawEllipse(null, new Pen(NotaPalette.Seam, 1), c, radius + 1.5, radius + 1.5);+ ctx.DrawEllipse(null, new Pen(NotaPalette.HandleSel, 2), c, radius, radius);+ }+ }++ // Saturation left → right, brightness top → bottom, at the picker's hue.+ private sealed class SpectrumArea : Surface+ {+ public SpectrumArea(ColourPicker owner) : base(owner) { }+ protected override double Key => Owner._h;+ protected override uint Pixel(int x, int y, int w, int h) =>+ 0xFF000000 | HsvToRgb(Owner._h, x / (double)Math.Max(1, w - 1), 1 - y / (double)Math.Max(1, h - 1));+ protected override void Pick(double fx, double fy) => Owner.Picked(null, fx, 1 - fy);+ protected override void DrawHandle(DrawingContext ctx, Rect r) =>+ Ring(ctx, new Point(r.Width * Owner._s, r.Height * (1 - Owner._v)), 5);+ }++ // The hue wheel unrolled, left → right.+ private sealed class HueStrip : Surface+ {+ public HueStrip(ColourPicker owner) : base(owner) { }+ protected override double Key => 0;+ protected override uint Pixel(int x, int y, int w, int h) => 0xFF000000 | HsvToRgb(360.0 * x / Math.Max(1, w - 1), 1, 1);+ protected override void Pick(double fx, double fy) => Owner.Picked(fx * 359.999, null, null);+ protected override void DrawHandle(DrawingContext ctx, Rect r)+ {+ double x = Math.Round(r.Width * Owner._h / 360);+ var bar = new Rect(x - 2, -2, 4, r.Height + 4);+ ctx.DrawRectangle(NotaPalette.HandleSel, new Pen(NotaPalette.Seam, 1), new RoundedRect(bar, NotaRadius.BarValue));+ }+ }+}diff --git a/src/managed/Nota.App/MainWindow.Remote.cs b/src/managed/Nota.App/MainWindow.Remote.csindex 9448b389..41227b02 100644--- a/src/managed/Nota.App/MainWindow.Remote.cs+++ b/src/managed/Nota.App/MainWindow.Remote.cs@@ -96,18 +96,24 @@ public partial class MainWindow : IRemoteHost// The phone wears the theme the window wears, or under Follow phone one of the user's two// picks (spec 014). Built once per theme and once per change, so the hub's reference check// costs nothing on the ticks in between.- private readonly Dictionary<string, RemoteTheme> _remoteThemes = new();+ // Keyed by the worn theme object: the same theme in another accent (spec 084) is another+ // entry, so an accent change re-sends the phone its colours.+ private readonly Dictionary<NotaColourTheme, RemoteTheme> _remoteThemes = new(ReferenceEqualityComparer.Instance);private RemoteAppearance? _remoteLook;- private (NotaColourTheme, AppearanceChoice)? _remoteLookFor;+ private (NotaColourTheme, AppearanceChoice, AccentChoice)? _remoteLookFor;RemoteAppearance IRemoteHost.Appearance{get{- var key = (NotaPalette.Theme ?? NotaThemes.Default, NotaThemeService.Choice);+ var key = (NotaPalette.Theme ?? NotaThemes.Default, NotaThemeService.Choice, NotaThemeService.Accent);if (_remoteLook is null || !key.Equals(_remoteLookFor)){- RemoteTheme Of(NotaColourTheme? t) => RemoteThemeOf(t ?? NotaThemes.Default);+ // A new accent makes every cached theme stale; drop them rather than keep a+ // copy per colour a picker drag went through.+ if (_remoteLookFor is { } was && was.Item3 != key.Item3) _remoteThemes.Clear();+ // The phone's own dark/light picks wear the accent too.+ RemoteTheme Of(NotaColourTheme? t) => RemoteThemeOf(NotaThemeService.Worn(t ?? NotaThemes.Default));_remoteLook = new RemoteAppearance(Of(key.Item1), Of(NotaThemes.Find(key.Item2.Dark)), Of(NotaThemes.Find(key.Item2.Light)),CssHex(NotaPalette.InkDark), CssHex(NotaPalette.InkLight));_remoteLookFor = key;@@ -118,8 +124,8 @@ public partial class MainWindow : IRemoteHostprivate RemoteTheme RemoteThemeOf(NotaColourTheme t){- if (!_remoteThemes.TryGetValue(t.Id, out var r))- _remoteThemes[t.Id] = r = new RemoteTheme(t.Id, t.Name, t.IsDark, Enumerable.ToDictionary(t.Colors, c => c.Key, c => CssHex(c.Value)));+ if (!_remoteThemes.TryGetValue(t, out var r))+ _remoteThemes[t] = r = new RemoteTheme(t.Id, t.Name, t.IsDark, Enumerable.ToDictionary(t.Colors, c => c.Key, c => CssHex(c.Value)));return r;}diff --git a/src/managed/Nota.App/PreferencesWindow.Accent.cs b/src/managed/Nota.App/PreferencesWindow.Accent.csnew file mode 100644index 00000000..d3bbbd8b--- /dev/null+++ b/src/managed/Nota.App/PreferencesWindow.Accent.cs@@ -0,0 +1,346 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+//+// Settings → Appearance → Accent (spec 084, #311): a row of preset swatches, then Custom,+// which opens a colour picker. One accent for the whole app, worn in whichever theme is+// active and tuned to it (Nota.Application.AccentColours). A pick applies at once and is+// saved; in the picker every accepted step applies live, closing keeps it, Esc puts back the+// accent worn before it opened. A colour that cannot be readable in every theme is shown+// with the reason and never worn. Layout and copy: specs/084 contracts/ui-contract.md.++using System;+using System.Collections.Generic;+using System.Linq;+using Avalonia;+using Avalonia.Controls;+using Avalonia.Controls.Primitives;+using Avalonia.Controls.Shapes;+using Avalonia.Input;+using Avalonia.Interactivity;+using Avalonia.Layout;+using Avalonia.Media;+using Avalonia.Media.Immutable;+using Avalonia.Automation;+using Avalonia.Threading;+using Microsoft.Extensions.DependencyInjection;+using Nota.Application;+using Nota.Application.Localization;+using Nota.Presentation;++namespace Nota.App;++public sealed partial class PreferencesWindow+{+ private const double SwatchSize = 22, SwatchFill = 14;++ private static Control AccentPicker()+ {+ var settings = App.Services.GetRequiredService<ISettingsService>();+ var row = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 4 };+ var rings = new List<(string Id, Border Ring, Border Fill)>();++ // The colour a choice wears in the theme on screen.+ static IBrush Worn(AccentChoice c) =>+ new ImmutableSolidColorBrush(NotaAccent.AccentIn(NotaPalette.Theme ?? NotaThemes.Default, c));++ void Choose(AccentChoice c)+ {+ if (c == NotaThemeService.Accent) return;+ Accent.Store(settings.Current, c);+ settings.Save();+ NotaThemeService.SetAccent(c);+ }++ foreach (var preset in Accent.Presets)+ {+ var choice = new AccentChoice(preset.Id);+ var fill = new Border { Width = SwatchFill, Height = SwatchFill, CornerRadius = NotaRadius.Clip };+ var ring = Ring(fill, SwatchSize);+ ToolTip.SetTip(ring, AccentName(preset.Id));+ // Reachable from the keyboard too: Tab to a swatch, Return or Space picks it, the+ // arrows move along the row. Screen readers read its name.+ ring.Focusable = true;+ ring.IsTabStop = true;+ AutomationProperties.SetName(ring, AccentName(preset.Id));+ ring.PointerPressed += (_, e) =>+ {+ if (!e.GetCurrentPoint(ring).Properties.IsLeftButtonPressed) return;+ ring.Focus(NavigationMethod.Pointer);+ Choose(choice);+ e.Handled = true;+ };+ int index = rings.Count;+ ring.KeyDown += (_, e) =>+ {+ if (e.Key is Key.Enter or Key.Space) { Choose(choice); e.Handled = true; }+ else if (e.Key is Key.Left or Key.Right)+ {+ int next = index + (e.Key == Key.Left ? -1 : 1);+ if (next >= 0 && next < rings.Count) { rings[next].Ring.Focus(NavigationMethod.Directional); e.Handled = true; }+ }+ };+ rings.Add((preset.Id, ring, fill));+ row.Children.Add(ring);+ }++ // Custom: a button with the custom colour's chip; its ring marks it chosen like a swatch.+ var customChip = new Border { Width = SwatchFill, Height = SwatchFill, CornerRadius = NotaRadius.Clip };+ var custom = new Button+ {+ Height = 22, FontSize = 12, CornerRadius = NotaRadius.Tile, Padding = new Thickness(4, 0, 8, 0),+ Content = new StackPanel+ {+ Orientation = Orientation.Horizontal, Spacing = 6,+ Children =+ {+ customChip,+ new TextBlock { Text = Loc.T("preferences.accent_custom"), VerticalAlignment = VerticalAlignment.Center },+ new Glyph(GlyphKind.Edit, 10) { Foreground = TextMuted, VerticalAlignment = VerticalAlignment.Center },+ },+ },+ };+ var customRing = Ring(custom, null);+ customRing.Margin = new Thickness(6, 0, 0, 0);+ row.Children.Add(customRing);++ var readout = new TextBlock { FontSize = 12, Foreground = TextMuted, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(6, 0, 0, 0) };+ var readoutHex = new TextBlock { FontSize = 12, Foreground = TextMuted, FontFamily = NotaFonts.MonoFamily, VerticalAlignment = VerticalAlignment.Center };+ row.Children.Add(new StackPanel { Orientation = Orientation.Horizontal, Children = { readout, readoutHex } });++ void Show()+ {+ var now = NotaThemeService.Accent;+ foreach (var (id, ring, fill) in rings)+ {+ fill.Background = Worn(new AccentChoice(id));+ // Chosen: the primary ink. Hovered or focused: the rule. Colour only, never size.+ ring.BorderBrush = id == now.Preset ? NotaPalette.TextPrimary+ : ring.IsPointerOver || ring.IsFocused ? NotaPalette.Rule : Brushes.Transparent;+ }+ var remembered = now.Custom ?? Accent.RememberedCustom(settings.Current);+ customChip.Background = remembered is { } rgb ? Worn(new AccentChoice(Accent.Custom, rgb)) : NotaPalette.SurfaceHover;+ customRing.BorderBrush = now.Preset == Accent.Custom ? NotaPalette.TextPrimary : Brushes.Transparent;+ bool isCustom = now.Preset == Accent.Custom && now.Custom is not null;+ readout.Text = isCustom ? Loc.T("preferences.accent_custom") + " · " : AccentName(now.Preset);+ readoutHex.Text = isCustom ? Accent.Hex(now.Custom!.Value) : "";+ }++ // Hover and keyboard focus show the ring slot in the rule colour.+ foreach (var (_, ring, _) in rings)+ {+ ring.PointerEntered += (_, _) => Show();+ ring.PointerExited += (_, _) => Show();+ ring.GotFocus += (_, _) => Show();+ ring.LostFocus += (_, _) => Show();+ }++ custom.Click += (_, _) => OpenCustomPicker(custom, settings);++ Show();+ var listening = false;+ void OnChanged() => Show();+ row.AttachedToVisualTree += (_, _) => { Show(); if (!listening) { listening = true; NotaThemeService.Changed += OnChanged; } };+ row.DetachedFromVisualTree += (_, _) => { if (listening) { listening = false; NotaThemeService.Changed -= OnChanged; } };+ return row;+ }++ // A 2 px ring slot around a swatch or the Custom button: transparent at rest, so choosing+ // changes only its colour.+ private static Border Ring(Control child, double? size)+ {+ var ring = new Border+ {+ BorderThickness = new Thickness(2), CornerRadius = NotaRadius.Tile, Padding = new Thickness(size is null ? 1 : 2),+ BorderBrush = Brushes.Transparent, Background = Brushes.Transparent, Child = child,+ VerticalAlignment = VerticalAlignment.Center,+ };+ if (size is { } s) { ring.Width = s; ring.Height = s; ring.Cursor = new Cursor(StandardCursorType.Hand); }+ return ring;+ }++ // The Custom popover: spectrum and hue, before/after chip and hex, how each theme would wear+ // the colour, and a note.+ private static void OpenCustomPicker(Button anchor, ISettingsService settings)+ {+ var (_, flyout, focus) = CustomPicker(settings);+ flyout.ShowAt(anchor);+ Dispatcher.UIThread.Post(focus, DispatcherPriority.Input);+ }++ // The popover's content and behaviour, apart from where it opens (a headless capture+ // puts the body in a window of its own).+ private static (Control Body, Flyout Flyout, Action Focus) CustomPicker(ISettingsService settings)+ {+ var before = NotaThemeService.Accent;+ var active = NotaPalette.Theme ?? NotaThemes.Default;+ // The last custom colour is offered again (US2-5); the worn accent only when there is none.+ uint start = before.Custom ?? Accent.RememberedCustom(settings.Current) ?? NotaAccent.ToRgb(NotaAccent.AccentIn(active, before));+ uint? accepted = null;+ bool cancelled = false, typing = false;+ string shown = Accent.Hex(start); // what the hex field holds; TextChanged can arrive late++ var picker = new ColourPicker();+ var oldHalf = new Border { Width = 18, Background = new ImmutableSolidColorBrush(NotaAccent.AccentIn(active, before)) };+ var newHalf = new Border { Width = 18 };+ ToolTip.SetTip(oldHalf, Loc.T("preferences.accent_before"));+ var chip = new Border+ {+ Height = 22, CornerRadius = NotaRadius.Control, BorderBrush = NotaPalette.Rule, BorderThickness = new Thickness(1), ClipToBounds = true,+ Child = new StackPanel { Orientation = Orientation.Horizontal, Children = { oldHalf, newHalf } },+ };+ var hex = new TextBox { Classes = { "field" }, FontSize = 12, FontFamily = NotaFonts.MonoFamily, Height = 22, MinHeight = 22, Width = 216 - 38 - 6, MaxLength = 7 };+ var hexRow = new StackPanel { Orientation = Orientation.Horizontal, Spacing = 6, Children = { chip, hex } };++ var themes = NotaThemes.BuiltIn;+ var strip = new UniformGrid { Columns = themes.Count, Width = ColourPicker.W };+ var cells = new List<(Border Fill, Ellipse Dot)>();+ foreach (var t in themes)+ {+ var fill = new Border { Height = 14, CornerRadius = NotaRadius.Clip, BorderBrush = NotaPalette.Seam, BorderThickness = new Thickness(1) };+ var dot = new Ellipse { Width = 4, Height = 4, Fill = NotaPalette.TextPrimary, HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Top, Margin = new Thickness(0, 2, 2, 0), IsVisible = false };+ var cell = new StackPanel+ {+ Spacing = 3, Margin = new Thickness(2, 0),+ Children =+ {+ new Grid { Children = { fill, dot } },+ new TextBlock { Text = t.Name.Split(' ').Last(), FontSize = 9, Foreground = TextMuted, HorizontalAlignment = HorizontalAlignment.Center, TextTrimming = TextTrimming.CharacterEllipsis },+ },+ };+ ToolTip.SetTip(cell, t.Name);+ cells.Add((fill, dot));+ strip.Children.Add(cell);+ }+ var note = new TextBlock { FontSize = 11, LineHeight = 15, Height = 30, Width = ColourPicker.W, TextWrapping = TextWrapping.Wrap, Foreground = TextMuted };++ var body = new StackPanel+ {+ Spacing = 8, Width = ColourPicker.W,+ Children =+ {+ picker, hexRow,+ new TextBlock { Text = Loc.T("preferences.accent_in_themes"), Classes = { "CellLabel" } },+ strip, note,+ },+ };+ var flyout = new Flyout { Content = body, Placement = PlacementMode.BottomEdgeAlignedLeft };++ void Try(uint rgb)+ {+ var choice = new AccentChoice(Accent.Custom, rgb);+ newHalf.Background = new ImmutableSolidColorBrush(NotaAccent.FromRgb(rgb));+ shown = Accent.Hex(rgb);+ if (!typing) hex.Text = shown;+ var results = NotaAccent.Preview(choice).ToList();+ for (int i = 0; i < results.Count; i++)+ {+ var r = results[i].Result;+ cells[i].Fill.Background = r.Tokens is { } tk ? new ImmutableSolidColorBrush(NotaAccent.FromRgb(tk["Accent"])) : NotaPalette.BgSunken;+ cells[i].Dot.IsVisible = r.Adjusted;+ }+ var refused = results.Where(r => r.Result.Refusal is not null).ToList();+ note.Foreground = refused.Count > 0 ? NotaPalette.Danger : TextMuted;+ note.Text = refused.Count > 0 ? Refusal(refused) : Adjusted(results.Where(r => r.Result.Adjusted).Select(r => r.Theme.Name).ToList(), results.Count);+ if (refused.Count > 0) return;+ accepted = rgb;+ NotaThemeService.SetAccent(choice);+ }++ picker.ColourChanged += Try;+ hex.TextChanged += (_, _) =>+ {+ if (typing || !Accent.TryParseHex(hex.Text, out var rgb) || (hex.Text ?? "").Trim().TrimStart('#').Length is not (3 or 6)+ || Accent.Hex(rgb) == shown) return;+ typing = true;+ picker.Set(rgb);+ Try(rgb);+ typing = false;+ };+ // Return keeps the colour in the field — also the remembered one the picker opened on,+ // which nothing has applied yet. A refused colour is not worn; closing keeps the last+ // colour that was accepted, or puts back the accent from before.+ hex.KeyDown += (_, e) =>+ {+ if (e.Key != Key.Enter) return;+ if (Accent.TryParseHex(hex.Text, out var rgb) && accepted != rgb)+ {+ typing = true;+ Try(rgb);+ typing = false;+ }+ flyout.Hide();+ e.Handled = true;+ };+ // Esc: back to what was worn before, and close. Caught on the way down so the+ // flyout's own Esc handling cannot close it first.+ body.AddHandler(InputElement.KeyDownEvent, (_, e) =>+ {+ if (e.Key != Key.Escape) return;+ cancelled = true;+ flyout.Hide();+ e.Handled = true;+ }, RoutingStrategies.Tunnel);+ flyout.Closed += (_, _) =>+ {+ if (cancelled || accepted is null) { NotaThemeService.SetAccent(before); return; }+ var c = new AccentChoice(Accent.Custom, accepted.Value);+ Accent.Store(settings.Current, c);+ settings.Save();+ NotaThemeService.SetAccent(c);+ };++ picker.Set(start);+ typing = true;+ hex.Text = Accent.Hex(start);+ typing = false;+ newHalf.Background = oldHalf.Background;+ // Opening shows how the current colour sits in each theme, without wearing anything new.+ var preview = NotaAccent.Preview(new AccentChoice(Accent.Custom, start)).ToList();+ for (int i = 0; i < preview.Count; i++)+ {+ var r = preview[i].Result;+ cells[i].Fill.Background = r.Tokens is { } tk ? new ImmutableSolidColorBrush(NotaAccent.FromRgb(tk["Accent"])) : NotaPalette.BgSunken;+ cells[i].Dot.IsVisible = r.Adjusted;+ }+ note.Text = before.Preset == Accent.Custom+ ? Adjusted(preview.Where(r => r.Result.Adjusted).Select(r => r.Theme.Name).ToList(), preview.Count)+ : Loc.T("preferences.accent_note_pick");+ return (body, flyout, () => { hex.SelectAll(); hex.Focus(); });+ }++ // The preset's name (spec 084 contracts § Preset names).+ private static string AccentName(string id) => id switch+ {+ "lime" => Loc.T("accent.lime"),+ "aqua" => Loc.T("accent.aqua"),+ "sky" => Loc.T("accent.sky"),+ "violet" => Loc.T("accent.violet"),+ "magenta" => Loc.T("accent.magenta"),+ "pink" => Loc.T("accent.pink"),+ _ => Loc.T("accent.orange"),+ };++ // The state colour a refused custom colour sits on, as the note names it.+ private static string ClashName(string? token) =>+ token is "Record" ? Loc.T("preferences.accent_clash_record")+ : token is "Mute" ? Loc.T("preferences.accent_clash_mute")+ : token is "Solo" ? Loc.T("preferences.accent_clash_solo")+ : Loc.T("preferences.accent_clash_meter");++ private static string Adjusted(List<string> themes, int all) =>+ themes.Count == 0 ? Loc.T("preferences.accent_note_as_is")+ : themes.Count == all ? Loc.T("preferences.accent_note_adjusted_all")+ : Loc.F("preferences.accent_note_adjusted", string.Join(", ", themes));++ private static string Refusal(List<(NotaColourTheme Theme, AccentResult Result)> refused)+ {+ var first = refused[0].Result.Refusal!;+ var where = string.Join(", ", refused.Select(r => r.Theme.Name));+ return first.Reason switch+ {+ AccentRefusalReason.Grey => Loc.T("preferences.accent_note_grey"),+ AccentRefusalReason.Clash => Loc.F("preferences.accent_note_clash", ClashName(first.ClashWith), where),+ _ => Loc.F("preferences.accent_note_unreadable", where),+ };+ }+}diff --git a/src/managed/Nota.App/PreferencesWindow.cs b/src/managed/Nota.App/PreferencesWindow.csindex 682bb222..e1faf983 100644--- a/src/managed/Nota.App/PreferencesWindow.cs+++ b/src/managed/Nota.App/PreferencesWindow.cs@@ -1099,8 +1099,8 @@ public sealed partial class PreferencesWindow : NotaWindowprivate static TextBlock ModeLabel() => new() { FontSize = 11, Margin = new Thickness(0, 4, 0, -4) };- // A miniature Nota window in one theme's own colours, whichever theme is live, so each- // card previews itself: title bar, transport with the view keys, browser, arrangement+ // A miniature Nota window in one theme's own colours (with the chosen accent), whichever+ // theme is live, so each card previews itself: title bar, transport with the view keys, browser, arrangement// lanes with clips in the first track colours and the playhead, and the device panel.private sealed class ThemePreview : Control{@@ -1108,7 +1108,8 @@ public sealed partial class PreferencesWindow : NotaWindowprivate readonly NotaColourTheme _theme;public ThemePreview(NotaColourTheme theme) { _theme = theme; Width = W; Height = H; }- private IBrush B(SolidColorBrush slot) => new ImmutableSolidColorBrush(NotaPalette.ColorIn(slot, _theme));+ // The theme as it is worn with the chosen accent (spec 084), so the card previews the pair.+ private IBrush B(SolidColorBrush slot) => new ImmutableSolidColorBrush(NotaPalette.ColorIn(slot, NotaThemeService.Worn(_theme)));public override void Render(DrawingContext ctx){@@ -1370,6 +1371,8 @@ public sealed partial class PreferencesWindow : NotaWindowSection("UI", 10,TopRow(Loc.T("preferences.colour_theme"), ThemePicker()),Row("", Caption(Loc.T("preferences.themes_change_colours_only_follow"))),+ TopRow(Loc.T("preferences.accent"), AccentPicker()),+ Row("", Caption(Loc.T("preferences.accent_caption"))),Row(Loc.T("preferences.waveform"), WaveformPicker()),Row("", Caption(Loc.T("preferences.how_audio_clips_draw_on"))),Row("", splitFades),diff --git a/src/managed/Nota.App/Theme/NotaAccent.cs b/src/managed/Nota.App/Theme/NotaAccent.csnew file mode 100644index 00000000..7031bca8--- /dev/null+++ b/src/managed/Nota.App/Theme/NotaAccent.cs@@ -0,0 +1,68 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+//+// A colour theme wearing the user's accent (spec 084): the theme's own colours with the+// accent family replaced by Nota.Application.AccentColours. The result is a theme like any+// other, so the palette, XAML brushes, Fluent's accent ramp, the theme cards and Nota Remote+// take it through the paths spec 011 already has. Cached, so wearing the same choice again+// hands back the same object and NotaThemeService's "already worn" check holds.++using System;+using System.Collections.Generic;+using System.Linq;+using Avalonia.Media;+using Nota.Application;++namespace Nota.App;++internal static class NotaAccent+{+ private static readonly Dictionary<(string Id, AccentChoice Choice), NotaColourTheme> Cache = new();++ /// <summary><paramref name="theme"/> wearing <paramref name="choice"/>. Orange — and a+ /// choice the theme cannot wear, which no preset is — is the theme itself.</summary>+ public static NotaColourTheme Wear(NotaColourTheme theme, AccentChoice choice)+ {+ // Always from the theme file's own colours: a theme already wearing another accent+ // would otherwise be re-coloured relative to that accent.+ theme = NotaThemes.Find(theme.Id) ?? theme;+ if (choice.IsDefault) return theme;+ if (Cache.TryGetValue((theme.Id, choice), out var worn)) return worn;+ var result = AccentColours.Wear(Rgb(theme), choice);+ if (result.Tokens is null) worn = theme;+ else+ {+ var colors = new Dictionary<string, Color>(theme.Colors);+ foreach (var (k, v) in result.Tokens) colors[k] = Color.FromUInt32(0xFF000000 | v);+ worn = theme with { Colors = colors };+ }+ // Presets are a fixed set; custom colours are not — a drag in the picker wears a new+ // one every step. Keep only the latest custom colour, so the cache stays at the+ // presets × themes plus one colour × themes.+ if (choice.Preset == Accent.Custom)+ foreach (var stale in Cache.Keys.Where(k => k.Choice.Preset == Accent.Custom && k.Choice != choice).ToList())+ Cache.Remove(stale);+ Cache[(theme.Id, choice)] = worn;+ return worn;+ }++ /// <summary>How each built-in theme would wear <paramref name="choice"/> — the picker's+ /// "In themes" strip and its note.</summary>+ public static IEnumerable<(NotaColourTheme Theme, AccentResult Result)> Preview(AccentChoice choice) =>+ NotaThemes.BuiltIn.Select(t => (t, AccentColours.Wear(Rgb(t), choice)));++ /// <summary>The accent <paramref name="theme"/> wears for <paramref name="choice"/>, as a colour.</summary>+ public static Color AccentIn(NotaColourTheme theme, AccentChoice choice) => Wear(theme, choice)["Accent"];++ private static readonly Dictionary<NotaColourTheme, IReadOnlyDictionary<string, uint>> RgbCache = new(ReferenceEqualityComparer.Instance);++ private static IReadOnlyDictionary<string, uint> Rgb(NotaColourTheme theme)+ {+ if (!RgbCache.TryGetValue(theme, out var m))+ RgbCache[theme] = m = Enumerable.ToDictionary(theme.Colors, c => c.Key, c => c.Value.ToUInt32() & 0xFFFFFF);+ return m;+ }++ public static uint ToRgb(Color c) => c.ToUInt32() & 0xFFFFFF;+ public static Color FromRgb(uint rgb) => Color.FromUInt32(0xFF000000 | rgb);+}diff --git a/src/managed/Nota.App/Theme/NotaThemeService.cs b/src/managed/Nota.App/Theme/NotaThemeService.csindex 79dfa92d..648bff84 100644--- a/src/managed/Nota.App/Theme/NotaThemeService.cs+++ b/src/managed/Nota.App/Theme/NotaThemeService.cs@@ -13,6 +13,9 @@// it is Default: Avalonia resolves it from the OS and raises// ActualThemeVariantChanged when the OS flips, which swaps the theme.//+// The theme is worn with the user's accent (spec 084): NotaAccent overlays the accent family+// on the theme, and the accented theme goes through the same three layers.+//// Custom-drawn Render() overrides read slot colours without subscribing to them, so every// switch forces a repaint of every window.@@ -35,9 +38,29 @@ internal static class NotaThemeServiceprivate static bool _published;private static AppearanceChoice _choice = new(false, Appearance.StudioDark, Appearance.StudioDark, Appearance.StudioLight);+ private static AccentChoice _accent = AccentChoice.Default;+/// <summary>The appearance being followed.</summary>public static AppearanceChoice Choice => _choice;+ /// <summary>The accent every theme is worn with.</summary>+ public static AccentChoice Accent => _accent;++ /// <summary>Raised after a theme or accent change has been applied and repainted.</summary>+ public static event Action? Changed;++ /// <summary><paramref name="theme"/> as it is worn with the current accent — for the theme+ /// cards and Nota Remote, so they show what the window would wear.</summary>+ public static NotaColourTheme Worn(NotaColourTheme theme) => NotaAccent.Wear(theme, _accent);++ /// <summary>Wear a new accent in whichever theme is active. Live; saving is the caller's.</summary>+ public static void SetAccent(AccentChoice accent)+ {+ if (accent == _accent) return;+ _accent = accent;+ ApplyActive();+ }+/// <summary>Every loaded theme id → whether it is dark — what <see cref="Appearance.Resolve"/> needs.</summary>public static IReadOnlyDictionary<string, bool> KnownThemes =>NotaThemes.BuiltIn.ToDictionary(t => t.Id, t => t.IsDark);@@ -69,7 +92,7 @@ internal static class NotaThemeServiceif (app is null) return;// With no OS signal Avalonia reports Light, which is the spec's fallback too.bool osDark = app.ActualThemeVariant == ThemeVariant.Dark;- var theme = NotaThemes.Find(_choice.Active(osDark)) ?? NotaThemes.Default;+ var theme = Worn(NotaThemes.Find(_choice.Active(osDark)) ?? NotaThemes.Default);if (!_choice.FollowSystem)app.RequestedThemeVariant = theme.IsDark ? ThemeVariant.Dark : ThemeVariant.Light;@@ -78,6 +101,7 @@ internal static class NotaThemeServiceNotaPalette.Apply(theme);ApplyResources(app, theme);RepaintEverything();+ Changed?.Invoke();}// Put the slot brushes into the application resources once. They are re-tinted indiff --git a/src/managed/Nota.Application/Accent.cs b/src/managed/Nota.Application/Accent.csnew file mode 100644index 00000000..bc7632a4--- /dev/null+++ b/src/managed/Nota.Application/Accent.cs@@ -0,0 +1,287 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+//+// The accent colour the user chose (spec 084, #311) and how a theme wears it. Pure: colours+// are 0xRRGGBB, no UI, so the smoke test can run every preset in every theme. A theme keeps+// its own accent family (orange); a choice re-colours that family in OKLCH — each token keeps+// its lightness relation to the theme's orange and takes the new hue — and, only when the+// readability bar would fail, moves the accent's lightness by the smallest step that passes+// (specs/084 research R2–R3). Orange is the theme file itself, untouched.++using System;+using System.Collections.Generic;+using System.Globalization;+using System.Linq;++namespace Nota.Application;++/// <summary>A preset id, or <see cref="Accent.Custom"/> with the user's colour (0xRRGGBB).</summary>+public sealed record AccentChoice(string Preset, uint? Custom = null)+{+ public static readonly AccentChoice Default = new(Accent.Orange);+ /// <summary>Orange: the theme files as they are.</summary>+ public bool IsDefault => Preset == Accent.Orange;+}++/// <summary>A curated accent: its OKLCH chroma and hue; lightness comes from the theme.+/// Orange carries none — it is the theme's own accent.</summary>+public sealed record AccentPreset(string Id, double Chroma, double Hue);++public static class Accent+{+ public const string Orange = "orange";+ public const string Custom = "custom";++ /// <summary>The presets in the order the Accent row shows them (research R4): spread round+ /// the wheel, clear of the mute amber, record red, meter green and solo blue.</summary>+ public static readonly IReadOnlyList<AccentPreset> Presets = new AccentPreset[]+ {+ new(Orange, 0, 0),+ new("lime", 0.15, 125),+ new("aqua", 0.12, 185),+ new("sky", 0.13, 224),+ new("violet", 0.15, 295),+ new("magenta", 0.16, 330),+ new("pink", 0.15, 355),+ };++ public static AccentPreset? Find(string? id) => Presets.FirstOrDefault(p => p.Id == id);++ /// <summary>What settings.json says, or Orange: an empty, unknown or malformed value+ /// falls back without throwing, and nothing is written.</summary>+ public static AccentChoice Resolve(Settings s)+ {+ var id = s.Accent;+ if (id == Custom)+ return TryParseHex(s.CustomAccent, out var rgb) ? new AccentChoice(Custom, rgb) : AccentChoice.Default;+ return Find(id) is { } p ? new AccentChoice(p.Id) : AccentChoice.Default;+ }++ /// <summary>Write a choice. A custom colour is also remembered in <see cref="Settings.CustomAccent"/>,+ /// which picking a preset keeps, so Custom offers it again.</summary>+ public static void Store(Settings s, AccentChoice c)+ {+ s.Accent = c.IsDefault ? "" : c.Preset;+ if (c.Preset == Custom && c.Custom is { } rgb) s.CustomAccent = Hex(rgb);+ }++ /// <summary>The last custom colour, if one was ever chosen.</summary>+ public static uint? RememberedCustom(Settings s) => TryParseHex(s.CustomAccent, out var rgb) ? rgb : null;++ /// <summary>#RGB or #RRGGBB, the # optional, any case.</summary>+ public static bool TryParseHex(string? text, out uint rgb)+ {+ rgb = 0;+ var t = (text ?? "").Trim();+ if (t.StartsWith('#')) t = t[1..];+ if (t.Length == 3) t = string.Concat(t.Select(ch => new string(ch, 2)));+ return t.Length == 6 && uint.TryParse(t, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out rgb);+ }++ public static string Hex(uint rgb) => "#" + (rgb & 0xFFFFFF).ToString("X6", CultureInfo.InvariantCulture);+}++/// <summary>Why a custom colour cannot be the accent in a theme.</summary>+public enum AccentRefusalReason { Grey, Clash, Unreadable }++public sealed record AccentRefusal(AccentRefusalReason Reason, string? ClashWith = null);++/// <summary>The accent family as one theme wears a choice: the tokens to overlay, whether the+/// lightness was moved, or why it was refused (custom colours only).</summary>+public sealed record AccentResult(IReadOnlyDictionary<string, uint>? Tokens, bool Adjusted, AccentRefusal? Refusal);++public static class AccentColours+{+ /// <summary>Tokens that are the accent itself: they move with its lightness.</summary>+ public static readonly string[] SolidTokens =+ {+ "Accent", "AccentBright", "AccentHover", "AccentDeep", "AccentPale",+ "SystemAccent", "SystemAccentLight1", "SystemAccentLight2", "SystemAccentLight3",+ "SystemAccentDark1", "SystemAccentDark2", "SystemAccentDark3",+ };++ /// <summary>Tokens that are the accent washed over the theme's surfaces: they keep the+ /// theme's lightness, or a dark custom colour would sink the "picked" tint into the ground.</summary>+ public static readonly string[] BlendTokens = { "AccentDim", "AccentEdge", "AccentMute", "AccentSubtle", "BorderBrass" };++ /// <summary>Every token a choice replaces.</summary>+ public static IEnumerable<string> Tokens => SolidTokens.Concat(BlendTokens).Append("TextOnAccent");++ /// <summary>The state colours an accent must not be mistaken for (T3.8 + the meter green).</summary>+ public static readonly string[] States = { "Record", "Mute", "Solo", "Success" };++ public const uint InkDark = 0x17181A, InkLight = 0xFFFFFF;+ public const double MinChroma = 0.05; // below this a colour reads as grey+ public const double CustomShift = 0.12; // most a custom colour's lightness may move+ public const double PresetShift = 0.40;+ private const double Step = 0.005;++ /// <summary>How <paramref name="theme"/> (token → 0xRRGGBB) wears <paramref name="choice"/>.</summary>+ public static AccentResult Wear(IReadOnlyDictionary<string, uint> theme, AccentChoice choice)+ {+ if (choice.IsDefault || (choice.Preset == Accent.Custom ? choice.Custom is null : Accent.Find(choice.Preset) is null))+ return new AccentResult(Tokens.ToDictionary(t => t, t => theme[t]), false, null);++ var (la, _, _) = OkLch(theme["Accent"]);+ double l1, c1, h1, reach;+ bool custom = choice.Preset == Accent.Custom;+ if (custom)+ {+ (l1, c1, h1) = OkLch(choice.Custom!.Value);+ if (c1 < MinChroma) return new AccentResult(null, false, new AccentRefusal(AccentRefusalReason.Grey));+ // Distinctness is judged on the colour itself, so moving its lightness can never+ // talk a copy of the record red past the bar.+ if (Clash(theme, choice.Custom.Value) is { } with)+ return new AccentResult(null, false, new AccentRefusal(AccentRefusalReason.Clash, with));+ reach = CustomShift;+ }+ else+ {+ var p = Accent.Find(choice.Preset)!;+ (l1, c1, h1) = (la, p.Chroma, p.Hue);+ reach = PresetShift;+ }++ int steps = (int)Math.Round(reach / Step);+ for (int n = 0; n <= steps; n++)+ foreach (var sign in n == 0 ? new[] { 0 } : new[] { 1, -1 })+ {+ double l = l1 + sign * n * Step;+ if (l <= 0.2 || l >= 0.95) continue;+ var tokens = Tint(theme, l, c1, h1);+ if (Failures(theme, tokens, includeTracks: !custom).Count == 0)+ return new AccentResult(tokens, n != 0, null);+ }+ return new AccentResult(null, false, new AccentRefusal(AccentRefusalReason.Unreadable));+ }++ /// <summary>The accent family re-coloured to lightness <paramref name="l1"/> (of the+ /// accent itself), chroma <paramref name="c1"/> and hue <paramref name="h1"/>.</summary>+ public static Dictionary<string, uint> Tint(IReadOnlyDictionary<string, uint> theme, double l1, double c1, double h1)+ {+ var (la, ca, ha) = OkLch(theme["Accent"]);+ var outp = new Dictionary<string, uint>();+ foreach (var k in SolidTokens.Concat(BlendTokens))+ {+ var (lk, ck, hk) = OkLch(theme[k]);+ double l = lk + (Array.IndexOf(SolidTokens, k) >= 0 ? l1 - la : 0);+ outp[k] = InGamut(l, ca > 1e-6 ? ck * (c1 / ca) : c1, hk + (h1 - ha));+ }+ outp["TextOnAccent"] = InkOn(outp["Accent"]);+ return outp;+ }++ /// <summary>The rules a derived accent fails in a theme (research R3), empty when it+ /// passes: T3.4 accent line on the grounds, T3.5 ink on the accent, T3.8 + the meter green+ /// by ΔE and by Δa*b*, and — presets only — every track colour.</summary>+ public static List<string> Failures(IReadOnlyDictionary<string, uint> theme, IReadOnlyDictionary<string, uint> tokens, bool includeTracks)+ {+ var f = new List<string>();+ uint accent = tokens["Accent"], bright = tokens["AccentBright"];+ foreach (var s in new[] { "BgApp", "Panel", "BgSunken" })+ if (Contrast(bright, theme[s]) < 2.3) f.Add($"T3.4 AccentBright/{s}");+ if (Contrast(InkOn(accent), accent) < 4.5) f.Add("T3.5 ink on Accent");+ foreach (var s in States)+ {+ if (DeltaE76(accent, theme[s]) < 15) f.Add($"ΔE Accent/{s}");+ if (DeltaAb(accent, theme[s]) < 15) f.Add($"Δab Accent/{s}");+ }+ if (includeTracks)+ for (int i = 1; i <= 9; i++)+ if (DeltaE76(accent, theme[$"Track{i}"]) < 15) f.Add($"ΔE Accent/Track{i}");+ return f;+ }++ /// <summary>The state colour <paramref name="rgb"/> would be mistaken for, if any.</summary>+ public static string? Clash(IReadOnlyDictionary<string, uint> theme, uint rgb) =>+ States.FirstOrDefault(s => DeltaE76(rgb, theme[s]) < 15 || DeltaAb(rgb, theme[s]) < 15);++ // ---- colour maths ------------------------------------------------------------------++ /// <summary>Dark ink or white, whichever reads better on the fill (as NotaPalette.ReadableInkOn).</summary>+ public static uint InkOn(uint fill) => Contrast(InkDark, fill) >= Contrast(InkLight, fill) ? InkDark : InkLight;++ public static double Contrast(uint a, uint b)+ {+ double la = Luminance(a), lb = Luminance(b);+ return (Math.Max(la, lb) + 0.05) / (Math.Min(la, lb) + 0.05);+ }++ private static double Luminance(uint c)+ {+ static double Ch(uint v) { double x = v / 255.0; return x <= 0.03928 ? x / 12.92 : Math.Pow((x + 0.055) / 1.055, 2.4); }+ return 0.2126 * Ch((c >> 16) & 0xFF) + 0.7152 * Ch((c >> 8) & 0xFF) + 0.0722 * Ch(c & 0xFF);+ }++ /// <summary>CIE76 colour difference (as the readability bar measures it).</summary>+ public static double DeltaE76(uint a, uint b)+ {+ var (l1, a1, b1) = Lab(a);+ var (l2, a2, b2) = Lab(b);+ return Math.Sqrt((l1 - l2) * (l1 - l2) + (a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2));+ }++ /// <summary>Colour difference with lightness left out: a lighter copy of the mute amber is+ /// still the mute amber.</summary>+ public static double DeltaAb(uint a, uint b)+ {+ var (_, a1, b1) = Lab(a);+ var (_, a2, b2) = Lab(b);+ return Math.Sqrt((a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2));+ }++ private static double Lin(double v) => v <= 0.04045 ? v / 12.92 : Math.Pow((v + 0.055) / 1.055, 2.4);+ private static double Gam(double v) => v <= 0.0031308 ? 12.92 * v : 1.055 * Math.Pow(v, 1 / 2.4) - 0.055;++ private static (double R, double G, double B) Linear(uint c) =>+ (Lin(((c >> 16) & 0xFF) / 255.0), Lin(((c >> 8) & 0xFF) / 255.0), Lin((c & 0xFF) / 255.0));++ private static (double L, double A, double B) Lab(uint c)+ {+ var (r, g, b) = Linear(c);+ double x = (0.4124 * r + 0.3576 * g + 0.1805 * b) / 0.95047, y = 0.2126 * r + 0.7152 * g + 0.0722 * b,+ z = (0.0193 * r + 0.1192 * g + 0.9505 * b) / 1.08883;+ static double F(double t) => t > 0.008856 ? Math.Cbrt(t) : 7.787 * t + 16.0 / 116;+ return (116 * F(y) - 16, 500 * (F(x) - F(y)), 200 * (F(y) - F(z)));+ }++ /// <summary>OKLCH of an sRGB colour: lightness 0–1, chroma, hue in degrees.</summary>+ public static (double L, double C, double H) OkLch(uint c)+ {+ var (r, g, b) = Linear(c);+ double l = Math.Cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);+ double m = Math.Cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);+ double s = Math.Cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);+ double L = 0.2104542553 * l + 0.7936177850 * m - 0.0040720468 * s;+ double A = 1.9779984951 * l - 2.4285922050 * m + 0.4505937099 * s;+ double B = 0.0259040371 * l + 0.7827717662 * m - 0.8086757660 * s;+ double h = Math.Atan2(B, A) * 180 / Math.PI;+ return (L, Math.Sqrt(A * A + B * B), h < 0 ? h + 360 : h);+ }++ // OKLCH → linear sRGB; false when outside the gamut.+ private static bool FromOkLch(double L, double C, double h, out double r, out double g, out double b)+ {+ double A = C * Math.Cos(h * Math.PI / 180), B = C * Math.Sin(h * Math.PI / 180);+ double l = Math.Pow(L + 0.3963377774 * A + 0.2158037573 * B, 3);+ double m = Math.Pow(L - 0.1055613458 * A - 0.0638541728 * B, 3);+ double s = Math.Pow(L - 0.0894841775 * A - 1.2914855480 * B, 3);+ r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;+ g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;+ b = -0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s;+ const double e = 1e-4;+ return r >= -e && r <= 1 + e && g >= -e && g <= 1 + e && b >= -e && b <= 1 + e;+ }++ /// <summary>The sRGB colour nearest to an OKLCH value: chroma is reduced until it fits.</summary>+ public static uint InGamut(double L, double C, double h)+ {+ L = Math.Clamp(L, 0, 1);+ double r = 0, g = 0, b = 0;+ bool ok = false;+ for (int i = 0; i < 60 && !(ok = FromOkLch(L, C, h, out r, out g, out b)); i++) C *= 0.95;+ if (!ok) FromOkLch(L, 0, h, out r, out g, out b);+ static uint Byte(double v) => (uint)Math.Round(Math.Clamp(Gam(Math.Clamp(v, 0, 1)), 0, 1) * 255);+ return (Byte(r) << 16) | (Byte(g) << 8) | Byte(b);+ }+}diff --git a/src/managed/Nota.Application/Localization/en.json b/src/managed/Nota.Application/Localization/en.jsonindex 04b0fd34..e2a9c088 100644--- a/src/managed/Nota.Application/Localization/en.json+++ b/src/managed/Nota.Application/Localization/en.json@@ -10,6 +10,13 @@"about.engine": "Engine {0}","about.free_software_under_the_gnu": "Free software under the GNU AGPLv3.","about.includes_third_party_software_juce": "Includes third-party software (JUCE, Avalonia, miniaudio, RtMidi, dr_libs, Signalsmith, HIIR). See LICENSES/THIRD-PARTY-NOTICES.md for copyright and attribution notices.",+ "accent.aqua": "Aqua",+ "accent.lime": "Lime",+ "accent.magenta": "Magenta",+ "accent.orange": "Orange",+ "accent.pink": "Pink",+ "accent.sky": "Sky",+ "accent.violet": "Violet","ai.clip_ai.loading_the_model": "Loading the model…","ai.clip_ai.preparing_audio": "Preparing audio…","ai.clip_ai.separating_stems": "Separating stems…",@@ -2989,6 +2996,22 @@"ports.i_process_cpu.of_one_core": "of one core","preferences.a_b_compare_move_copy": "A / B compare, move, copy, delete, presets, save preset","preferences.a_multi_selection_gets_its": "A multi-selection gets its own menu: colour, height, freeze, group, copy, duplicate, delete",+ "preferences.accent": "Accent",+ "preferences.accent_before": "Before",+ "preferences.accent_caption": "The colour of what is live or chosen — the playhead, the loop, selection, toggles that are on. Tuned to each theme so it stays readable.",+ "preferences.accent_clash_meter": "the meter green",+ "preferences.accent_clash_mute": "mute",+ "preferences.accent_clash_record": "the record red",+ "preferences.accent_clash_solo": "solo",+ "preferences.accent_custom": "Custom",+ "preferences.accent_in_themes": "In themes",+ "preferences.accent_note_adjusted": "Lightness adjusted in {0} to stay readable.",+ "preferences.accent_note_adjusted_all": "Lightness adjusted slightly in every theme so it stays readable.",+ "preferences.accent_note_as_is": "Worn as is in every theme.",+ "preferences.accent_note_clash": "Too close to {0} in {1} — pick another colour. The accent stays as it was.",+ "preferences.accent_note_grey": "Pick a colour, not a grey — the accent has to read as a colour.",+ "preferences.accent_note_pick": "Drag in the spectrum or type a colour.",+ "preferences.accent_note_unreadable": "No lightness keeps this readable in {0} — pick another colour. The accent stays as it was.","preferences.add_a_note_with_the": "Add a note with the length and velocity of the last note touched · on a note, delete it","preferences.add_a_point_on_a": "Add a point · on a point, delete it · right-click to clear the curve","preferences.add_a_warp_marker_on": "Add a warp marker · on a marker, delete it",diff --git a/src/managed/Nota.Application/Settings.cs b/src/managed/Nota.Application/Settings.csindex 99fa3561..4e4d33a7 100644--- a/src/managed/Nota.Application/Settings.cs+++ b/src/managed/Nota.Application/Settings.cs@@ -31,6 +31,13 @@ public sealed class Settingspublic string SystemDarkTheme { get; set; } = Appearance.StudioDark;/// <summary>Theme worn while following the OS and it is in light mode (a light theme).</summary>public string SystemLightTheme { get; set; } = Appearance.StudioLight;+ /// <summary>The accent colour (spec 084, Settings → Appearance): empty for Orange, a preset+ /// id, or "custom" for <see cref="CustomAccent"/>. One choice, worn in every theme. An+ /// unknown value reads as Orange (<see cref="Nota.Application.Accent.Resolve"/>).</summary>+ public string Accent { get; set; } = "";+ /// <summary>The last custom accent, #RRGGBB — kept while a preset is worn, so Custom+ /// offers it again.</summary>+ public string CustomAccent { get; set; } = "";/// <summary>Whether Session view shows its inspector column (toolbar toggle). On by default;/// folding it gives the clip grid its width back on small windows.</summary>public bool SessionInspectorOpen { get; set; } = true;diff --git a/tests/Nota.SmokeTest/DesignTokenCheck.Accent.cs b/tests/Nota.SmokeTest/DesignTokenCheck.Accent.csnew file mode 100644index 00000000..0191057e--- /dev/null+++ b/tests/Nota.SmokeTest/DesignTokenCheck.Accent.cs@@ -0,0 +1,97 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright (c) 2026 Egor Khindikaynen (Nota). See LICENSES/ for license terms.+//+// The accent colour (spec 084, #311), checked as data: Orange is every theme file untouched,+// every preset passes the accent rows of the readability bar plus the meter-green, chromatic+// and track-colour rules in every theme (research R3), custom colours are worn, tuned or+// refused as specified, settings resolve and round-trip, and the app wears the accent+// everywhere a theme goes (the service, startup, the theme cards, Nota Remote).++using System.Globalization;+using System.Text.Json;+using Nota.Application;++namespace Nota.SmokeTest;++internal static partial class DesignTokenCheck+{+ public static IEnumerable<(bool Ok, string Label)> RunAccent()+ {+ var root = RepoRoot();+ if (root is null) { yield return (false, "repo root located"); yield break; }+ var app = Path.Combine(root, "src/managed/Nota.App");+ var themes = Directory.EnumerateFiles(Path.Combine(app, "Theme/Themes"), "*.json").OrderBy(f => f)+ .ToDictionary(f => Path.GetFileNameWithoutExtension(f)!, f => ReadRgb(File.ReadAllText(f)));++ foreach (var (id, t) in themes)+ {+ // Orange: the theme file exactly (FR-004, SC-003).+ var o = AccentColours.Wear(t, AccentChoice.Default);+ yield return (o.Tokens is not null && !o.Adjusted && AccentColours.Tokens.All(k => o.Tokens[k] == t[k]),+ $"{id}: Orange is the theme file's own accent family");+ // The theme as shipped already meets the new rules (A1, A2), so they tighten nothing today.+ var shipped = AccentColours.Failures(t, t, includeTracks: true);+ yield return (shipped.Count == 0, shipped.Count == 0 ? $"{id}: shipped orange passes T3.4/T3.5/T3.8/A1/A2/A3"+ : $"{id}: shipped orange fails {string.Join(", ", shipped)}");++ foreach (var p in Accent.Presets.Where(p => p.Id != Accent.Orange))+ {+ var r = AccentColours.Wear(t, new AccentChoice(p.Id));+ var fails = r.Tokens is null ? new List<string> { r.Refusal?.Reason.ToString() ?? "?" } : AccentColours.Failures(t, r.Tokens, includeTracks: true);+ yield return (fails.Count == 0,+ fails.Count == 0 ? $"{id}: {p.Id} → {Accent.Hex(r.Tokens!["Accent"])}{(r.Adjusted ? " (lightness adjusted)" : "")} passes every accent rule"+ : $"{id}: {p.Id} fails {string.Join(", ", fails)}");+ }+ }++ // Custom colours (research R3; mockup § 2).+ AccentResult Custom(string theme, string hex) { Accent.TryParseHex(hex, out var rgb); return AccentColours.Wear(themes[theme], new AccentChoice(Accent.Custom, rgb)); }+ bool AllThemes(string hex, Func<AccentResult, bool> ok) => themes.Keys.All(k => ok(Custom(k, hex)));+ Accent.TryParseHex("#00B5D8", out var cyan);+ yield return (AllThemes("#00B5D8", r => r.Tokens is not null && !r.Adjusted && r.Tokens["Accent"] == cyan),+ "custom #00B5D8 is worn exactly in every theme");+ yield return (AllThemes("#4C6FFF", r => r.Tokens is not null && r.Adjusted),+ "custom #4C6FFF is worn with its lightness adjusted (ink on it) in every theme");+ yield return (Custom("studio-light", "#3FA7FF") is { Refusal: { Reason: AccentRefusalReason.Clash, ClashWith: "Solo" } }+ && Custom("studio-dark", "#3FA7FF").Tokens is not null,+ "custom #3FA7FF is refused in Studio Light only — too close to solo");+ yield return (AllThemes("#8C8C8C", r => r.Refusal?.Reason == AccentRefusalReason.Grey), "custom #8C8C8C is refused as a grey");+ yield return (Custom("studio-dark", "#F06A6E").Refusal is { Reason: AccentRefusalReason.Clash, ClashWith: "Record" },+ "custom = the record red is refused where it is the record red, whatever its lightness");+ yield return (themes.Keys.All(k => { var r = Custom(k, "#5276FE"); return r.Tokens is null || r.Tokens["TextOnAccent"] == AccentColours.InkOn(r.Tokens["Accent"]); }),+ "the ink on a custom accent is derived (dark or white)");++ // Settings (data-model.md).+ yield return (Accent.Resolve(new Settings()).IsDefault, "no setting → Orange");+ yield return (Accent.Resolve(new Settings { Accent = "nope" }).IsDefault, "an unknown preset → Orange");+ yield return (Accent.Resolve(new Settings { Accent = "custom", CustomAccent = "zz" }).IsDefault, "custom with a malformed colour → Orange");+ yield return (Accent.Resolve(new Settings { Accent = "violet" }) == new AccentChoice("violet"), "a stored preset is kept");+ var s = new Settings();+ Accent.Store(s, new AccentChoice(Accent.Custom, 0x4C6FFF));+ Accent.Store(s, new AccentChoice("lime"));+ yield return (Accent.Resolve(s) == new AccentChoice("lime") && Accent.RememberedCustom(s) == 0x4C6FFF,+ "picking a preset keeps the last custom colour for Custom");+ Accent.Store(s, AccentChoice.Default);+ yield return (s.Accent == "" && Accent.Resolve(s).IsDefault, "Orange stores as empty");+ yield return (Accent.TryParseHex("4c6", out var short3) && short3 == 0x44CC66 && Accent.TryParseHex("#4C6FFF", out _) && !Accent.TryParseHex("#4C6FF", out _),+ "hex entry takes #RGB and #RRGGBB, # optional");++ // Wiring: everything a theme reaches wears the accent.+ var service = File.ReadAllText(Path.Combine(app, "Theme/NotaThemeService.cs"));+ yield return (service.Contains("Worn(NotaThemes.Find(_choice.Active(osDark))"), "the theme service wears the accented theme");+ var startup = File.ReadAllText(Path.Combine(app, "App.axaml.cs"));+ yield return (startup.Contains("Accent.Resolve("), "the accent is resolved before the first window paints");+ var remote = File.ReadAllText(Path.Combine(app, "MainWindow.Remote.cs"));+ yield return (remote.Contains("NotaThemeService.Worn(") && remote.Contains("NotaThemeService.Accent"),+ "Nota Remote is sent the accented themes and re-sent on an accent change");+ var prefs = string.Concat(Directory.EnumerateFiles(app, "PreferencesWindow*.cs").Select(File.ReadAllText));+ yield return (prefs.Contains("NotaThemeService.Worn("), "the theme cards preview each theme with the chosen accent");+ }++ private static Dictionary<string, uint> ReadRgb(string json)+ {+ using var doc = JsonDocument.Parse(json);+ return doc.RootElement.GetProperty("colors").EnumerateObject()+ .ToDictionary(p => p.Name, p => uint.Parse(p.Value.GetString()![^6..], NumberStyles.HexNumber, CultureInfo.InvariantCulture));+ }+}diff --git a/tests/Nota.SmokeTest/LocalizationAllowList.txt b/tests/Nota.SmokeTest/LocalizationAllowList.txtindex acf44cdf..47c505f9 100644--- a/tests/Nota.SmokeTest/LocalizationAllowList.txt+++ b/tests/Nota.SmokeTest/LocalizationAllowList.txt@@ -2424,6 +2424,16 @@ Nota.App/Theme/NotaColourTheme.cs name must be 1–40 characters # data: diagnosNota.App/Theme/NotaColourTheme.cs the file must hold one JSON object # data: diagnostics for people writing a theme fileNota.App/WelcomeWindow.cs $" · {NotaNum.Unit(p.Fraction * 100, " # data: numbers and units onlyNota.App/WelcomeWindow.cs $"{(p.Fraction * size).ToString(" # data: numbers and units only+Nota.Application/Accent.cs $"T3.4 AccentBright/{s}" # data: readability-rule diagnostics for the smoke test (spec 084), never shown+Nota.Application/Accent.cs $"ΔE Accent/Track{i}" # data: readability-rule diagnostics for the smoke test (spec 084), never shown+Nota.Application/Accent.cs $"ΔE Accent/{s}" # data: readability-rule diagnostics for the smoke test (spec 084), never shown+Nota.Application/Accent.cs $"Δab Accent/{s}" # data: readability-rule diagnostics for the smoke test (spec 084), never shown+Nota.Application/Accent.cs Accent # data: colour token name (theme-file key, spec 084)+Nota.Application/Accent.cs Mute # data: colour token name (theme-file key, spec 084)+Nota.Application/Accent.cs Panel # data: colour token name (theme-file key, spec 084)+Nota.Application/Accent.cs Record # data: colour token name (theme-file key, spec 084)+Nota.Application/Accent.cs Solo # data: colour token name (theme-file key, spec 084)+Nota.Application/Accent.cs Success # data: colour token name (theme-file key, spec 084)Nota.Application/Editing/SnapGrid.cs 1 bar # data: note-value names of the snap ladder; the bar steps are shown through Loc in NameOfNota.Application/Editing/SnapGrid.cs 2 bars # data: note-value names of the snap ladder; the bar steps are shown through Loc in NameOfNota.Application/Editing/SnapGrid.cs 4 bars # data: note-value names of the snap ladder; the bar steps are shown through Loc in NameOfdiff --git a/tests/Nota.SmokeTest/Program.cs b/tests/Nota.SmokeTest/Program.csindex fabcb6fa..912a184f 100644--- a/tests/Nota.SmokeTest/Program.cs+++ b/tests/Nota.SmokeTest/Program.cs@@ -83,6 +83,8 @@ Console.WriteLine($"engine v{NotaEngine.Version}");foreach (var (ok, label) in Nota.SmokeTest.SplashArtTests.Run()) Check(ok, label);Console.WriteLine("-- design: appearance --");foreach (var (ok, label) in Nota.SmokeTest.DesignTokenCheck.RunAppearance()) Check(ok, label);+ Console.WriteLine("-- design: accent --");+ foreach (var (ok, label) in Nota.SmokeTest.DesignTokenCheck.RunAccent()) Check(ok, label);Console.WriteLine("-- design: interface scale --");foreach (var (ok, label) in Nota.SmokeTest.DesignTokenCheck.RunInterfaceScale()) Check(ok, label);Console.WriteLine("-- localization: language --");