“Secret” LabVIEW System Colors

Internally, LabVIEW uses a lot more system colors than the six that are available through the color picker.

Despite my post title, they’re not really “secret.” There’s an article on DevZone that shows them (circa LabVIEW 7.0) and provides VIs to give you their color values more easily. You can use them when you set colors programmatically. Once you have these colors in a VI you can use the “Get Color” (eyedropper) tool and “Set Color” (paintbrush) tool to apply them to other items interactively.

[Note: In later versions of LabVIEW,Â Most Recent Color has been deprecated and several colors have been added, which I’ll list below].

If you’re wondering how LabVIEW distinguishes between “regular” colors and system colors, it uses a special bit (0x01000000) to designate a color as “symbolic.”

Several more system colors have been added since 7.0:

Title Bar Active (0x01000038)

Title Bar Inactive (0x01000039)

Title Bar Text Active (0x0100003A)

Title Bar Text Inactive (0x0100003B)

Radio Button Text (0x0100003C)

Checkbox Text (0x0100003D)

There’s also a rather special color called “System Owner” (0x01000037). This means “be the color of your owner” and lets you make opaque areas on system-textured backgrounds. We needed this when Windows XP made tab controls with a gradient fill and we wanted to make VIs like this:

You see, if the “Group Name” label’s background color was Transparent, then the frame would show through it:

If it was “System Panel & Object” color, then it would be a box of solid color on top of the gradient background:

The “System Owner” color solves this case. The System Label in the palettes uses this color as its background, so it is handy to use in situations like this.

6 Comments

And to expand on the last sentence of the post, you can drop a system label on the FP and then drag it to the BD to get the same effect. This can be useful if you have areas of the diagram which aren’t white and where you want the text to blend in, but still stand out.

Shawn – The Figure 2 example is shown on Windows XP; it may not show up as clearly on other operating systems. To recreate the example, use a System Tab Control, System Recessed Frame and System Label. If you want me to provide an example VI, let me know what version of LabVIEW you’re using!