LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

colorbox grayscale

Solved!
Go to solution

Hello,

 

I need to control a colorbox indicator with values from 0 to 225, but the colors must be in 8-bit grayscale.

Any ideas?

0 Kudos
Message 1 of 11
(3,350 Views)
Solution
Accepted by topic author žabić

The color box is U32. Given a U8 greyscale number, you simply need to join it three times, and pad with zeroes to get a greyscale color value.

 

There is the RGB to color tool that does this for you. Simply wire the U8 value to all three inputs.

 

 

Message 2 of 11
(3,347 Views)

is there a way to separately control background color of each element in an 2D array indicator?

0 Kudos
Message 3 of 11
(3,326 Views)

No, elements of an array can only differ in value, they cannot differ by properties (such as background color).

0 Kudos
Message 4 of 11
(3,324 Views)

You can create a cluster of a transparent numeric in front of a color box, and create an array of such clusters. For a colorbox, the color is the value, so that will work.

Message 5 of 11
(3,323 Views)

okay, tnx

0 Kudos
Message 6 of 11
(3,318 Views)

could you send an example...i cant get i to work

0 Kudos
Message 7 of 11
(3,301 Views)

What is your LabVIEW version?

0 Kudos
Message 8 of 11
(3,294 Views)

Try something like this (LabVIEW 8.2). modify as needed.

 

This is using flat classic controls for the inner elements for simplicity. ("Color Box" and "Simple Numeric" from the classic numeric palette)

 

 

Download All
0 Kudos
Message 9 of 11
(3,290 Views)

Another option is the use of a table instead.

 

Here you have full control over the background color of each cell. That's what I typically use.

0 Kudos
Message 10 of 11
(3,283 Views)