I don’t mean just about any random colour bu something which is aesthetically good looking. I understand it’s a bit subjective but still, is there any way to filter out bright, neon, fluorescent and similar colours from the palette ?
Check this out https://www.npmjs.com/package/randomcolor
Thanks a lot, but I’m not sure how to use it
How many random colours do you need?
If you didn’t want to just use random numbers as RGB values, you could have an array of acceptable colours and pick from them randomly.
I intend on using a huge number otherwise the colours are bound to repeat. Maybe 100+
Math.random() you can generate three numbers from 0 to 255 and create an RGB value with them. Some of your colors might be very ugly, but they’d be random.
Yeah, I’m currently using that same principle but some colours are just too painful to watch.
This does present an interesting colour theory question - are there certain values that most humans would agree are aesthetically unpleasant, and is there a mathematical pattern underlying that?
I see what you mean about some ugly color combos. There are some colors which should stay back in the 90s. However, I wonder instead of true randomness to determine color, who not use patterned randomness instead?
p5.js does a great job doing that and you can check out their example here: https://p5js.org/examples/hello-p5-interactivity-1.html
Hope this helps