Color
- Updated2025-04-09
- 1 minute(s) read
Color
Color values are typically four-byte integers and commonly use little-endian and big-endian format. Microsoft Windows and ActiveX use the little-endian format, which stores red, green, and blue color components in the 0x00BBGGRR byte positions. LabVIEW and LabWindows/CVI use the big-endian format, which stores the color components in the 0x00RRGGBB byte positions.
If you are specifying a color value in an expression, you can use a predefined little-endian color constant, such as tsRed or tsDarkBlue. Refer to Constants»Color on the Operators/Functions tab of the Expression Browser dialog box for the list of available expression color constants. Use the ConvertColor expression function to convert the two color value formats.
Some Windows and ActiveX functions support specifying a system color using the 0x800000xx byte format, where xx is a valid Win32 GetSysColor index. The possible values are listed below.
- 0x00bbggrr—Where bb specifies the intensity of the color blue, gg specifies the intensity of the color green, and rr specifies the intensity of the color red.
-
0x800000xx—Where
xx
is a valid Win32
GetSysColor
index. The possible values are listed below.
Constant Value COLOR_SCROLLBAR 0 COLOR_BACKGROUND 1 COLOR_ACTIVECAPTION 2 COLOR_INACTIVECAPTION 3 COLOR_MENU 4 COLOR_WINDOW 5 COLOR_WINDOWFRAME 6 COLOR_MENUTEXT 7 COLOR_WINDOWTEXT 8 COLOR_CAPTIONTEXT 9 COLOR_ACTIVEBORDER 10 COLOR_INACTIVEBORDER 11 COLOR_APPWORKSPACE 12 COLOR_HIGHLIGHT 13 COLOR_HIGHLIGHTEXT 14 COLOR_BTNFACE 15 COLOR_BTNSHADOW 16 COLOR_GRAYTEXT 17 COLOR_BTNTEXT 18 COLOR_INACTIVECAPTIONTEXT 19 COLOR_BTNHIGHLIGHT 20 COLOR_3DDKSHADOW 21 COLOR_3DLIGHT 22 COLOR_INFOTEXT 23 COLOR_INFOBK 24 COLOR_HOTLIGHT 26 COLOR_GRADIENTACTIVECAPTION 27 COLOR_GRADIENTINACTIVECAPTION 28 COLOR_MENUHILIGHT 29 COLOR_MENUBAR 30