[gameprogrammer] Re: mapping numbers to colors
- From: "Alan Wolfe" <atrix2@xxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Thu, 2 Dec 2004 14:09:55 -0800
sounds like what im looking for, whats HSV?
----- Original Message -----
From: "Stephane Marchesin" <stephane.marchesin@xxxxxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Thursday, December 02, 2004 2:08 PM
Subject: [gameprogrammer] Re: mapping numbers to colors
> Alan Wolfe wrote:
>
> >Hey guys,
> >wierd question, possibly straight out of the old school days...
> >
> >I'm making some line graphs and i have X number of groups of data.
> >
> >X could be 1 or it could be 20, it varies.
> >
> >What im trying to do is come up with a good way to automaticly set colors
to these groups of data.
> >
> >ie if there were 2 groups, 1 line could be red and the 2nd line could be
blue.
> >
> >if there were 4 groups, i could use red, blue, yellow, green for the
lines etc.
> >
> >Does anyone know a way to algorithmicly come up with X number of colors,
that are as far apart visualy as possible? Cause if theres 5 groups of data
and they are all shades of blue, thats not very good.
> >
> Here's what I usually do (probably not the best way but whatever) :
> I'm coloring objects that are subsequently drawn in 3d and shaded. Thus
> I only want to set the raw color, not the shades.
> After a first pass to know how many groups I have, I work in the HSV
> color space, and take a number of points (equal to the number of groups)
> regularly spaced around H axis, and take S=1 and V=1.
> Then, I convert the color from HSV space to RGB space for each of these
> points and that's the color for the corresponding
> object/data/cluster/class/whatever. And that's all.
>
> Stephane
>
>
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: mapping numbers to colors
- From: Stephane Marchesin
- References:
- [gameprogrammer] mapping numbers to colors
- From: Alan Wolfe
- [gameprogrammer] Re: mapping numbers to colors
- From: Stephane Marchesin
Other related posts:
- » [gameprogrammer] mapping numbers to colors
- » [gameprogrammer] Re: mapping numbers to colors
- » [gameprogrammer] Re: mapping numbers to colors
- » [gameprogrammer] Re: mapping numbers to colors
- » [gameprogrammer] Re: mapping numbers to colors
- » [gameprogrammer] Re: mapping numbers to colors
- » [gameprogrammer] Re: mapping numbers to colors
- [gameprogrammer] Re: mapping numbers to colors
- From: Stephane Marchesin
- [gameprogrammer] mapping numbers to colors
- From: Alan Wolfe
- [gameprogrammer] Re: mapping numbers to colors
- From: Stephane Marchesin