Vanilla JavaScript random colours
Ever wondered how you can create random colours using Vanilla JavaScript?
The other day we made a JavaScript data-attribute filter, and I wanted to give each block a random colour.
So today we are going to do just that.
The end result will be as this...
h.daily-dev-tips.com2 min read
Andrew Baisden
Full-Stack Engineer | AI-Augmented Developer | React • TypeScript • Node • Python | Cursor + Claude daily
Good post I can already imagine a few use cases for this type of thing.