Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
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
- 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)
- T002 Create
src/managed/Nota.Application/Accent.cs(SPDX header):AccentChoice(string Preset, uint? Custom)withIsDefault;AccentPreset(Id, NameKey, Chroma, Hue)andAccent.Presetsin 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 - T003 In
src/managed/Nota.Application/Accent.csadd the pure derivationAccentColours: OKLab/OKLCH ↔ sRGB on0xRRGGBB, 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)(#17181Aor#FFFFFF, higher WCAG contrast); Orange returns the theme's own values — research R2 - T004 In
src/managed/Nota.Application/Accent.csadd the rules and the fit:Failures(theme, tokens, includeTracks)for T3.4 (AccentBrightonBgApp/Panel/BgSunken≥ 2.3), T3.5 (ink onAccent≥ 4.5), T3.8 + A1 (ΔE76 ≥ 15 vsRecord/Mute/Solo/Success), A2 (Δa*b* ≥ 15 vs the same), A3 presets-only (ΔE76 ≥ 15 vsTrack1–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 - T005 [P] In
src/managed/Nota.Application/Settings.csaddAccent(string, default"") andCustomAccent(string, default"",#RRGGBB) with doc comments; inAccent.csaddAccent.Resolve(Settings) → AccentChoice("", unknown id,customwith missing/malformed hex → Orange; never throws, never writes) andAccent.Store(Settings, AccentChoice)— data-model.md § Settings - T006 Create
src/managed/Nota.App/Theme/NotaAccent.cs(SPDX):Wear(NotaColourTheme, AccentChoice) → NotaColourThemeoverlayingAccentColours.Weartokens, same Id/Name/Kind, cached per (Id, choice), Orange → the same theme object; a preset refusal (never expected) falls back to the theme itself - T007 In
src/managed/Nota.App/Theme/NotaThemeService.cskeepAccentnext toChoice;Set(choice, accent)/SetAccent(accent);ApplyActivewearsNotaAccent.Wear(theme, Accent)so slots, Brush.* and the FluentSystemAccentColor*ramp follow;Worn(theme)for previews and Remote; raise aChangedevent after an apply - T008 In
src/managed/Nota.App/App.axaml.csresolve the accent with the appearance and pass it toNotaThemeService.Setbefore the first window paints (FR-009) - T009 Create
tests/Nota.SmokeTest/DesignTokenCheck.Accent.cswithRunAccent()and call it fromtests/Nota.SmokeTest/Program.cs: loads the four theme files, asserts Orange identity for every theme (all tokens equal the file), every preset × theme has noFailuresincl. A3, every theme as shipped passes A1/A2, resolution fallbacks ("","nope",custom+"zz"), store round-trip, custom cases#00B5D8as is,#4C6FFFadjusted,#3FA7FFclash solo in Studio Light only,#8C8C8Cgrey
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.
- 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 /Rulehover /TextPrimarychosen, 14 × 14 fill radiusNotaRadius.Clipin the preset's accent as worn in the active theme, tooltip = name), 6 px gap, Custom button (chip + "Custom" +GlyphKind.Edit), readout (TextMuted12; "Custom · #RRGGBB" hex in Geist Mono); a pick →Accent.Store,settings.Save(),NotaThemeService.SetAccent, refresh — contracts/ui-contract.md § Accent row - T011 [US1] In
src/managed/Nota.App/PreferencesWindow.csinsertTopRow(Loc.T("preferences.accent"), AccentPicker())and its caption under the colour theme rows; theme cards (ThemeCards/ThemePreview) drawNotaThemeService.Worn(t)and repaint on accent change, keeping theColorIn(…, _theme)contract RunThemes checks - 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 - 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.
- T014 [US2] Create
src/managed/Nota.App/Controls/ColourPicker.cs(SPDX): saturation/value area 216 × 132 and hue strip 216 × 10 asWriteableBitmaps (SV rebuilt only on hue change),Ruleframes radius 3, handles inHandleSelwith aSeamring, left-button drag,ColourChanged(uint rgb)event,Set(uint rgb); no gradient brushes, no colour literals (RunBans) - T015 [US2] In
src/managed/Nota.App/PreferencesWindow.Accent.csopen aFlyoutunder the Custom button:ColourPicker, before/after chip, hexTextBox.field(Geist Mono 12;#RGB/#RRGGBB,#optional), "In themes" four chips (derivedAccentper theme viaAccentColours.Wear, 4 pxTextPrimarydot when adjusted,BgSunkenwhen refused, tooltip = theme name), note line (two lines reserved;TextMuted,Dangerwhen refused); live apply of accepted colours without saving; close → storecustom+CustomAccentand save; Esc → restore the previous accent and close — contracts/ui-contract.md § Colour picker - 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 - 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)
- T018 [US3] In
src/managed/Nota.App/MainWindow.Remote.csbuildRemoteThemes fromNotaThemeService.Worn(…), cache by the worn object (not the id), and include the accent in_remoteLookForso a change re-sends the theme - 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
- 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; runpython3 scripts/design-html.py - T021 [P]
CHANGELOG.md[Unreleased]Added entry (#311) - T022 [P] FEATURES.md via the
nota-featuresskill - T023 [P] User docs EN + RU via the
nota-docsskill (Settings → Appearance page) - T024 Run
scripts/build.sh(smoke test incl. RunAccent, RunThemes, RunBans, RunLabels, RunLocalization) and fix anything red - 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
- 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, insrc/managed/Nota.App/PreferencesWindow.Accent.csper US2/AC5 (partial)