ACF Editor Palette
A Gutenberg-like editor palette color picker field for Advanced Custom Fields.
Install via Composer:
$ composer require log1x/acf-editor-palette
Download the release
.zip and install into
Pretty straight forward.
- Colors are automatically loaded from the editor palette.
- Return format includes the default palette keys as well as background and text color classes for convenience.
- Default value can optionally be set using the color's slug.
^ array:5 [▼ "name" => "Green (500)" "slug" => "green-500" "color" => "#0e9f6e" "text" => "has-text-color has-green-500-color" "background" => "has-background has-green-500-background-color" ]
If you are on Sage 10 and using my ACF Composer package:
$field ->addField('my_color_field', 'editor_palette') ->setConfig('default_value', 'green-500') ->setConfig('return_format', 'slug');
- Style ACF tooltip to be more uniform with Gutenberg
- Fix focus style
- Add gradient support
If you discover a bug in ACF Editor Palette, please open an issue.
Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.
ACF Editor Palette is provided under the MIT License.