Skip to content

Map color presets like spacing presets for improved theme interoperability #53996

@richtabor

Description

@richtabor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] ColorsColor management[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions