Remove the default colors from Colorfield dialog in AEM
Add the property showDefaultColors="{Boolean}false"
Once you will add this property. All the default colors will be disappear from the colorfield dialog. You can show your custom colors as per the requirement. Please see the below for the reference.
<backgroundColor jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/colorfield"
showDefaultColors="{Boolean}false"
text="Background Color"
fieldLabel="Background Color"
name="./backgroundColor"
showProperties="{Boolean}false">
<items jcr:primaryType="nt:unstructured">
<red jcr:primaryType="nt:unstructured" value="#FF0000"/>
<white jcr:primaryType="nt:unstructured" value="#FFFFFF"/>
<black jcr:primaryType="nt:unstructured" value="#000000"/>
</items>
</backgroundColor>
You can also add showProperties="{Boolean}false" as per the above . if you want to hide the left side part from the color picker dialog then add this property.Please see the snapshot for the reference.

Thanks a lot for such a great explanation.
ReplyDeleteThank You. Good day..!!
Delete