DEV Community

Cover image for Easy Random Color
Zevan Rosser
Zevan Rosser

Posted on

Easy Random Color

One way to generate a random color is to randomize the hue argument of the css hsl. This value is in degrees 0-360 (think colorwheel):

The other arguments can be randomized as well if you need random saturation and lightness… like this:

See more stuff like this over @ Snippet Zone

Discussion (0)