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

</div>

Method

# FillColor

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

<div class="warning">

<div class="title">

Warning

</div>

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

</div>

## Description

The system's window background color.

## Usage

*result* = **FillColor**

| Part   | Type                           | Description                                                        |
|--------|--------------------------------|--------------------------------------------------------------------|
| result | `Color</api/data_types/color>` | The color used for drawing the background of controls and windows. |

## Notes

This value is useful when you are using `Canvas</api/deprecated/canvas>` controls to create custom controls. When drawing objects, use this color to fill the background.

This value can be changed by the user or when the system changes between light and dark modes, so you should use this method in the `Paint<canvas.paint>` event handler rather than storing the value.

FillColor matches the default Window Background on all platforms, except for macOS in DarkMode. Use `Graphics.ClearRectangle<graphics.clearrectangle>` to properly clear the window so that it's background color displays when using Dark Mode.

## Sample code

This example uses the system fill color to set the color of a square with a 3D "raised" look. The code is in the `Paint<canvas.paint>` event of a `Canvas</api/deprecated/canvas>`.

``` xojo
Const White = &cffffff
Const DarkGray = &c8c8c8c

g.ForeColor = White
g.DrawLine(1, 1, Me.Width, 1)
g.DrawLine(1, Me.Height - 1, 1, 1)
g.ForeColor = DarkGray
g.DrawLine(Me.Width - 1, 2, Me.Width - 1, Me.Height)
g.DrawLine(1, Me.Height - 1, Me.Width, Me.Height - 1)
' Fill in using the system Fill color
g.ForeColor = FillColor
g.FillRect(2, 2, Me.Width - 3, Me.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.FrameColor<color.framecolor>`, `Color.LightBevelColor<color.lightbevelcolor>`, `Color.LightTingeColor<color.lighttingecolor>`, `Color.HighlightColor<color.highlightcolor>`, `Color.TextColor<color.textcolor>` functions; `Color</api/data_types/color>` data type; `Canvas</api/deprecated/canvas>`, `Graphics</api/graphics/graphics>` classes; `Supporting Dark Mode</topics/user_interface/supporting_dark_mode>` topic.
