Title: Cannot replace default color palette
Last modified: April 20, 2023

---

# Cannot replace default color palette

 *  [kristianherman](https://wordpress.org/support/users/kristianherman/)
 * (@kristianherman)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/cannot-replace-default-color-palette/)
 * I would like to replace default WordPress color palette, displayed below Astra
   theme palette, but I failed even though I used this code simple code, which looks
   to be fine:
 *     ```wp-block-code
       function my_theme_add_new_features() {
           // The new colors we are going to add
           $newColorPalette = [
               [
                   'name' => esc_attr__('Magenta', 'default'),
                   'slug' => 'magenta',
                   'color' => '#ff00ff',
               ],
               [
                   'name' => esc_attr__('Cyan', 'default'),
                   'slug' => 'cyan',
                   'color' => '#00ffff',
               ],
           ];
           // Apply the color palette containing the original colors and 2 new colors:
           add_theme_support( 'editor-color-palette', $newColorPalette);
       }
       add_action( 'after_setup_theme', 'my_theme_add_new_features', 30 );
       ```
   
 * ![](https://i0.wp.com/kristianherman.cz/paleta.png?ssl=1)
 * I am attaching a picture of which palette I mean. The first palette from Astra
   is fine, I would like to change the colors of the second palette, as the default
   WordPress palette.
 * Thank you for your help!

Viewing 1 replies (of 1 total)

 *  [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * (@bsfherman)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/cannot-replace-default-color-palette/#post-16705091)
 * Hi [@kristianherman](https://wordpress.org/support/users/kristianherman/),
 * Have you checked this [doc](https://wpastra.com/docs/override-astras-theme-json/)?
 * Kind regards,
    Herman 😊

Viewing 1 replies (of 1 total)

The topic ‘Cannot replace default color palette’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/astra/4.13.4/screenshot.jpg)
 * Astra
 * [Support Threads](https://wordpress.org/support/theme/astra/)
 * [Active Topics](https://wordpress.org/support/theme/astra/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/astra/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/astra/reviews/)

## Tags

 * [gutenberg](https://wordpress.org/support/topic-tag/gutenberg/)

 * 1 reply
 * 2 participants
 * Last reply from: [Herman Asrori (BSF)](https://wordpress.org/support/users/bsfherman/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/cannot-replace-default-color-palette/#post-16705091)
 * Status: not resolved