
To save the the time and trouble of entering the same values over and over again for the colors in the GeneratePress color picker, add the code below to a Code Snippets snippet. Set the snippet to ‘Only run in administration area’.
The eight color values in the code are hexadecimal (HEX) values which you can determine from your graphics software or from an online source, such as W3Schools. The order in the code, top to bottom, is the order in the color picker left to right.
Thanks to Tom Usborne from GeneratePress for this.
add_filter( 'generate_default_color_palettes', 'tu_custom_color_palettes' ); function tu_custom_color_palettes( $palettes ) { $palettes = array( '#000000', '#FFFFFF', '#DC143C', '#008000', '#00008B', '#006400', '#808080', '#FFA500', ); return $palettes; }
oh thanks for this.
Joel – you’re welcome 🙂
Cheers!
Lyle