Re: Unique Set of n Colors
Re: Unique Set of n Colors
- Subject: Re: Unique Set of n Colors
- From: "B.J. Buchalter" <email@hidden>
- Date: Mon, 23 Jul 2007 17:08:31 -0400
If you use a random number based approach, you can simply set the
Psudeo Random Number Generator seed before generating the random
numbers -- this will give deterministic results.
Best regards,
B.J. Buchalter
On Jul 23, 2007, at 4:00 PM, I. Savant wrote:
List:
I need to generate a set of n unique colors for use in a pie chart.
The set of colors must be unique and sufficiently distinct whether n=1
or n=100 (I realize the higher the 'n', the less distinct the colors
will be). The colors must also be distributed such that red and
slightly-darker-red aren't right next to one-another.
Further, the set of colors cannot be randomly generated. This is the
problem I'm running into with the examples I've been able to google so
far; the set of colors must be exactly the same for n from one run to
the next. Randomizing the channels fails my requirements as I have a
rather strict storage space requirement and an integer representing a
"color scheme" or "mode" is far nicer than a set of up to 100 colors
for each pie chart the user cranks out.
I've spent a good hour googling around, trawling the cocoa-dev
archives, etc. but cannot find a good approach. This, of course, is
after spending *more* hours trying to develop something on my own that
looks good, but to no avail.
Do any of you graphics guys / gals have anything useful or know of
any good examples or open-source projects that do something similar?
--
I.S.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
B.J. Buchalter
Metric Halo
http://www.mhlabs.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden