Home › Forums › Support › Can't change color palette with filter This topic has 8 replies, 4 voices, and was last updated 3 years, 8 months ago by Leo. Viewing 9 posts - 1 through 9 (of 9 total) Author Posts April 30, 2019 at 7:25 am #884412 Silvio Hi, I added this code in the function.php of my child theme (blank, just installed) add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' ); function tu_custom_color_palettes( $palettes ) { $palettes = array( '#000000', '#FFFFFF', '#20ec73', '#575757', '#222222', '#1e72bd', '#8E44AD', '#00CC77', ); return $palettes; } But I can’t see custom color codes in my palette. April 30, 2019 at 9:11 am #884569 TomLead Developer Lead Developer That looks good – those colors aren’t showing up in the Customizer when you open a color picker? Can you try this?: add_action( 'wp', function() { add_filter( 'generate_default_color_palettes', function() { return array( '#000000', '#FFFFFF', '#20ec73', '#575757', '#222222', '#1e72bd', '#8E44AD', '#00CC77', ); } ); } ); April 30, 2019 at 9:23 am #884585 Silvio yes, colors in the customizer didn’t change. and unfortunately, neither trying with the code you posted. I am running it on MAMP, and I even have tried to stop and restart the servers. And change the browser from Chrome to Safari. April 30, 2019 at 1:39 pm #884807 Silvio additionally, I created a clean installation in MAMP with the last version of everything, and no one of this codes works ๐ April 30, 2019 at 1:41 pm #884810 TomLead Developer Lead Developer I just tried the first function you shared and here’s what I see: http://prntscr.com/nivzu9 Looks like it’s working? How are you adding the function? April 30, 2019 at 5:08 pm #884969 Silvio are you using MAMP? I just copy and pasted the function in the function.php of the child theme May 1, 2019 at 8:17 am #885696 TomLead Developer Lead Developer I’m using XAMPP, but it shouldn’t matter. Any other servers/sites you can test on? September 12, 2019 at 4:00 am #1007498 Klaus First solution by Silvio worked fine for me. Thx Klaus September 12, 2019 at 8:15 am #1007854 LeoStaff Customer Support Glad you’ve found the post ๐ Author Posts Viewing 9 posts - 1 through 9 (of 9 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In