selecting a pallete of unique colors

D

Denis McMahon

Not sure if there's a way in HTML to do this? Maybe via a color-inversion
etc? Or do I have to shift to AJAX or something fancier? All I need is
some form of a "onhover" event that can be linked to all similar cells.
Any tips?

I think put each server in a table cell. That's a fairly logical layout.

You could use mousover / mouseout events to to track the mouse to an
active cell and highlight same job cells dynamically with javascript.

Rgds

Denis McMahon
 
W

William Gill

This is more of a design and perception question so not sure what's a good
group to post it on. I'm trying to generate a automated php status page for
user-jobs running on our server-farm. Like so:

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

Each server name (eu001-eu261) is associated with exactly one jobnumber.
But some jobs can run across many servers. i.e. number of jobs< number of
servers. Many jobs use multiple servers.

I tried loading a sample of HEX color values but many send up being so
close to each other that often it gives an effect where servers seem to
have the same color when, in fact, they have a different job that just
randomly got assigned a similar color.

Is there a way to get a pallate of 50 or so fairly unique (to perception)
colors?
The "web smart" palette is derived from using 3 character hex for color
i.e. #fff instead of 6 character #ffffff. The result is a reduced 4096
color palette as opposed to 16,777,216. It can be easily generated by
successively incrementing r, g, and b values from 0 (0x0) to 16 (0xF).
Since you need far fewer colors, and greater differential between each
you could experiment with an increment step of 4 (64 colors), or you
could find that using different steps for r, g, and b is more
satisfactory. You would have to experiment. The palette can easily be
programmatically generated, and since we are discussing the algorithm
and not the resulting color palette, it might qualify as a suitable
discussion for a php ng.
 
W

William Gill

This is more of a design and perception question so not sure what's a good
group to post it on. I'm trying to generate a automated php status page for
user-jobs running on our server-farm. Like so:

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

Each server name (eu001-eu261) is associated with exactly one jobnumber.
But some jobs can run across many servers. i.e. number of jobs< number of
servers. Many jobs use multiple servers.

I tried loading a sample of HEX color values but many send up being so
close to each other that often it gives an effect where servers seem to
have the same color when, in fact, they have a different job that just
randomly got assigned a similar color.

Is there a way to get a pallate of 50 or so fairly unique (to perception)
colors?
The "web smart" palette is derived from using 3 character hex for color
i.e. #fff instead of 6 character #ffffff. The result is a reduced 4096
color palette as opposed to 16,777,216. It can be easily generated by
successively incrementing r, g, and b values from 0 (0x0) to 16 (0xF).
Since you need far fewer colors, and greater differential between each
you could experiment with an increment step of 4 (64 colors), or you
could find that using different steps for r, g, and b is more
satisfactory. You would have to experiment. The palette can easily be
programmatically generated, and since we are discussing the algorithm
and not the resulting color palette, it might qualify as a suitable
discussion for a php ng.
 
G

Geoff Berrow

The palette can easily be
programmatically generated, and since we are discussing the algorithm
and not the resulting color palette, it might qualify as a suitable
discussion for a php ng.

That's a bit tenuous. Much as I hate to admit it, it probably is off
topic for clp though it's an interesting conundrum so most of us don't
seem to mind.

Sadly it doesn't interest Jerry so you'll probably still get a tongue
lashing even though he is still crossposting to alt.html where
arguably it is on topic.
 
J

Jerry Stuckle

Geoff said:
That's a bit tenuous. Much as I hate to admit it, it probably is off
topic for clp though it's an interesting conundrum so most of us don't
seem to mind.

Sadly it doesn't interest Jerry so you'll probably still get a tongue
lashing even though he is still crossposting to alt.html where
arguably it is on topic.

It's not that it's not of interest to me, Geoff. It's off topic.

This newsgroup used to have a lot of off-topic posts - to the point you
had a hard time finding on-topic ones. And lots of responses which were
just plain crap. Getting people to post in the appropriate newsgroup
gets them better answers and allows people monitoring this newsgroup to
find php answers. That helps everyone. And that's why there is more
than one newsgroup, and why other successful newsgroups do the same.

But some people think that anything should be allowed, and that they are
experts on everything. A reading through some of the off-topic posts
here shows the latter is definitely not true.

But some people are very self centered and insist on posting off-topic
in newsgroups because they are too lazy to find the correct newsgroup.
And some people are very self-centered and insist that anything and
everything is on-topic because they don't want to be bothered to read
multiple newsgroups.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
A

Andy Dingley

Is there a way to get  a pallate of 50 or so fairly unique (to perception)
colors?

50 is tricky

