LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Randomized Colors are Too Dark. Questions on Color Boxes

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(824 Views)
Solution
Accepted by topic author ionizedwarhead
08-27-2015 04:09 PM

 

 

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 Smiley Wink)


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

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.

0 Kudos
Message 3 of 3
(396 Views)