# FormattingStyle.ForeColor Property

> Gets or sets the style's color used to display the text.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 10.1
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > FormattingStyle.ForeColor Property
- **426 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/forecolor-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/forecolor-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/forecolor-property/llms-full.txt

---

### Description

Gets or sets the style's color used to display the text.

### Syntax

```csharp
public Color ForeColor { get; set; }
```

```vbnet
Public Property ForeColor As Color
```

### Examples

The following example creates a reusable emphasis style and adds it to the document by using `FormattingStyle.ForeColor`.

```csharp
FormattingStyle formattingStyle = new InlineStyle("Emphasis");

formattingStyle.ForeColor = System.Drawing.Color.LightSteelBlue;
Console.WriteLine($"Fore Color used by Formatting Style: {formattingStyle.ForeColor}");

textControl.InlineStyles.Add((InlineStyle)formattingStyle);
```

```vbnet
Dim formattingStyle As FormattingStyle = New InlineStyle("Emphasis")

formattingStyle.ForeColor = System.Drawing.Color.LightSteelBlue
Console.WriteLine($"Fore Color used by Formatting Style: {formattingStyle.ForeColor}")

textControl.InlineStyles.Add(DirectCast(formattingStyle, InlineStyle))
```

---

## Nearby

- **Previous:** [FormattingStyle.FontSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/fontsize-property/llms-full.txt)
- **Next:** [FormattingStyle.Italic Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/formattingstyle/italic-property/llms-full.txt)
