Designers come up with a collection of colors that are aesthetically pleasing.<p>Colors on electronic screens are just numbers. So by first principles, designers are in fact picking some numbers from an infinite set.<p>This selection process is certainly not random. It's common knowledge that blue works well with red on flags.<p>My question is: can a computer come up with a color palette (ie hex codes) that will work well together?<p>Is there any literature around this topic?<p>PS: I'm working on a side project that needs to generate color palettes and I have no clue about it.<p>Thanks
There's the standard color theory.<p>You look at a color wheel. Colors on the opposite side of the wheel look good. It's just opposite (complementary), but also tertiary, and so on.<p>You can also cut out a block from a color wheel. There's some nice examples here: <a href="https://forums.tigsource.com/index.php?topic=25396.0" rel="nofollow">https://forums.tigsource.com/index.php?topic=25396.0</a><p>Hex code might seem tough, better to look at it from HSL (Hue, Saturation, Lightness) and focus on only Hue.
I'm a fan of <a href="https://paletton.com/" rel="nofollow">https://paletton.com/</a> but someone has tried to apply AI to the problem: <a href="http://colormind.io/" rel="nofollow">http://colormind.io/</a> though beauty as ever remains in the eye of the beholder...
Although there are general principles, there's no accurate theory for what looks good. But I think you could train a ML model on data, such as from <a href="https://www.colourlovers.com/palettes" rel="nofollow">https://www.colourlovers.com/palettes</a>.
I like <a href="https://coolors.co/" rel="nofollow">https://coolors.co/</a> for color palette generation. Not sure what their algorithm is.