To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to create a color selector with additional brightness selector. This example uses intensity graphs with overlapped sliders in the foreground.
Description
This VI is meant to be a dialog box (a subVI) to choose a color for a top level VI. While the color box is nice, this is a little quicker to access. The VI uses a gradient created in an intensity graph so that the user can see all of the available colors. They are selected by placing an invisible slider on top of the graph and indexing the array to that specific color.
With the Vision Development Module (VDM) you can also change the intensity of the selected color. So, not only the color, but how bright it is ranging from white to black. There is a boolean on the front panel that allows you to enable / disable the brightness slider.
Depending on whether you have the Vision Development Module or not, you can remove a lot of the VIs and property nodes on the block diagram (refer to description in Block Diagram).
As this is meant to be a dialog, you can use the SubVI setup when placing this VI in a calling VIs Block Diagram to show and hide this VIs Front Panel when calling it.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
Main VI Block Diagram:
Initialization VI Block Diagram:
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.