Genrate random color without reapeating?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

how to genrate random colors without repeat of the same color or color code.
I am creating a line graph using ComponentOne Chart control and what to show
series with different colors.

thanx
 
Job Lot said:
how to genrate random colors without repeat of the same color or color
code.
I am creating a line graph using ComponentOne Chart control and what to
show
series with different colors.

If they don't repeat, they *aren't* random.
You could store a list of "already used" color value, and use only different
ones, but you might still get colors that are so close that you can't
distinguish them.

Use a static list of color values (like the constants in the Color class),
and pick them one after another.

Niki
 
Back
Top