aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/dupre-revised.json
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 18:39:58 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 18:39:58 -0500
commit516974c6574ea6f2e0977316cca2d5d91e479f97 (patch)
tree2381aadd7fc4c2528e7c519034fb8a3d195ce991 /scripts/theme-studio/dupre-revised.json
parent636d11999ce1615da8cb85dbb47ce1913ec13cc2 (diff)
downloaddotemacs-516974c6574ea6f2e0977316cca2d5d91e479f97.tar.gz
dotemacs-516974c6574ea6f2e0977316cca2d5d91e479f97.zip
feat(theme-studio): add the ramp generator core
ramp(baseHex, {n, stepL, chromaEase}) in app-core.js turns one base color into a tonal ramp: 2n steps at offsets -n..-1 and +1..+n, ordered darkest to lightest, base excluded. It holds the OKLCH hue, steps lightness by stepL, eases chroma toward the extremes so only the farthest step loses most of its color, and gamut-clamps each step with its own clamped flag. Bad input returns a structured result rather than throwing: an unparseable base gives {steps: [], error: 'bad-hex'}, and out-of-range n/stepL/chromaEase clamp into range with the clamped knob named in adjusted. Defaults are n=2, stepL=0.08, chromaEase=0.5. This is Phase 1 of the palette-ramps spec: pure logic, no UI. Tests cover mid/near-white/near-black bases, hue-hold, chroma easing, knob clamping, and malformed hex. The integrity stripper for app-core.js now drops import lines too, since the core imports normHex and the colormath helpers for the Node tests (stripped on inline, where both are already in scope).
Diffstat (limited to 'scripts/theme-studio/dupre-revised.json')
0 files changed, 0 insertions, 0 deletions