Awesome ACF

ACF Restrict Color Picker Options

Restrict Advanced Custom Fields color picker field to a specific subset of custom colors.

By Adam Walter · Not updated since Jan 2022 · Free on wordpress.org

Description

Restrict Advanced Custom Fields color picker field to a specific subset of custom colors. Removes the color wheel and slider from the field UI so the user can’t pick any other colors

Features

Include the color palette from the current theme by enabling the option on the plugin settings page.

Get the current color options palette in your template code with the acfrcpo_get_color_options function.

Comma-separated list of HEX color values used to define the color options. Optionally include the current theme's color palette as well.
Comma-separated list of HEX color values used to define the color options. Optionally include the current theme's color palette as well. Screenshot from wordpress.org.
Simple color swatches allow the user to easily choose from your color set.
Simple color swatches allow the user to easily choose from your color set. Screenshot from wordpress.org.

Installs over time

01k2k3k202220242026
Active installs from wordpress.org, checked each month. wordpress.org rounds the number down.

Install

With WP-CLI, from your site’s root folder:

WP-CLI
wp plugin install acf-restrict-color-picker --activate
  1. Upload acf-restrict-color-picker to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

FAQ

I have a question

Leave your question in the support tab and we’ll respond!