# ForeColor
{: .no_toc }

Returns the foreground colour the container would like its embedded controls to use by default, as an **stdole.OLE_COLOR**. Read-only.

Syntax: *object*.**ForeColor**

*object*
: *required* An object expression that evaluates to an **AmbientProperties** object.

A control that does not have its own foreground colour explicitly set should draw its text and other foreground elements using this colour, so that it remains legible against the container's [**BackColor**](/tB/Packages/VBRUN/AmbientProperties/BackColor.md). The value is an **OLE_COLOR**: an RGB value, a system-colour reference, or a palette-index reference. Pass it through [**TranslateColor**](/tB/Modules/Information/TranslateColor.md) to obtain a plain RGB value if needed.

### Example

This example responds to an ambient **ForeColor** change and applies it to the control's text color.

```tb check_build
Private Sub UserControl_AmbientChanged(PropertyName As String)
    Select Case PropertyName
        Case "ForeColor"
            UserControl.ForeColor = Ambient.ForeColor
    End Select
End Sub
```

### See Also

- [BackColor](/tB/Packages/VBRUN/AmbientProperties/BackColor.md) property
- [Font](/tB/Packages/VBRUN/AmbientProperties/Font.md) property
- [Palette](/tB/Packages/VBRUN/AmbientProperties/Palette.md) property
