Thought of a potential avenue for improving how colors map across themes/variations.
The way I proposed colors for Twenty Twenty Four (WordPress/twentytwentyfour#106) is to provide variants of base, contrast and accent. These represented as base-2, contrast-2, accent, accent-2, accent-3, etc.
What if we treated these values like we do the spacing scale?
If there is no accent-3 registered, it will resolve to accent-2 instead — and if there is no accent-2, fallback to accent-1.
The same would follow for base and contrast colors.
This way themes (and style variations) would be much more interoperable — instead of today, where if you use a color preset that does not map to a newly applied theme.json set, the color applied is missing completely. With this proposal, that would be the last-case fallback — after first checking for related alternatives.
Thought of a potential avenue for improving how colors map across themes/variations.
The way I proposed colors for Twenty Twenty Four (WordPress/twentytwentyfour#106) is to provide variants of
base,contrastandaccent. These represented asbase-2,contrast-2,accent,accent-2,accent-3, etc.What if we treated these values like we do the spacing scale?
If there is no
accent-3registered, it will resolve toaccent-2instead — and if there is noaccent-2, fallback toaccent-1.The same would follow for base and contrast colors.
This way themes (and style variations) would be much more interoperable — instead of today, where if you use a color preset that does not map to a newly applied theme.json set, the color applied is missing completely. With this proposal, that would be the last-case fallback — after first checking for related alternatives.