Astra Theme: Customize Color Palette for WordPress Customizer

If you want to customize the color palette for the WordPress Customizer using the Astra Theme, you can use the following snippet:

function sw_astra_color_palettes() {

  $color_palettes = array(
   '#ffffff',
   '#0E7490',
   '#155E75',
   '#65A30D',
   '#4D7C0F',
   '#001cbf',
   '#00a55d',
   '#8e009b',
);
  
  return $color_palettes;
}

add_filter( 'astra_color_palettes', 'sw_astra_color_palettes' );

You have to add this code to your themes functions.php. After adding, the palette should be customized.