# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution
Highlighted

## Randomized Colors are Too Dark. Questions on Color Boxes

Hey all,

I am attempting to change the color of the plots on a mixed signal graph remotely using the "color box" control which works fine; however, I am also setting the color boxes to a random color when the program first starts up which is where my problem lies.

What I currently am doing is that I have a random number generator pumping out a number after which I multiply the number by 10000000, just to give me some colors brighter than black, and then I have that wired up to the color box control I am setting the random color on. The problem with this is that although it does produce some decent colors some of the colors produced are quite dark and pretty hard to see on the mixed signal graph.

I could make the graph background a different color if I have to in order to see a majority of the colors that come out, but I would much rather just have the colors come out more on the bright and colorful side.

So I have two questions for you guys and gals:

1) How do the colors of the colorbox get determined using the unsigned 32 int?

One such example of why I am confused is that the number that I have going in is 5726420 from the random number generator (+ being multiplied), but on the colorbox control the RGB value is R:87 G:96 B:212. Why is that?

2) Is there any kind of algorithm out there that someone has done that can produce values randomly that will give kind of neony colors? or anything semi-bright for that matter?

Any help is very much appreciated!

Ionized

Message 1 of 3
(821 Views)
Solution
08-27-2015 04:09 PM

## Re: Randomized Colors are Too Dark. Questions on Color Boxes

Use "RGB to color" from three random U8 (o..255) values to generate a color. (double click it to open the VI to understand the structure of the color data type )

LabVIEW Champion Do more with less code and in less time
Message 2 of 3
(812 Views)

## Re: Randomized Colors are Too Dark. Questions on Color Boxes

I know this post is quite old, But I was facing the problem that the random color can give similar color and therefore are not easily distinguishable.

In Wikipedia and other forum, i found only 26... I tough it is not enough...

Here is the VI I created for this solution. 55 easily distinguishable color.

There is no gray tone. if you add grey tone, it is possible to have 60 different color.

55 easily distinguishable color.vi

From that vi it is possible to use only the array containing those color pallet.

Message 3 of 3
(393 Views)