No, writing as of WordPress 6.0 there is no API for defining additional palette sections. The colour palette component hardcodes 3 PaletteEdit
sub-components, theme, default, and custom, where custom is for user defined colours. No dynamic fields or slotfills are provided for extending or adjusting these. Here is the current code:
return (
<VStack
className="edit-site-global-styles-color-palette-panel"
spacing={ 10 }
>
{ !! themeColors && !! themeColors.length && (
<PaletteEdit
canReset={ themeColors !== baseThemeColors }
canOnlyChangeValues
colors={ themeColors }
onChange={ setThemeColors }
paletteLabel={ __( 'Theme' ) }
/>
) }
{ !! defaultColors &&
!! defaultColors.length &&
!! defaultPaletteEnabled && (
<PaletteEdit
canReset={ defaultColors !== baseDefaultColors }
canOnlyChangeValues
colors={ defaultColors }
onChange={ setDefaultColors }
paletteLabel={ __( 'Default' ) }
/>
) }
<PaletteEdit
colors={ customColors }
onChange={ setCustomColors }
paletteLabel={ __( 'Custom' ) }
emptyMessage={ __(
'Custom colors are empty! Add some colors to create your own color palette.'
) }
slugPrefix="custom-"
/>
</VStack>
);
Changing this will require a new API to be added to the block editor. I’d suggest creating an issue on the gutenberg github repo for this if one doesn’t already exist.