aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio
Commit message (Collapse)AuthorAgeFilesLines
* Add theme studio face color step arrowsCraig Jennings3 days7-30/+158
|
* Preview selected theme studio chip while pickingCraig Jennings3 days4-12/+40
|
* Change theme studio spans to endpoint divisionsCraig Jennings3 days6-35/+72
|
* Remove theme studio save buttonCraig Jennings3 days4-29/+10
|
* Fix theme studio span endpoint tilesCraig Jennings3 days7-31/+57
|
* Sort theme studio dropdown colors by lightnessCraig Jennings3 days4-8/+38
|
* Fix theme studio ground endpoint editCraig Jennings3 days3-6/+28
|
* Fix theme studio fg endpoint selectionCraig Jennings3 days3-6/+30
|
* Refine theme studio tile name editingCraig Jennings3 days5-8/+43
|
* Make theme studio column delete saferCraig Jennings3 days5-10/+31
|
* Add theme studio Rust and Zig samplesCraig Jennings3 days5-4/+95
|
* Add theme studio column deleteCraig Jennings3 days7-12/+103
|
* Refactor theme studio palette testsCraig Jennings3 days9-679/+835
|
* Add theme studio palette clear and lock togglesCraig Jennings3 days3-10/+112
|
* Fix theme studio ground column orderCraig Jennings3 days2-12/+34
|
* Fix theme studio bg-prefixed span inferenceCraig Jennings3 days4-12/+26
|
* Fix theme studio style button stateCraig Jennings3 days2-2/+26
|
* Fix theme studio bg-like imported colorsCraig Jennings3 days5-44/+111
|
* Add theme studio column selection and reorder controlsCraig Jennings3 days3-10/+120
|
* Set theme studio default picker colorCraig Jennings3 days3-12/+14
|
* Group numeric color names by stemCraig Jennings3 days5-4/+16
|
* Treat legacy color names as base columnsCraig Jennings3 days5-4/+28
|
* Split theme studio generator data and templateCraig Jennings3 days4-384/+394
|
* Add theme studio default face drift summaryCraig Jennings3 days3-1/+102
|
* Pin theme studio preview links and column exportsCraig Jennings3 days4-10/+58
|
* Add theme studio generated file checkCraig Jennings3 days2-1/+12
|
* Rename theme studio column browser gateCraig Jennings3 days4-10/+10
|
* Pin theme studio generated defaultsCraig Jennings3 days1-0/+32
|
* Refactor theme studio face assemblyCraig Jennings3 days8-61/+205
|
* Rename theme studio color model to columnsCraig Jennings3 days5-187/+187
|
* Guard theme studio package face coverageCraig Jennings3 days1-0/+35
|
* Extract theme studio default face adapterCraig Jennings3 days3-81/+203
|
* Update theme studio color columns and defaultsCraig Jennings3 days10-460/+30503
|
* chore(theme-studio): record verification passes, file preview-fix tasksCraig Jennings5 days1-415/+584
| | | | Five manual checks verified, closing the contrast-cell and preview-bg bugs. An audit of the bespoke previews found three face mislinks (org headline-todo, erc input/default swap, flycheck delimiter swap) — filed with picker-visibility and Rust+Zig sample tasks. WIP theme picks up the revised steel selections.
* chore(theme-studio): snapshot WIP palette filesCraig Jennings5 days6-431/+31817
|
* fix(theme-studio): derive box bevel colors from the face backgroundCraig Jennings6 days5-16/+150
| | | | The released/pressed bevel was a flat translucent white/black overlay, which reads weaker than the box Emacs draws. reliefColors in colormath.js now ports Emacs 30's x_alloc_lighter_color: highlight = bg x1.2, shadow = bg x0.6, an additive boost for dark backgrounds, and the same-color fallback for pure black and white. boxCss takes the face's effective bg and derives both edges from it. Pressed swaps the pair, and the translucent pair remains only when no bg is known. Width stays 1px because dupre's :line-width -1 draws 1px lines in Emacs too. The gap was color strength, not width. Five node tests pin hand-computed fixtures from the C source, and a new #beveltest gate pins the wiring.
* fix(theme-studio): re-rate fallback contrast cells on default-fg changeCraig Jennings6 days2-2/+30
| | | | A default-fg (p) change only re-rated the covered overlay faces. UI-face and package ratios that fall back to the default fg kept their old number until something else rebuilt the tables. The p branch now runs the same repaint as a ground-bg change. The new #contrasttest assertion drives the real syntax dropdown (unlocking a locked p row for the test) so the handler wiring is pinned, not just the repaint helper.
* fix(theme-studio): scope applyGround and repaint faces on ground changeCraig Jennings6 days2-6/+56
| | | | The contrast cells already rated a two-color face's own fg-on-bg. They read wrong because applyGround blanketed every .ex cell (the per-face preview cells included) with the ground bg, and a ground-bg change never repainted the UI or package tables. The preview showed fg on the ground bg next to a correct fg-on-face-bg ratio, and ground-dependent ratios went stale. applyGround now blankets only the code panes and syntax example cells and repaints UI faces through paintUI. The ground-bg handler also rebuilds the package table and preview. New #contrasttest assertions pin the two-color pair in both tables, preview-bg survival, and ground-change re-rating.
* fix(theme-studio): guard Chrome profile dir and bound headless rendersCraig Jennings7 days1-2/+5
| | | | A headless render with an empty --user-data-dir falls back to the real Chrome profile and takes its SingletonLock. A hung render held that lock for 18 hours on 2026-06-09, blocking every interactive Chrome launch. The runner now refuses to run the browser gates when mktemp fails, and each render runs under timeout --kill-after so a wedged Chrome dies in seconds.
* feat(theme-studio): group families by lightness-conditioned complete linkageCraig Jennings7 days4-46/+146
| | | | | | | | | | Replace the hue-anchor bucketing and the tent neutral threshold with the model two independent reviews of color-sorting.org converged on (Codex and Fable, with Fable's harness measuring pairwise F1 0.63 → 0.96 on the real palette). Chromatic colors now cluster by complete-linkage agglomeration on a lightness-conditioned hue distance: hue must match tightly at equal lightness and may drift across a lightness gap, because a tonal ramp drifts in hue with lightness by design. A low-chroma noise term widens the tolerance where hue is ill-defined, and a chroma clause keeps a vivid accent out of a soft same-hue family. Complete linkage makes single-linkage chaining structurally impossible. The neutral threshold is floored at both ends instead of tapering to zero, which fixes two real defects: pale warm grays (gray+1, gray+2) that leaked into a color column, and pure white (C=0 at L=1) that evaded a zero threshold. On the sterling/distinguished palette this separates the gold and olive ramps (the green/yellow complaint), keeps the red and blue ramps whole including drifted tints, isolates intense-red, and consolidates every gray and steel into the neutral column. The one residual — pale yellow+2 lands on the olive ramp — is geometrically irreducible from the hex (it sits on the olive trajectory by nearest-neighbor, ramp-line fit, and eye); only its name says gold. That needs the deferred per-hex family-hint override. New node tests cover the gold/olive split, blue pale-tint cohesion, gray/white neutrality, intense-red isolation, and palette-order independence. The count gate now asserts the count action adds all ramp colors to the palette rather than that they all display in one family, since a chroma-eased extreme can sit at the neutral boundary.
* feat(theme-studio): color-families export round-trip and README close-outCraig Jennings7 days4-28/+72
| | | | | | | | Export stays a flat palette and import needs no reconstruction, because families are derived from the hex every render rather than stored. A #roundtriptest gate confirms export to import to export is byte-identical, and that the exported palette is still a flat [hex, name] list. Package seeding is unaffected since it reads the same flat palette. The spec's planned ramp-step warning exemption is dropped after analysis: a generated ramp's steps are a stepL apart, well above the too-similar ΔE threshold, so they never trigger the warning, and exempting same-family pairs would hide genuine near-duplicates that should be flagged (the case #deltatest checks). So the warning stays on the full palette. README documents color families: the hue grouping and its limitation, the ground strip, the per-column count control and regenerate, removed-step references reading "(gone)", and the removal of the standalone ramp panel. Phase 6, the last phase; the color-families v1 build is code-complete.
* feat(theme-studio): base-edit recolors a family; retire the ramp panelCraig Jennings7 days5-231/+101
| | | | | | | | Editing a family's base now recolors the whole family: update-selected on a base with a ramp regenerates the family from the new base at the same count, so references follow the new hexes (shared regenFamilyInPlace with the count control). Editing a ground swatch already writes the bg/fg assignment through the existing repoint, and the gate confirms it. The standalone ramp panel is gone — its button, panel, JS, CSS, and the #ramptest gate are removed. Fanning a color into a ramp now happens from its strip: add a color, then raise its column's count. The ramp() math stays in app-core; only the duplicate UI is retired. Phase 5 of the color-families spec. A #baseedittest gate covers the base-edit recolor (family follows, references repoint, count preserved) and the bg-swatch edit writing the assignment.
* feat(theme-studio): add the live per-family count controlCraig Jennings7 days5-9/+131
| | | | | | | | Each chromatic family column gets a count input (0-4) showing its current per-side reach. Setting N regenerates the family as a symmetric base ±N ramp from its most-saturated color, replacing the family's current members. A reference to a surviving step (matched by signed lightness rank) follows the new hex through repointHex; a reference to a step removed by lowering N is left on its old hex, which is no longer in the palette and renders as "(gone)" — never silently reassigned. The neutral and ground strips get no control. I also fixed the neutral threshold curve: it was flat-high through the darks, which pulled a chroma-eased dark ramp step (a dark desaturated blue) into the neutral column and broke the family. The curve now tapers toward both lightness extremes, peaking near mid, so dark and light tints both keep their hue while mid grays stay neutral. This is the symmetric form of the Munsell scaling and a strict improvement. Phase 4 of the color-families spec. A #counttest gate covers count-up adding symmetric steps, count-down dropping the extremes, the surviving-step repoint, and the removed-step "(gone)".
* feat(theme-studio): group families by hue anchor with a lightness-scaled ↵Craig Jennings7 days3-46/+66
| | | | | | | | | | neutral cut Replace gap-based hue clustering and the flat neutral threshold. Chromatic colors now bucket by nearest perceptual hue anchor (red, orange, yellow, green, teal, blue, purple, pink), so adjacent categories stay separate by construction and there's no single-linkage chaining merging them through intermediate tones. The neutral cut is lightness-scaled rather than flat: a color reads as neutral below a chroma that's highest in the mid-tones and tapers toward the light end, so a faint mid gray goes neutral while an equally-faint pale tint keeps its hue. This fixes the two concrete problems: the grays and steels consolidate into one neutral column, and pale tints (light blues) stay with their hue instead of falling into the grays. What it doesn't fix is hue-adjacent warm colors: this palette's olive-greens sit on top of the golds in OKLCH hue, so they still group together, and a ramp that drifts in hue can split across an anchor boundary. That's a real property of the colors, not a bug, and it's filed for research (a writeup of the problem and the four approaches tried lives outside the repo; the task points to it). 20 family node tests including the yellow/green split and the no-chaining case; suite green.
* style(theme-studio): lay out family strips as vertical columnsCraig Jennings7 days2-6/+4
| | | | Each family now reads top to bottom (dark to light) as a column, with families arranged left to right, rather than horizontal rows stacked down the panel.
* feat(theme-studio): render the palette as hue family stripsCraig Jennings7 days4-51/+119
| | | | | | The palette panel is now a stack of strips: the pinned ground strip (bg, fg) first, then hue-sorted family strips, each dark to light. Grouping comes from familiesFromPalette off the hex every render, so renaming a color never moves it. The flat PALETTE stays the editable truth and chips keep their per-chip remove / rename / select; the move-arrow and drag reordering are gone since the sort is deterministic now (moveColor and the drag state with them). Phase 3 of the color-families spec. A #familytest gate checks the ground strip pins first, families render, chips keep their controls, and a color renamed to anything stays in the same strip. Existing palette flows (delta, heal, ramp gates) stay green.
* feat(theme-studio): add color-family sortCraig Jennings7 days3-3/+73
| | | | | | sortFamilies orders the strips for display: neutrals first by lightness, then chromatic families by base hue, ties broken by base lightness then base hex. Each family's members come back sorted dark to light. Hue is compared rounded so a sub-degree hue hair from gamut quantization doesn't outrank lightness. Sorting is display-only; the stored palette order is untouched. Phase 2 of the color-families spec, pure logic. Four node tests cover the hue order, the neutral pin, within-family lightness order, and the (hue, then lightness) ordering invariant. Suite 91 to 95 green.
* feat(theme-studio): add the color-families model coreCraig Jennings7 days3-1/+288
| | | | | | Four pure functions in app-core.js, all derived from the hex so renaming never moves a color. familiesFromPalette groups a flat palette into the ground strip (the bg/fg assignment hexes, pinned, de-duped) plus hue families: near-neutrals split off by a chroma threshold, the rest cluster by hue proximity with a 25-degree gap and a 360 wrap, each family's base its most-saturated member. regenFamily returns a family's symmetric ramp around the base (n=0 is the base alone, handled without ramp()'s 1-4 clamp). rankByLightness gives each current member a signed offset from the base, and stepRepointPlan maps old positions to new ones across a regenerate, listing the positions that drop out so the caller can leave their references a visible "(gone)". Phase 1 of the color-families spec, pure logic, no UI. 13 node tests cover the gap split/merge, neutrals, absent and de-duped ground hexes, n=0, lightness ranking, and the survivor/removed repoint split. Suite 78 to 91 green.
* feat(theme-studio): order add-all around the base as -n .. base .. +nCraig Jennings7 days2-16/+24
| | | | | | Add-all inserted every step after the source, giving base, -2, -1, +1, +2. Now the darker steps go before the base and the lighter ones after, so the palette reads -2 -1 base +1 +2, matching the preview row and how a ramp reads left to right. Inserting a darker step before the base shifted the base's index, so I bump the selected index to keep the selection (and the next preview's base) on the base color rather than drifting onto an inserted step. The #ramptest gate now checks the steps surround the base in order.
* feat(theme-studio): re-bind "(gone)" assignments when a name returnsCraig Jennings7 days3-15/+85
| | | | | | Deleting a palette color leaves any assignment pointing at it showing "(gone)". Recreating a color with the same deleted name now re-points those stranded assignments to the new color, even when its hex differs, instead of leaving them stuck on the old hex forever. Delete records the removed name and hex; the next add of that name re-points every reference (syntax map, UI faces, package faces) to the new hex and consumes the record. The registry clears on import so a stale name from a previous theme can't re-bind across a load. I pulled the re-point loop that update-selected already used into a shared helper. A #healtest gate covers delete-then-recreate-with-a-new-hex.