“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 (0×01000000) to designate a color as “symbolic.”

Several more system colors have been added since 7.0:

  • Title Bar Active (0×01000038)
  • Title Bar Inactive (0×01000039)
  • Title Bar Text Active (0×0100003A)
  • Title Bar Text Inactive (0×0100003B)
  • Radio Button Text (0×0100003C)
  • Checkbox Text (0×0100003D)

There’s also a rather special color called “System Owner” (0×01000037). 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.

Leave a comment