WordPress / wordcamp.org

WordCamps are casual, locally-organized conferences covering everything related to WordPress.
https://wordcamp.org
130 stars 74 forks source link

Add a way to declare a custom color palette in Gutenberg #624

Closed ghost closed 2 years ago

ghost commented 5 years ago

Imported from https://meta.trac.wordpress.org/ticket/4392 Created by @melchoyce:

There's no way to overwrite the default color palette in Gutenberg on a WordCamp site. Can we find a way to allow this? Would make it much easier for designers and content creators to coordinate.

ghost commented 5 years ago

Comment by slackbot:

This ticket was mentioned in Slack in #meta-wordcamp by ryelle. View the logs.

ghost commented 5 years ago

Comment by slackbot:

This ticket was mentioned in Slack in #meta-wordcamp by coreymckrill. View the logs.

ghost commented 5 years ago

Comment by @coreymckrill:

In today's bug scrub, we discussed adding a WordCamp settings sidebar to the block editor UI where a custom color palette (and perhaps other things like in https://meta.trac.wordpress.org/ticket/4389) could be defined by the organizers. Similar to @ryelle's comment here.

ghost commented 5 years ago

Comment by @ryelle:

I have a prototype for this, after WCEU I can clean it up. I tried the gutenberg sidebar way first, but unfortunately the way GB sets up the colors means that we can't seamlessly update without a page reload (because GB reads the colors from a variable set on the page) - you can see this almost working on the prototype (not a stable prototype, and if you download it you'll need to npm install and npm run build to test it), but the colors reset when you update/publish a post.

The other direction I started going was the options page, so you set up your colors in a new page, then they're set as the editor colors when the editor initializes. There's an even less finished prototype here.

ghost commented 4 years ago

Comment by slackbot:

This ticket was mentioned in Slack in #meta-wordcamp by iandunn. View the logs.

ryelle commented 2 years ago

This is now possible in core, for block-based themes (currently just Twenty Twenty-Two). You can add "custom" colors to the available options:

Screen Shot 2022-03-29 at 2 47 41 PM