I am just wondering whether it is possible to generate 3 automatic colour variant from one colour
for example if a user chooses Blue the system should pick 3 varients of blue, 1 30% lighter, 2 60% lighter and the 3rd 90%lighter.
We are making a website with branding.
It can be in javascript of php.
Can anyone please shread some light on this. any example links, tutorial links…
Thank you,
Karthik
For a Javascript / jQuery approach, you’ll need to get the RGB value of a color. For example, the
.css()function gives you a value in the form ofrgb(0,0,0)for something likebackground-color.You’ll just need to parse that to get the individual red, green and blue components and from there, it’ll be simple math to get the 30,60 and 90% lighter variants.