(function( $ ) {
	'use strict';
	if(typeof acf !== 'undefined'){
		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;
		
		});
	}

})( jQuery );
