Simon Wigzell wrote:

[...] It would be nice to have an "Auto" button to click that will then

fill out all the color fields with a properly generated set of colors -

that is colors that are as different from each other as possible. Random

colors won't do as you might end up with very similar colors. Is such a

program possible?

I think it is, although I do not think the solution will be a trivial one.

The first step would be to define the distance function: What makes color

C more different from color A than color B? Is it its color temperature,

hue, luminance etc. or a combination of either one (whereas you have to

take into account that computer displays and printers cannot display all

colors perceptible by humans)? After you have done that, you can devise an

algorithm to calculate C as the point with the maximum distance from A and

B within a finite n-dimensional space, according to that relation. Of

course there can be more than one solution, given the same start point.

The most simple solution would be using the existing RGB three-dimensional

color space. Starting with Black (0, 0, 0), the next "most different"

color, defined as the most distant point in the color space, would be White

(255, 255, 255). The next most distant points not already visited (colors

already used) would be the corners of that cube, identifying Red (255, 0,

0), Green (0, 255, 0), Blue (0, 0, 255), and the other standard colors like

Magenta (255, 0, 255). That would provide you with 8 "very different"

colors already, that do not even need to be computed (with a given set of

already used colors, you would only need to compute what corner color point

would have the maximum distance from all already used color points). The

next "most different" color, i.e. a point in the color space with the

maximum distance from all other already used points would be the center of

the greatest subset created by adjacent visited points (where you would

define the shape of that subset truly linear [between adjacent visited

points on a straight line], truly triangular [the center of the triangle

created by visited points that are not on a straight line], cubic, and so

on; since the color space is cubic, I would use a cubic-shaped subset).

In practice, you want to align that algorithm on the points in the color

space identifying the 216 True Web-safe colors, and you want to avoid

reddish and greenish colors that have the same grey-value.

PointedEars