<div class="meta" robots="noindex">

</div>

Method

# HighlightColor

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `Color.HighlightColor<color.highlightcolor>` as a replacement.

</div>

## Description

Returns the operating system's highlight color.

## Usage

*result*=**HighlightColor**

| Part   | Type                           | Description                        |
|--------|--------------------------------|------------------------------------|
| result | `Color</api/data_types/color>` | The user's chosen highlight color. |

## Notes

On Windows, the highlight color can be modified via the Display Control Panel. In macOS, the highlight color is set in the General System Preferences panel. On Linux, the highlight color is affected by the user's Window Manager and themes.

## Sample code

The following example uses the system highlight color to fill in a rectangle. The code is in the Paint event of a `Canvas</api/deprecated/canvas>`.

``` xojo
Const White = &cffffff

g.ForeColor = White
g.DrawLine(1, 1, g.Width, 1)
g.DrawLine(1, g.Height - 1, 1, 1)
g.ForeColor = DarkBevelColor
g.DrawLine(g.Width - 1, 2, g.Width - 1, g.Height)
g.DrawLine(1, g.Height - 1, g.Width, g.Height - 1)
' fill in the  rectangle
g.ForeColor = HighlightColor
g.FillRect(2, 2, g.Width - 3, g.Height - 3)
```

## Compatibility

All project types on all supported operating systems.

## See also

`Color.DarkBevelColor<color.darkbevelcolor>`, `Color.DarkTingeColor<color.darktingecolor>`, `Color.DisabledTextColor<color.disabledtextcolor>`, `Color.FillColor<color.fillcolor>`, `FrameColor,<color.framecolor>``Color.LightBevelColor<color.lightbevelcolor>`, `Color.LightTingeColor<color.lighttingecolor>`, `Color.TextColor<color.textcolor>` functions; `Color</api/data_types/color>` data type.
