Skip to main content

Adding additional colors to the Salient options panel can be handled through the child theme functions.php file. Note that each additional color will generate more CSS and increase the page size – it’s recommended to only register new colors if truly needed.

  • Step 1: Open your child theme functions.php (salient-child/functions.php)
  • Step 2: Copy the below snippet into the bottom:
add_filter('nectar_additional_theme_colors','salient_child_custom_theme_colors');

function salient_child_custom_theme_colors() {
  $custom_colors = array(
    "My Awesome Color" => 'my-awesome-color',
    "The Best Color" => 'the-best-color'
  );

  return $custom_colors;
}

  • Step 3: Modify $custom_colors array to add as many colors as needed. The key of each item will be the label that appears when editing elements in the page builder, and the value for each key will be the slug of the color.