Skip to content

feat(palettes): gamut relative/fitted palettes - #603

Open
simeonoff wants to merge 8 commits into
masterfrom
simeonoff/fitted-palettes
Open

simeonoff wants to merge 8 commits into
masterfrom
simeonoff/fitted-palettes

Conversation

@simeonoff

Copy link
Copy Markdown
Member

No description provided.

Both generators emit the same surface layers (base, sunken, raised,
overlay, container), so schemas address surface by role rather than by
shade number. $ISurfaceRoles derives from $surface-roles.

Adds `scales` and `generator` to create_palette and create_theme, plus a
fit_color_scale tool that derives a (range, curve) spec from an existing
color ladder. Scale definitions are generated from config.$scales.

BREAKING CHANGE: surface is addressed by role, not shade number. Use
('surface', 'base') in place of ('surface', 500).
@simeonoff simeonoff changed the title Simeonoff/fitted palettes feat(palettes): gamut relative palettes initial commit Sep 8, 2026
@simeonoff simeonoff changed the title feat(palettes): gamut relative palettes initial commit feat(palettes): gamut relative/fitted palettes Sep 9, 2026
Replace the single-page shade comparison with an application that grows
one section per pillar of the theming system. Sections and their views
register in a registry the shell reads; views load as they near the
viewport, and a pinned control bar drives every view in a section from
one selection.

Data comes from build-time providers that compile the library's own Sass
and cache the result against their inputs. The color section ships
three:
the shipped presets regenerated from their recorded seeds, a 1080-seed
hue
sweep through both generators, and a contrast-target lookup table that
makes range and curve editable live.

Color section views: shades (legacy against fitted, any two shades
measurable against each other), neutrals (surface roles in use,
grayscale
anchored to the page), scales (range and curve editor with the AA
ladder)
and sweep (verdicts per ramp plus the sRGB cross-section at the seed
hue).

Shared code lives in pure modules with their own tests: color math,
scale
math, ramp decoding, the preset view model and the Sass snippet builder.
The curve editor and gamut plot are standalone elements. Styles run on a
type and spacing scale with logical properties, hold up at phone widths,
and follow a data-theme override as well as the system scheme.

Adds happy-dom for DOM tests and a typecheck script wired into lint.
Includes the openspec change and specs for sections, data providers and
the color demos.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant