Type
magento2-module
Color Picker Element
magento2-module
OSL-3.0
None
None
None
None
None
Color Picker Element is a Magento 2 module with the following features:
orange35ColorPickerElement
- uiClass for an input based on jQuery colorpicker. Shows chosen color as input background and shows color hex code as input text in contrast with background.Orange35\ColorPickerElement\Data\Form\Element\Color
- element for system configurationcomposer require orange35/magento2-color-picker-element
<field id="color" translate="label" type="Orange35\ColorPickerElement\Data\Form\Element\Color" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Color</label>
</field>
Example 1:
<script type="text/x-magento-init">
{
"color-element-id": {
"orange35ColorPickerElement": {}
}
}
</script>
Example 2:
<input type="text" name="color" data-mage-init='{"orange35ColorPickerElement":{}}' />