Support

Account

Home Forums Feature Requests Combine color picker swatches with theme.json Reply To: Combine color picker swatches with theme.json

  • Hey @proxxim, thanks for the suggestion.

    You could do this now using getEditorSettings which includes the color palette, so something like the following js filter:

    acf.addFilter('color_picker_args', function (args) {
    
        const settings = wp.data.select( "core/editor" ).getEditorSettings();
        let colors = settings.colors.map(x => x.color);
    
        args.palettes = colors;
        return args;
    
    });