How to Add Gradient Color Selection to the OOTB Color Picker in AEM Cloud
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @Nilesh_Mali
You can't use gradients directly with the OOTB color picker because gradients are not colors but a CSS property.
For example:
background: rgb(0,0,0);
background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(246,253,29,0.6097032563025211) 42%, rgba(148,171,249,0.8085828081232493) 85%);
If you have predefined gradients, you can allow authors to select from a predefined list. Alternatively, you can use an external tool like CSS Gradient to generate a gradient and store it in a text field.
Hi @Nilesh_Mali
You can't use gradients directly with the OOTB color picker because gradients are not colors but a CSS property.
For example:
background: rgb(0,0,0);
background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(246,253,29,0.6097032563025211) 42%, rgba(148,171,249,0.8085828081232493) 85%);
If you have predefined gradients, you can allow authors to select from a predefined list. Alternatively, you can use an external tool like CSS Gradient to generate a gradient and store it in a text field.
Hello,
Hope your have already found the solution for this. If not please see if this helps
Thanks,
Anil
Views
Likes
Replies