Field type Joomla XML – Color works in Joomla versions: 2.5 and higher.
Standard field typeJoomla XML – Color adds a text box with a color palette where you can enter a color code or select the desired color from the palette. The data in the field can be filled in several formats.
Option 1: RGB format.
An example of displaying the Color field type (RGB format) in the Joomla 3 admin panel:
An example of displaying the Color field type (RGB format) in the Joomla 4 admin panel:
The Color field code (RGB format) from the image in the XML document looks like this:
Option 2: RGBA format.
An example of displaying the Color field type (RGBA format) in the Joomla 3 admin panel:
An example of displaying the Color field type (RGBA format) in the Joomla 4 admin panel:
The Color field code (RGBA format) from the image in the XML document looks like this:
Option 3: HEX format.
An example of displaying the Color field type (HEX format) in the Joomla 3 admin panel:
An example of displaying the Color field type (HEX format) in the Joomla 4 admin panel:
The Color field code (HEX format) from the image in the XML document looks like this:
The standard Joomla Color field type supports attributes:
- name – system name of the field (field identifier).
- type – field type, in this case «color».
- default – sets the default value of the field.
- format – indicates the format of the color in the field, how it will be saved in the settings. Can be rgb, rgba and hex.
- label – display name of the field.
- description – the displayed description of the field. In Joomla 3 it is displayed as a tooltip when hovering over a field name.
At the moment that’s all we can tell about the standard Joomla XML field type – Color. If we receive new information, it will be added to this article.
Do you need help with generating an XML file? Email us at admin@iws.by and we’ll help you.