LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change Color of a Slider

Highlighted
Hello everybody,

I would like to change the color of a slider from within my program (change
it from blue to red when helium fill level is below threshold) but I cannot
find the appropriate property.

I tried to create a property node and change the "Fill color", but there I
can only get 256 different blues. Somehow I seem to be missing the R and G
component.

Can someone please point out to me how I can solve this problem. Thanks a
lot,

Tobias

P.S.: I am using LV6

--
Tobias Vancura
Zurich/Switzerland
0 Kudos
Message 1 of 3
(1,349 Views)
Highlighted
the value you assign to the color property is normally decimal. Change the
radix to hexadecimal and you can assign the new color easier.

Otherwise try to use the colorbox and let it show the value on the
frontpanel when color changes - it will help you learning to use this
property node. I also had used that way..

Henrik



"Tobias" schrieb im Newsbeitrag
news:slrn9n1t91.9p6.tvancura@bermuda.ethz.ch...
>
> Hello everybody,
>
> I would like to change the color of a slider from within my program
(change
> it from blue to red when helium fill level is below threshold) but I
cannot
> find the appropriate property.
>
> I tried to create a property node and change the "Fill color", but there I
> can only get 256 different blues. Somehow I see
m to be missing the R and G
> component.
>
> Can someone please point out to me how I can solve this problem. Thanks a
> lot,
>
> Tobias
>
> P.S.: I am using LV6
>
> --
> Tobias Vancura
> Zurich/Switzerland
0 Kudos
Message 2 of 3
(1,349 Views)
Highlighted
Thank you very much for the help. I later found out how it works, the color
is a 24bit Integer with one byte for each color (RGB). Therefore I thought
the colors were cycling because I after 255 cycles it would restart with
blue but with a slight addition of green which I did not recognize. So the
formula is

color = (R << 16)|(G << 8)|B

where R, G and B are bytes for the red, green and blue value.

Cheers, Tobias



On Wed, 8 Aug 2001 10:37:08 +0200, Henrik Skupin wrote:
>the value you assign to the color property is normally decimal. Change the
>radix to hexadecimal and you can assign the new color easier.
>
>Otherwise try to use the colorbox and let it show the value on the
>frontpanel when color changes - it will help you learning
to use this
>property node. I also had used that way..
>
>Henrik
>
>
>
>"Tobias" schrieb im Newsbeitrag
>news:slrn9n1t91.9p6.tvancura@bermuda.ethz.ch...
>>
>> Hello everybody,
>>
>> I would like to change the color of a slider from within my program
>(change
>> it from blue to red when helium fill level is below threshold) but I
>cannot
>> find the appropriate property.
>>
>> I tried to create a property node and change the "Fill color", but there I
>> can only get 256 different blues. Somehow I seem to be missing the R and G
>> component.
>>
>> Can someone please point out to me how I can solve this problem. Thanks a
>> lot,
>>
>> Tobias
>>
>> P.S.: I am using LV6
>>
>> --
>> Tobias Vancura
>> Zurich/Switzerland
>
>


--
Tobias Vancura
Zurich/Switzerland
0 Kudos
Message 3 of 3
(1,349 Views)