Skip to content

Core palette can no longer be overridden from PHP #36489

@steveangstrom

Description

@steveangstrom

Description

Setting brand colours no longer works in gutenberg it's working fine in WP 5.8.2 it is not working in Gutenberg Version 11.9.0

Core colours can no longer be removed.

Removing "core" colours is VITAL for branded corporate sites.

PHP support is VITAL for established sites and those being developed away from your bleeding edge

Step-by-step reproduction instructions

METHOD

in PHP enter this in a theme functions.php

function sc_custom_gutenberg_custom_color_palette() { add_theme_support( 'editor-color-palette', array( array( 'name' => __( 'Light Text', 'sc' ), 'slug' => 'light-text', 'color' => '#FFFFFF', ), array( 'name' => __( 'Darker Text', 'sc' ), 'slug' => 'darker-text', 'color' => '#535353', ), array( 'name' => __( 'Amaranth', 'sc' ), 'slug' => 'main-amaranth', 'color' => '#E23448', ), ) ); } add_action( 'after_setup_theme', 'sc_custom_gutenberg_custom_color_palette', 20 );

the editor will continue to show the awful "core" colours + the new array

Screenshots, screen recording, code snippet

WP 5.8.2 core - colours can be set correctly

core-cols-override-wp-582

Gutenberg Version 11.9.0 - awful colours persist
gut-col-disaster

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions