Platforms to show: All Mac Windows Linux Cross-Platform

WinGetSysColorMBS(Index as Integer) as Color

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Windows MBS Win Plugin 16.2 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Retrieves the current color of the specified display element.

Display elements are the parts of a window and the display that appear on the system display screen.

Index: The display element whose color is to be retrieved. This parameter can be one of the following values.

NameValueMeaning
COLOR_3DDKSHADOW21Dark shadow for three-dimensional display elements.
COLOR_3DFACE15Face color for three-dimensional display elements and for dialog box backgrounds.
COLOR_3DHIGHLIGHT20Highlight color for three-dimensional display elements (for edges facing the light source.)
COLOR_3DHILIGHT20Highlight color for three-dimensional display elements (for edges facing the light source.)
COLOR_3DLIGHT22Light color for three-dimensional display elements (for edges facing the light source.)
COLOR_3DSHADOW16Shadow color for three-dimensional display elements (for edges facing away from the light source).
COLOR_ACTIVEBORDER10Active window border.
COLOR_ACTIVECAPTION2Active window title bar.
Specifies the left side color in the color gradient of an active window's title bar if the gradient effect is enabled.
COLOR_APPWORKSPACE12Background color of multiple document interface (MDI) applications.
COLOR_BACKGROUND1Desktop.
COLOR_BTNFACE15Face color for three-dimensional display elements and for dialog box backgrounds.
COLOR_BTNHIGHLIGHT20Highlight color for three-dimensional display elements (for edges facing the light source.)
COLOR_BTNHILIGHT20Highlight color for three-dimensional display elements (for edges facing the light source.)
COLOR_BTNSHADOW16Shadow color for three-dimensional display elements (for edges facing away from the light source).
COLOR_BTNTEXT18Text on push buttons.
COLOR_CAPTIONTEXT9Text in caption, size box, and scroll bar arrow box.
COLOR_DESKTOP1Desktop.
COLOR_GRADIENTACTIVECAPTION27Right side color in the color gradient of an active window's title bar. COLOR_ACTIVECAPTION specifies the left side color. Use SPI_GETGRADIENTCAPTIONS with the SystemParametersInfo function to determine whether the gradient effect is enabled.
COLOR_GRADIENTINACTIVECAPTION28Right side color in the color gradient of an inactive window's title bar. COLOR_INACTIVECAPTION specifies the left side color.
COLOR_GRAYTEXT17Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color.
COLOR_HIGHLIGHT13Item(s) selected in a control.
COLOR_HIGHLIGHTTEXT14Text of item(s) selected in a control.
COLOR_HOTLIGHT26Color for a hyperlink or hot-tracked item.
COLOR_INACTIVEBORDER11Inactive window border.
COLOR_INACTIVECAPTION3Inactive window caption.
Specifies the left side color in the color gradient of an inactive window's title bar if the gradient effect is enabled.
COLOR_INACTIVECAPTIONTEXT19Color of text in an inactive caption.
COLOR_INFOBK24Background color for tooltip controls.
COLOR_INFOTEXT23Text color for tooltip controls.
COLOR_MENU4Menu background.
COLOR_MENUHILIGHT29The color used to highlight menu items when the menu appears as a flat menu (see SystemParametersInfo). The highlighted menu item is outlined with COLOR_HIGHLIGHT.
Windows 2000: This value is not supported.
COLOR_MENUBAR30The background color for the menu bar when menus appear as flat menus (see SystemParametersInfo). However, COLOR_MENU continues to specify the background color of the menu popup.
Windows 2000: This value is not supported.
COLOR_MENUTEXT7Text in menus.
COLOR_SCROLLBAR0Scroll bar gray area.
COLOR_WINDOW5Window background.
COLOR_WINDOWFRAME6Window frame.
COLOR_WINDOWTEXT8Text in windows.

The function returns the red, green, blue (RGB) color value of the given element.

Some examples using this global method:

The items on this page are in the following plugins: MBS Win Plugin.


The biggest plugin in space...