From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Value of Color box

Solved!
Go to solution

 Hi, what is the relation between the value that coming out from color box and the color selected in Front panel as in the attached image ?

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 1 of 6
(6,029 Views)

Hi dhans,

 

A color in LabVIEW is a representation of a 32-bit integer. You can separate the 32-bit integer into four U8 integers:

  • Transparency, where 0 is solid and 1 is transparent. Please note that most color boxes will not accept a transparent input - you will need to keep this first integer as 0 to result in a valid color.
  • Red (any integer from 0 to 255)
  • Green (any integer from 0 to 255)
  • Blue (any integer from 0 to 255)

If you wish , refer the following link for more details.

http://digital.ni.com/public.nsf/allkb/B61D723CC7B7BE4E862568F8004C3ACB

 

Regards

Deepu Jacob

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


0 Kudos
Message 2 of 6
(6,015 Views)

Hi djac91,

   Thanks for the reply. The link you have given helps me to undertsand about colors used in labview. But still one point i need to understand further. In  the attached image irrelevant value( I think) is flowing from color box to the variant node. Thats what i am asking for. Relation of that  data to the color i have chosen.

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 3 of 6
(5,985 Views)

The value you are getting is 46253 (decimal), just convert it to Hex format and you get 00B4AD which is six digit Hexadecimal representation of RGB Values.

-Like first two digits representing Hex value of R and next two digits to G and last two to Blue.

Thanks
uday
Message 4 of 6
(5,964 Views)
Solution
Accepted by topic author dhans

The value is relevant. Check the attached vi.

 

2016-10-21 12_40_27-Color_Box.vi Block Diagram _.png

-----------------------------------------------------------------------------------------------------------------------------
Waiting For the inner calling 🙂


Message 5 of 6
(5,960 Views)

Thanks to both of you!!!Smiley Happy

Best Regards,
Dhans 😉
Kudos are welcome 😉
Aspirant Labview Programmer (Labview 14) 😉
0 Kudos
Message 6 of 6
(5,948 Views)