WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.49k stars 4.18k forks source link

Add Support for Named Sections of Color Palettes #34741

Open mrwweb opened 3 years ago

mrwweb commented 3 years ago

What problem does this address?

I'm currently working on a site with a very large official color palette that is broken down into Primary, Secondary, and Tertiary colors. It would be great if the UI provided a way to make these sections explicit to editors to help guide their color selections. I could imagine lots of uses for this when sites run sub-branded campaigns or a plugin adds some additional colors in a new section.

What is your proposed solution?

WordPress background color palette control with 17 colors divided into three sections: Primary, Secondary, and Tertiary

I would imagine introducing an optional additional level of nesting for the palette syntax in both add_theme_support and theme.json

{
    "version": 1,
    "settings": {
        "color": {
            "palette": {
                "dark": [
                    {
                        "name": "Black",
                        "slug": "black",
                        "color": "#000000"
                    }
                ],
                "light": [
                    {
                        "name": "White",
                        "slug": "white",
                        "color": "#ffffff"
                    }
                ]
            }
        }
    }
}
colorful-tones commented 3 years ago

I'm wrapping up work on a large site that has almost 24 colors, because it has multiple products and each has its own palette.

This would be super useful. Right now the editors are being overwhelmed with a palette of colors.

These conditions may not fall within the threshold of common, but who knows 🤷‍♂️

markhowellsmead commented 2 years ago

Yes please :)

phil-sola commented 1 year ago

Yes please - this would be a great addition!

fclaussen commented 1 year ago

+1