The usual trick is to dive into the theory of the "colour wheel" and
to select a number of colours that are equally spaced radially around
a hue wheel, but are otherwise comparable in brightness and
saturation. This is a good technique for selecting a "handful" (i.e.
up to around 7) colours that are pleasing in combination.

For more than this, it's usual to look at rings on the same hue wheel,
i.e. splitting a previous "mid forest green" into standard, light and
dark variants. That could give you 21 or 30 without much trouble. This
is (IMHE) about as far as you can get for colours that are
recognisable enough to be identifiable between an information graphic
and a key list at the side. You can go for more than this by closer
spacing, you might even still have colours that are distinguishable
when adjacent (your main requirement here), but I doubt they'd still
be recognisable from one side of the page to another.

A useful technique is to select the colours with some intelligence,
not just randomly, and to ensure through your code that "close"
colours simply don't appear next to each other.

One approach that _doesn't_ work is to space colours out using their
RGB components. This is easy, but it's not how perception works and so
the results are very poor. Use HSV instead. I'm not familiar with PHP
for this, but HSV -> RGB conversion functions will either be supported
already, or are standard formulae.
 
B

Beauregard T. Shagnasty

Jerry said:
This newsgroup used to have a lot of off-topic posts -

If you say "This newsgroup" you should specify which one of the two
groups you are posting to. Don't you think?

Perhaps you should use a newsreader that alerts you when there is a
crosspost?
 
D

David Segall

Jerry Stuckle said:
PHP knows nothing about colors - that is strictly HTML.

You can pick any colors you want. And how to do it is up to you.

I guess I'm really wondering what your PHP question is.

Picking colours is not an HTML question either but there is a
convention in most language groups that regular contributors are
allowed to ask their colleagues an interesting question even if it is
off-topic. Another useful convention is to advise off-topic posters
which group to post to. The question is about perception and
aesthetics which is an issue faced by most people who produce HTML
but, as far as I know, there is no appropriate news group.
 
W

William Gill

That's a bit tenuous. Much as I hate to admit it, it probably is off
topic for clp though it's an interesting conundrum so most of us don't
seem to mind.

There is a lot of gray area in most ng's. Unless we want to start
groups like comp.lang.php.r.t.f.m or comp.lang.php.semantics

I don't think any of us use PHP for PHP's sake, but for some task at
hand. So asking for an approach to the task doesn't seem OT to me.
Even if the same logic could be applied to say Python. I also think
that's why HTML and PHP seem to have merged in some peoples mind. It may
also be why so many use PHP to produce poor HTML
... even though he is still crossposting to alt.html ...

I would think that creating gaps in that thread would be more offensive,
but that's just me. I have has numerous experiences where I got totally
different interpretations reading two versions of "the same" thread.

Jerry's point is well taken, there is a lot of really off topic crap out
there. Maybe if the OP had framed his query differently, we wouldn't be
having this discussion.

As for tongue lashings, I've received my share. Usually when someone
puts too fine a point on the semantics of "on topic" , or when they miss
a connection between the actual topic and the stated one.
 
J

Jerry Stuckle

David said:
Picking colours is not an HTML question either but there is a
convention in most language groups that regular contributors are
allowed to ask their colleagues an interesting question even if it is
off-topic. Another useful convention is to advise off-topic posters
which group to post to. The question is about perception and
aesthetics which is an issue faced by most people who produce HTML
but, as far as I know, there is no appropriate news group.

