Repository navigation
fix(ui): preserve sequential gradient sample order - #296
Open
minwookshin wants to merge 1 commit into
Open
minwookshin wants to merge 1 commit into
minwookshin wants to merge 1 commit into
Conversation
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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→#8a7401OKLCH 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 buildpass with the existing unused-import and bundle-size warnings.To-do list