Example Code

Get Mac System Colors in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Description

1. Overview

This VI shows what colors change when you change the System Appearance by asking for the theme colors from Mac OS X directly from a system library.

 

2. Description

These VIs utilize the Call Library Function Node to directly grab all of the information needed from the OS for the different colors. The Call Library Function Node needs necessary input parameters to return the Theme Brush color, the Theme Text color, or a series of system colors from the OS directly which can be seen in the SubVIs included in the Zip folder. Another example which is included in the Zip folder is an example which shows you what system colors change when you change the system appearance.

 

3. Requirements

  • NI LabVIEW Professional Development System for Mac 2012 or compatible.
  • Mac OS X operating system.

 

4. Steps to Implement or Execute Code

  1. Download and open the compressed file project “Show System Colors LabVIEW for Mac 2012 NIVerified.lvproj”
  2. Open “Show System Colors LabVIEW for Mac 2012 NIVerified.vi”
  3. Run the VI.
  4. Right-Click on System Colors and select Data Operations -> Make Current Value Default.
  5. Quit LabVIEW, change the Appearance colors (Apple Menu -> System Preferences -> Appearance).
  6. Relaunch LabVIEW and run this VI again.
  7. Make Show All true to show all theme colors, not just the changed ones.

 

5. Additional Information or References

Show System Colors Screenshot.png

 

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

For those with PPC (There are a lot of us out there....) can a version in LV 8.5.1 be posted?  I assume this doesn't use any of the latest LV 9 features.

LabVIEW ChampionLabVIEW Channel Wires

MarcPage
NI Employee (retired)
on

Scott,

Thanks for bringing that up. I've saved them for 8.5 and put the archive back up.

sth
Trusted Enthusiast Trusted Enthusiast
Trusted Enthusiast
on

Great, thanks!

LabVIEW ChampionLabVIEW Channel Wires