Maybe in some of your newsgroups, but none of the ones I have seen over
the years. Too many bad answers, among other things. And even if it
were the case (which it isn't), Rahul isn't even an occasional
contributor to c.l.p.

Also, when I know of a better newsgroup, I recommend one. But just
because I don't know of one does not make it on topic for this newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
J

Jerry Stuckle

Beauregard said:
If you say "This newsgroup" you should specify which one of the two
groups you are posting to. Don't you think?

True, I should have said c.l.p.
Perhaps you should use a newsreader that alerts you when there is a
crosspost?

I do.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
D

Denis McMahon

This is more of a design and perception question so not sure what's a good
group to post it on. I'm trying to generate a automated php status page for
user-jobs running on our server-farm. Like so:

Rahul, please send me email from a valid email address.

Rgds

Denis McMahon
 
D

Denis McMahon

Also, when I know of a better newsgroup, I recommend one. But just
because I don't know of one does not make it on topic for this newsgroup.

I'm actually writing this in alt.html

If you trim your headers to include to c.l.p only, I'll do likewise to
include a.h only. How's that?

If, however, you can't be bothered to trim the newsgroups to ensure that
your comments about topicality are restricted to the group in which they
apply, then I see no reason that I (or anyone else) should bother to
trim the newsgroups to remove the content which you're commenting about
from the group where you deem it not applicable.

Rgds

Denis McMahon
 
J

Jerry Stuckle

Denis said:
I'm actually writing this in alt.html

If you trim your headers to include to c.l.p only, I'll do likewise to
include a.h only. How's that?

If, however, you can't be bothered to trim the newsgroups to ensure that
your comments about topicality are restricted to the group in which they
apply, then I see no reason that I (or anyone else) should bother to
trim the newsgroups to remove the content which you're commenting about
from the group where you deem it not applicable.

Rgds

Denis McMahon


The proper procedure would be for you to trim your headers to include
alt.html only, and indicate you are going to do so. Trimming headers to
only those where it is off-topic is well-known to be of little use. It
does nothing to stop cross-posts to off-topic newsgroups. In fact, it
encourages them because those in other newsgroups don't see those
off-topic posts.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
J

Jerry Stuckle

Denis said:
I'm actually writing this in alt.html

If you trim your headers to include to c.l.p only, I'll do likewise to
include a.h only. How's that?

If, however, you can't be bothered to trim the newsgroups to ensure that
your comments about topicality are restricted to the group in which they
apply, then I see no reason that I (or anyone else) should bother to
trim the newsgroups to remove the content which you're commenting about
from the group where you deem it not applicable.

Rgds

Denis McMahon


The proper procedure would be for you to trim your headers to include
alt.html only, and indicate you are going to do so. Trimming headers to
only those where it is off-topic is well-known to be of little use. It
does nothing to stop cross-posts to off-topic newsgroups. In fact, it
encourages them because those in other newsgroups don't see those
off-topic posts.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
J

Jerry Stuckle

Denis said:
I'm actually writing this in alt.html

If you trim your headers to include to c.l.p only, I'll do likewise to
include a.h only. How's that?

If, however, you can't be bothered to trim the newsgroups to ensure that
your comments about topicality are restricted to the group in which they
apply, then I see no reason that I (or anyone else) should bother to
trim the newsgroups to remove the content which you're commenting about
from the group where you deem it not applicable.

Rgds

Denis McMahon


The proper procedure would be for you to trim your headers to include
alt.html only, and indicate you are going to do so. Trimming headers to
only those where it is off-topic is well-known to be of little use. It
does nothing to stop cross-posts to off-topic newsgroups. In fact, it
encourages them because those in other newsgroups don't see the
off-topic info.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
J

Jerry Stuckle

Denis said:
I'm actually writing this in alt.html

If you trim your headers to include to c.l.p only, I'll do likewise to
include a.h only. How's that?

If, however, you can't be bothered to trim the newsgroups to ensure that
your comments about topicality are restricted to the group in which they
apply, then I see no reason that I (or anyone else) should bother to
trim the newsgroups to remove the content which you're commenting about
from the group where you deem it not applicable.

Rgds

Denis McMahon


The proper procedure would be for you to trim your headers to include
alt.html only, and indicate you are going to do so. Trimming headers to
only those where it is off-topic is well-known to be of little use. It
does nothing to stop cross-posts to off-topic newsgroups. In fact, it
encourages them because those in other newsgroups don't see the
off-topic info and often just accept it's OK in other newsgroups.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
J

Jerry Stuckle

Denis said:
I'm actually writing this in alt.html

If you trim your headers to include to c.l.p only, I'll do likewise to
include a.h only. How's that?

If, however, you can't be bothered to trim the newsgroups to ensure that
your comments about topicality are restricted to the group in which they
apply, then I see no reason that I (or anyone else) should bother to
trim the newsgroups to remove the content which you're commenting about
from the group where you deem it not applicable.

Rgds

Denis McMahon


The proper procedure would be for you to trim your headers to include
alt.html only, and indicate you are going to do so. Trimming headers to
only those where it is off-topic is well-known to be of little use. It
does nothing to stop cross-posts to off-topic newsgroups. In fact, it
encourages them because those in other newsgroups don't see the
off-topic info and often just accept it's OK in other newsgroups.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
(e-mail address removed)
==================
 
R

Rahul

The usual trick is to dive into the theory of the "colour wheel" and
to select a number of colours that are equally spaced radially around
a hue wheel, but are otherwise comparable in brightness and
saturation. This is a good technique for selecting a "handful" (i.e.
up to around 7) colours that are pleasing in combination.

Thanks Andy! That is a very useful and fairly fundamental idea that I
wasn't aware of. It was some insight like this one that I was hunting for.

and a key list at the side. You can go for more than this by closer
spacing, you might even still have colours that are distinguishable
when adjacent (your main requirement here), but I doubt they'd still
be recognisable from one side of the page to another.

50 unique colors was really quite the worst case behaviour for me. In most
cases I might be able to get away with fewer.

Again, your insights are much appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top