Skip to content

fix(ui): preserve sequential gradient sample order - #296

Open
minwookshin wants to merge 1 commit into
adobe:mainfrom
minwookshin:fix/sequential-gradient-sampling
Open

minwookshin wants to merge 1 commit into
adobe:mainfrom
minwookshin:fix/sequential-gradient-sampling

Conversation

@minwookshin

Copy link
Copy Markdown

Description

Fixes #259. Preserve the generated sequential scale's sample order instead of sorting individual output colors by lightness. On paths with non-monotonic measured lightness, sorting interleaved distant hues and produced the reported stripes. Reverse the ordered array for the opposite direction, and refresh key-color luminosities before regenerating a changed scale.

Motivation

The reported #054cbe → #8a7401 OKLCH gradient now follows a continuous path. On its 100-sample RGB output, the largest adjacent step falls from 104.89 to 17.29; HSL falls from 228.02 to 7. This preserves interpolation order, not a guarantee that every color-space path has monotonic lightness.

Checked the production UI and seven color spaces (OKLCH, CAM02p, LCH, HSL, HSV, LAB and RGB) in Chromium, Firefox and WebKit: endpoints, reversed output, updated-versus-fresh construction, sample counts, shift/distribution changes and diverging-scale initialization. Scoped ESLint and vite build pass with the existing unused-import and bundle-size warnings.

To-do list

@changeset-bot

changeset-bot Bot commented Oct 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8b9018c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

This branch has not been deployed

No deployments
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.

Some gradient interpolations are quite broken

1 participant