DEV Community

Bajro
Bajro

Posted on • Edited on

4 2

Simplest color scheme generator in Vuejs

I try to make the simplest color generator with JavaScript.
My understanding of the generator is that it works most of the time with HSL color representation. It is mostly for me to practice conversions between colors.

I first convert hex color to RGB color by taking input and take first 2 characters to represent Red value than next 2 characters represent Green value and last 2 character is Blue value. After that, I take RGB color and convert it to HSL I found Here. In the end, I just take the HSL value and change the L(lightness) value if I want darker color I subtract some value and if I want lighter color I add some value.
You can check how it looks like and plays a little with it on my codepen.
In the next few days, I will try to recreate Adobe color.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay