Joomla color Form Field Type
The color field provides a color picker. Enter the color as #ff00ff or pick it from the palettte.
XML Definition
<field name="backgroundcolor"
type="color"
default="#eee"
format="rgba"
label="Background Color" />
Additional Parameters
format: It allows you to select the type of colour format - hex, rgb, rgba. The default value is hex.
control: It defines how the color picker is displayed - simple, slider, advanced. The default value is advanced.
colors: For simple control, you can add colors here as comma separated list or leave empty to use default colors. For example, colors="none,#ffffff,#000000"
display: For slider control, you can add which sliders to display - hue, saturation, light, alpha.
preview: Set this o true or false for slider control. The default value is false.
Examples
1. Atum Template (Slider Control)
<field
name="hue"
type="color"
label="TPL_ATUM_COLORS_HUE"
format="hue"
control="slider"
preview="true"
saveFormat="hsl"
default="hsl(214,63%,20%)" />
2. Atum Template (Default Control)
<field
name="bg-light"
type="color"
label="TPL_ATUM_COLORS_SETTINGS_BG_LIGHT_LABEL"
default="#f0f4fb"
filter="color" />