Generating random CSS color palettes


Building upon my previous posts on color Generating random LCH colors and Generating random colors for fun and profit I have been thinking about how I might produce a simple tool to randomly create pleasant color themes for UI.

There are plenty of existing tools for generating color palettes on the web already but of course I like to do things the hard way in hopes that perhaps I might learn something.

Below is a start of such a tool which utilizes the LCH color space to generate a random color palette. After playing with it a bit, however I realized that it is usually best to begin with a consistent starting point.

ChatGPT introduced me to chroma.js which came in handy also.

Next I am thinking of adding: