Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > selecting a pallete of unique colors

Reply
Thread Tools

selecting a pallete of unique colors

 
 
Denis McMahon
Guest
Posts: n/a
 
      07-24-2010
On 24/07/10 01:20, Rahul wrote:

> 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
 
Reply With Quote
 
 
 
 
William Gill
Guest
Posts: n/a
 
      07-24-2010
On 7/22/2010 6:50 PM, Rahul wrote:
> 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.


 
Reply With Quote
 
 
 
 
William Gill
Guest
Posts: n/a
 
      07-24-2010
On 7/22/2010 6:50 PM, Rahul wrote:
> 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.


 
Reply With Quote
 
Geoff Berrow
Guest
Posts: n/a
 
      07-24-2010
On Fri, 23 Jul 2010 23:01:42 -0400, William Gill
<(E-Mail Removed)> wrote:

>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.




--
Geoff Berrow (Put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs www.4theweb.co.uk/rfdmaker

 
Reply With Quote
 
Jerry Stuckle
Guest
Posts: n/a
 
      07-24-2010
Geoff Berrow wrote:
> On Fri, 23 Jul 2010 23:01:42 -0400, William Gill
> <(E-Mail Removed)> wrote:
>
>> 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.
>
>
>
>


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.
http://www.velocityreviews.com/forums/(E-Mail Removed)
==================
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      07-24-2010
On 22 July, 23:50, Rahul <(E-Mail Removed)> wrote:

> 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.
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      07-24-2010
Jerry Stuckle wrote:

> 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?

--
-bts
-Four wheels carry the body; two wheels move the soul
 
Reply With Quote
 
David Segall
Guest
Posts: n/a
 
      07-24-2010
Jerry Stuckle <(E-Mail Removed)> wrote:

>Rahul wrote:
>> 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?
>>

>
>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.
 
Reply With Quote
 
William Gill
Guest
Posts: n/a
 
      07-24-2010
On 7/24/2010 3:33 AM, Geoff Berrow wrote:

> 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.
 
Reply With Quote
 
Jerry Stuckle
Guest
Posts: n/a
 
      07-24-2010
David Segall wrote:
> Jerry Stuckle <(E-Mail Removed)> wrote:
>
>> Rahul wrote:
>>> 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?
>>>

>> 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.


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 Removed)
==================
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to avoid the sorting of elements in the pallete component(netbeans) jaysaj Java 0 08-29-2011 01:07 PM
TreeNode colors come from anchor colors AAaron123 ASP .Net 1 08-07-2008 07:56 PM
How to design a colour pallete of uploaded .gif or jpeg images with selection option? savvy ASP .Net 0 05-22-2006 09:36 AM
photo shop 7.0 locks up when choosing the color pallete BEM Computer Support 5 11-12-2005 10:55 PM
Check if uploaded jpg uses CMYK or RGB pallete?? gt ASP .Net 0 12-03-2003 11:20 AM



Advertisments