Vaadin's ColorPicker component wrapped in a custom field.
Maven is the easiest way to install the module.
<dependency> <groupId>info.magnolia.ui</groupId> <artifactId>magnolia-ui-color-picker-field</artifactId> <version>1.1.1</version> <!-- Magnolia 6.2 --> </dependency>
The source for this module can be found here: https://github.com/magnolia-community/color-picker-field
Issues, Bugs and Improvements
Report them here: https://github.com/magnolia-community/color-picker-field/issues
Simply configure the color picker as a field in your dialog or app:
form: properties: color: $type: colorPickerField label: Color Picker
- Closing the dialog (i.e. Save and Cancel) does not automatically close the color picker. You must pick the color, click "OK" and then Save.
- In version 1.0, the "name" of the color picker must be "color". Limited to one picker per form. ( fixed in v.1.1)
- Unable to clear color picker selection, or select transparent color.
- Fixed modal bug.
- Updated for 6.2.
- Solved restriction of field naming.
- Released for 6.1
I am trying to use this color picker field, but I found that the code stored into jcr is a Number format value, I would like to store color Hex code, such as #000FFF, may I know if we can do it?
I believe it stores the value as an RGB value. Probably it would be easier to convert it to Hex when reading the value.