Brand Colors in the Beaver Builder Color Picker
Adds your brand colors as presets in every Beaver Builder color picker, so editors pick exact colors instead of guessing hex codes.
Opens WPIDE on
Code
// Brand colors, hex without "#".
$wpide_bb_colors = array( '1e3a8a', '2563eb', 'f59e0b', '111827', 'f9fafb' );
add_filter( 'fl_builder_color_presets', function ( $colors ) use ( $wpide_bb_colors ) {
return array_values( array_unique( array_merge( $wpide_bb_colors, (array) $colors ) ) );
} );
Notes
Colors are hex values without the # sign.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.