From the course: WordPress Content Blocks: Working with Themes

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add styles for theme-specific colors

Add styles for theme-specific colors - WordPress Tutorial

From the course: WordPress Content Blocks: Working with Themes

Start my 1-month free trial

Add styles for theme-specific colors

- [Instructor] Once a custom editor color palette is declared in a theme, it immediately becomes available in the block editor, so now that I have a custom color palette I can select a paragraph, then go to Color Settings, and select the settings I want. So in this case I want to apply the lilac color as the background color, and the white color as the text color. And this color selector will now tell me whether or not I meet accessibility guidelines so the contrast between these two colors isn't quite high enough to meet guidelines, but it's pretty close so I'm okay with this. What you're seeing is when I apply these colors, they immediately take effect inside the block editor, and I get a preview of what this will look like. Of note here is the text gets indented, so there's some white space around to accommodate that background. And that's automatically generated using the block editor itself, so we don't have to do anything to make that happen. However, when I update this post…

Contents