“Secret” LabVIEW System Colors

May 5th, 2010 by Christina in LabVIEW, User Interface

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.

  • Yair, that’s a neat trick! I hadn’t realized that worked on the diagram.

  • Hi Christina,

    I still cannot understand who you make opaque areas on system-textured backgrounds by using “System Owner” (0×01000037).

    “System Owner” (0×01000037) is same as “System Panel & Object” color, after I checked it.

    Could you explain more how you make the stlye just like figure 2 in your article.

    Thanks

  • 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!

  • Hi Christina,

    Thanks for your reply.

    I’ve found the “Label” in system decoration is the “System Owner” color. Wherever you put it, it will use the same color as owner.

    🙂

  • […] the group label is on top of a frame, adjust its colors. [See previous blog entry for details of coloring labels on […]

 

Comments have been closed for this post.