Repository navigation
Bind palette colours exactly: painted shades get their own tokens, slots by painted weight (#3043) - #3048
Merged
Conversation
chubes4
force-pushed
the
fix/issue-3043-blocks-engine
branch
from
October 19, 2026 11:42
d00fd83 to
3b42986
Compare
chubes4
force-pushed
the
fix/issue-3043-blocks-engine
branch
from
October 19, 2026 12:14
37fd2e9 to
72136e8
Compare
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.
Summary
DesignSystem::palette() still picks base, contrast, primary and secondary as before. Every other painted colour now competes for the remaining slots on its own painted weight, heaviest first, whatever group it belongs to. Grouping only names roles and breaks ties (a group's own colour before a near shade, then the heavier group). Colours past the 12-colour cap are the lightest painted ones and are reported in literal_colors. A heavily painted near shade of base (e.g. white cards) now gets an exact token instead of losing its slot to a colour painted on one tiny element. The real reporting-site import was not re-run here, so its restyle_coverage and no_matching_token figures are unconfirmed.
What changed
How to test
cd php-transformer && composer install --no-interaction --prefer-dist --no-progress && composer test:canonical; expect passes as recorded by Cook's deterministic gate.Compatibility
Palette contents and accent-N order change for sites with more than 12 painted colours: heavy near shades now take slots ahead of barely used distinct colours, and accent-N follows each colour's own painted weight. Bindings are still exact-value only, so a binding never changes a painted colour. No API or schema changes.
Evidence
cd php-transformer && composer install --no-interaction --prefer-dist --no-progress && composer test:canonical: status=succeeded; candidate commitac3421d70a88b207dbd8f0e2a337379f484d3f14, tree6e29831fc602f437571a9cb2b1b6a6ede475c508, fingerprint648d90a7d638f1797c9232a672f2d1a55d5a30ac06bafd51c1485b54c00c3708; durable gategate-1AI assistance