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
 

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

Back
Top