Utility function: getRandomColor
I've had some fun with random colors lately! To speed up development, I made a utility function for getting a random color. It's really simple:
export const getRandomColor = () => {
const red = Math.floor(Math.random() * 256)
const green = Math.floor(Math.random() * 256)
const blue = Math.floor(Math.random() * 256)
const color = `rgb(${red}, ${green}, ${blue})`
return color
}
