


Hi,
How to store the textColor value under jcr:content in hex code format?
Currently it gets stored in rgb format
<textColor
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/colorfield"
fieldLabel="Text Color"
name="./textColor"
showDefaultColors="{Boolean}false"
showProperties="{Boolean}true"
value="#000000"
variant="swatch">
</textColor>
Thanks in advance!
Views
Replies
Sign in to like this content
Total Likes
Hi,
If you choose from RGB then it will save as RGB value otherwise hex
you can change this value on dialog submit example https://github.com/arunpatidar02/aem63app-repo/blob/master/js/color-picker-fix.js
In above file I changed from hex to rgba but you can do opposite
Hi,
If you choose from RGB then it will save as RGB value otherwise hex
you can change this value on dialog submit example https://github.com/arunpatidar02/aem63app-repo/blob/master/js/color-picker-fix.js
In above file I changed from hex to rgba but you can do opposite