# selecting a pallete of unique colors - Page 4

•  Subject
• Author
• Posted on

## Re: selecting a pallete of unique colors

On 25/07/10 07:31, Rahul wrote:

Hmm, I don't see it yet.

Rgds

Denis McMahon

## Re: selecting a pallete of unique colors

I get an error:

Delivery to the following recipient has been delayed:

Message will be retried for 2 more day(s)

Technical details of temporary failure:
DNS Error: Could not contact DNS servers

--
Rahul

## Re: selecting a pallete of unique colors

On 25/07/10 23:38, Rahul wrote:

wtf ...... error in my settings corrected, please try again.

Rgds

Denis McMahon

(trying to work out why his news editor thought his email was

## Re: selecting a pallete of unique colors

I think you're going to have a hard time coming up with 50
on a graph (plus 2 for background and axis markings) of mail traffic
on different servers.  The narrow lines on a graph didn't help the
situation.

One approach to this involves coming up with a formula for "color
distance".  Now, someone has commented that using RGB for color
distance doesn't work very well.  I had a problem of producing a
cable wiring chart, where cable wires may have one or two colors
chosen out of a pallette of about 16 colors, and selecting a third
color for text out of that pallette that would contrast well with
the other two colors.  I used the color with maximum distance from
the other two colors.  For that it worked well, but here we are
considering a difference between 16 colors.

Whether it sucks or not, here's the RGB color distance between 2
colors: View the RGB color space as a 3-D cube.  Take the differences
in each of the R, G, and B components, and square them.  Add the 3
results.  Take the square root of the result.  If you are only
comparing magnitudes of the distance, you can forget the square
root and make comparisons on distance**2.

Improvements on this might involve weighting the squared differences
for R, G, and B differently.  B probably gets a lower weighting, like
say 0.8.

Another alternative is to convert to HSV and use a difference in that
space.

Here's what you get if you take 33 steps (0x00, 0x08, 0x10, ...,
0xf0, 0xf8, 0xff) for each of R, G, and B, select one color arbitrarily
(I chose black), and then select the color farthest from the already
selected colors (the distance to several colors is the distance to
the closest one).  Repeat until you have enough colors.  The distance
number indicates the (minimum) distance of this color from all those
above it.

R  G  B   Distance
1: 00 00 00
2: FF FF FF  441.673
3: 00 80 FF  284.875
4: 80 FF 00  284.875
5: FF 00 80  284.875
6: 90 90 90  182.518
7: 00 FF 80  179.605
8: 80 00 FF  179.605
9: FF 80 00  179.605
10: 00 00 A0  159.402
11: 00 A0 00  159.402
12: A0 00 00  159.402
13: 60 FF FF  159.000
14: FF 60 FF  159.000
15: FF FF 60  159.000
16: 10 80 80  128.004
17: 80 10 80  128.004
18: 80 80 10  128.004
19: 78 78 FF  116.073
20: 78 FF 78  116.073
21: FF 78 78  116.073
22: 40 40 40  102.450
23: 00 E8 E8  101.361
24: E8 00 E8  101.361
25: E8 E8 00  101.361
26: 20 20 FF  101.193
27: 20 FF 20  101.193
28: FF 20 20  101.193
29: B0 C8 E0  101.129
30: 48 B8 C0   95.331
31: B8 48 C0   95.331
32: B8 C0 48   95.331
33: 50 50 B0   93.295
34: 50 B0 50   93.295
35: B0 50 50   93.295
36: FF C8 B0   92.439
37: C0 FF A0   82.365
38: 00 10 50   81.584
39: 00 50 10   81.584
40: 50 00 10   81.584
41: F8 B0 FF   79.310
42: 00 50 C0   79.202
43: 00 C0 50   79.202
44: 50 00 C0   79.202
45: 50 C0 00   79.202
46: C0 00 50   79.202
47: C0 50 00   79.202
48: 00 C0 A8   74.626
49: C0 00 A8   74.626
50: C0 A8 00   74.626

## Re: selecting a pallete of unique colors

On 26/07/10 07:44, Gordon Burditt wrote:

Yeah, I have a solution which uses two colour icon files (filled
foreground shape on background) which I sent him php for.

Triangle (apex down), Pyramid, Diamond, Square, Pentagon, Hexagon,
Circle Square.

24 colour combinations using the vga colours excluding:

a) white, black, grey and silver
b) any combination where both foreground and background are from the
"bright" half
c) any combination where both foreground and background are from the
"dull" set
d) any combination where the foreground and background colour both have
a non-zero value in the same element (r, g or b)

It may not be a perfect set of icons, but it gives 192 to start with.

Rgds

Denis McMahon

## Re: selecting a pallete of unique colors

Thanks a lot Denis! That looks very useful already.

For those who might be interested here's the set of icons based on the php
code that Denis wrote:

http://dl.dropbox.com/u/118481/denis_icons.jpg

And then this is the prototype webpage (also thanks to Denis!)

http://dl.dropbox.com/u/118481/denis_server_farm.jpg

--
Rahul

## Re: selecting a pallete of unique colors

On Mon, 26 Jul 2010 18:27:16 +0000 (UTC), in comp.lang.php Rahul

In the image (denis_server_farm) point out the corresponding jobs for
server 10,30 and 40. It is difficult to do. If a server can run more
than one job, how are you going to display it in the example that you
have given?

If you are trying to create a dashboard of server/job status then this
needs to be much easier to read and understand.

I think that you need to ask yourself - am I tracking the use of the
servers or tracking which jobs are running on the servers.

If the former then, instead of all these colours and symbols, I would
group the servers by area. I am assuming, due to the number of
servers, that they are rack mounted so each row could be given a
colour background. Then display the job(s) that the server is running
either by number, colour or symbol alongside the server number.

If tracking by job then list the jobs in the left column and display
which server(s) are being used for that job.

More considerations:
if one or more servers are off-line how are you going to indicate this
You might want to store this information to a database to identify
trends in the server loads (some servers might be doing more work than
others therefore the load balance isn't correct).
server.

HTH

## Re: selecting a pallete of unique colors

Thanks Jeff! All very valid points.  I guess I've a problem far tougher
than my ability to code it in php. :)

--
Rahul

## Re: selecting a pallete of unique colors

I'm not sure why you want so many colors, but for consistancy you should
stick to browser-safe colors so that they won't show differently from
machine to machine for one color.

HTH,

Twayne`

## Re: selecting a pallete of unique colors

.oO(Twayne)

We're not in the 1980s anymore.

Micha

## Re: selecting a pallete of unique colors

That was not the reason for browser safe colours. Nothing to do with it in
fact.