Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a list of visually distinct colors?

I need to assign colours to distinguish between different items. Simple case: order rows of different color according to customer.

I don't want to have the user choose a colour for every customer, I want to do this at runtime.

If there is a single customer I will use "red", if there are two "red" and "white", ...

Of course I can create my GimmeRandomColour(i: index) own function that uses i and the RGB function to create good random colours (but in this case creating nice colours can be tricky). Or I can say if i is 0 give me clRed, ... (in this way creating many colours can be a problem).

How can I get a "good list of colours" with a acceptable levels of contrast?

like image 368
LaBracca Avatar asked Mar 24 '11 10:03

LaBracca


People also ask

How many visually distinct colors are there?

For charts and graphs it's a relatively common question by programmers to want to procedurally generate an arbitrary number of colors that are visually distinct. Various research (or educated guesses) exist that say that the number of colors humans can differentiate is somewhere between 200,000 and 20 million.

How do I find my color palette?

Use the veins on your wrist to tell if you have cool or warm undertones. Lift your wrist to eye-level in natural light and inspect your veins on the inside of your wrist. If your veins look green or greenish-blue, your skin has warm undertones. If the veins look blue or purple, you have cool undertones.

What are the 16 different colors?

HTML used to recognize 16 color names ("black", "white", "gray", "silver", "maroon", "red", "purple", "fushsia", "green", "lime", "olive", "yellow", "navy", "blue", "teal", and "aqua"), but new browsers can recognize 147 CSS3 color names. a color number, such as "#FF0000", "#FFFFFF" (those are red and white).

What are distinct colors?

The basic color terms are red, blue, yellow, green, orange, purple, brown, pink, black, gray, and white. The additional colors are merely shades of at least one of the basic colors listed.


1 Answers

No in-built function in Delphi. See this question for ways to generate pleasing colour schemes.

Algorithm to randomly generate an aesthetically-pleasing color palette

like image 193
HMcG Avatar answered Sep 17 '22 14:09

HMcG