[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'InterfaceBase' (#lcl)

# TWidgetSet.GetSysColor

Retrieves the system color for standard display elements.

## Declaration

Source position: winapih.inc line 146

`public function TWidgetSet.GetSysColor(`
`nIndex: Integer`
`):DWORD; virtual;`

## Arguments

`nIndex` |  | The system color type.

## Function result

The RGB color.

## Description

These are the available display elements:

- COLOR_3DDKSHADOW
- COLOR_3DFACE, COLOR_BTNFACE
- COLOR_3DHIGHLIGHT, COLOR_3DHILIGHT, COLOR_BTNHILIGHT, COLOR_BTNHIGHLIGHT
- COLOR_3DLIGHT
- COLOR_3DSHADOW, COLOR_BTNSHADOW
- COLOR_ACTIVEBORDER
- COLOR_ACTIVECAPTION
- COLOR_APPWORKSPACE
- COLOR_BACKGROUND, COLOR_DESKTOP
- COLOR_BTNTEXT
- COLOR_CAPTIONTEXT
- COLOR_GRADIENTACTIVECAPTION
- COLOR_GRADIENTINACTIVECAPTION
- COLOR_GRAYTEXT
- COLOR_HIGHLIGHT
- COLOR_HIGHLIGHTTEXT
- COLOR_HOTLIGHT
- COLOR_INACTIVEBORDER
- COLOR_INACTIVECAPTION
- COLOR_INACTIVECAPTIONTEXT
- COLOR_INFOBK
- COLOR_INFOTEXT
- COLOR_MENU
- COLOR_MENUHILIGHT
- COLOR_MENUBAR
- COLOR_MENUTEXT
- COLOR_SCROLLBAR
- COLOR_WINDOW
- COLOR_WINDOWFRAME
- COLOR_WINDOWTEXT

Since all returned values are valid colors, errors cannot be detected. GetSysColorBrush instead returns a zero handle on failure.

## See also

TWidgetSet.GetSysColorBrush |  | Retrieves a system brush for standard display elements.