A Color field can be inserted in:

  • an Admin Page, as an option or a user_meta
  • a User Profile, as a user_meta
  • a Metabox, as a post_meta
Sukellos Admin Builder

The code below is used to generate this section in an Admin Page, for an option:

Copy to Clipboard

A Color inherit from a Field, and an Item, then all settings described in Field Settings and Item Settings are also used.

Specific settings for Color:

Color Settings Description
css
string / Default: ”
CSS rules to be used with this field. See tutorial on CSS.
alpha
boolean / Default: false
If true, an additional control will become available in the color picker for adjusting the alpha/opacity value of the color. You can get rgba colors with the option.