Color

The Color field redefines simplicity.  Point and click to chose any color in the spectrum.

color-no-alpha

The Color RGBA offers the addition of an alpha channel, initial color selection, saved colors and color palette to the color picker, allowing for not only opacity within the selected color, but an array of useful options for your end users.

color-alpha

In case you want to allows selections of separate colors, for use in any situation that requires gradient colors (i.e. Header, footer, sidebar, etc…), you can use the Group field

group

Attributes

AttributesTypeRequiredDescription
idstringRequiredRequired. Unique ID identifying the field. It will be used as meta_key. Must be different from all other field IDs.
titlestringRequiredDisplays title of the option.
subtitlestringOptionalSubtitle display of the option, situated beneath the title.
descstringOptionalDescription of the option, appearing beneath the field control.
typestringRequiredValue identifying the field type. For Color field here we set value color
defaultstringOptionalHex string representing the default color.
colintOptionalThe proportion of columns that display field on 12 columns per row.
maxlengthintOptionalSpecify the maximum number of characters allowed in the validation type.
patternstringOptionalObjects that can match arbitrary character sequences.
validatestringRequiredString value of color to validate the chosen color.
alphaboolOptionalAllow for opacity within the selected color.
Default value is false

 Example Declaration