LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically generate color

Solved!
Go to solution

change hue value in FOR means?

What i want is actually when i run the VI each time different colors should come depending on the number of parameters.

So It will be the same as in Freelance_LV 's VI to create a random number values for hue?

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 11 of 17
(615 Views)

Hi,

 

I would use the loop iterator output to change hue. So you will get a "rainbow" color table!

 

(Note: Your HSL2RGB.vi is part of a lvlib, so I can't run it due to missing lvlib file...)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 17
(614 Views)

Hello Gerd.

 

See attached for the lib file.

 

I tried as u said. But i am getting only one color as output.

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 13 of 17
(599 Views)

Hi Nghtcrwlr,

 

you're really not able to calc a HUE value from the loop iterator?

check.png

It's just a simple multiplication...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 17
(597 Views)

Hello Gerd

 

I did the same multiplication like u did. But used another constant value instead of 2Pi.

And what i get as output is : ( See Attachment)

Just first color and then the rest is all white.

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 15 of 17
(583 Views)

Hi Nghtcrwlr,

 

you really should read the context help of that "HSL to RGB" VI.

It clearly says "Warning! Hue is in radians!"...

 

What do you think why I was using "2pi" for scaling the HUE value?

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 16 of 17
(581 Views)

opps... i didnt see that one.Smiley Happy Thanks

 

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 17 of 17
(563 Views)