# TextBkColor Property

> Returns or sets the background color of the selected text in the TXTextControl as an RGB color from 0 to &HFFFFFF; BackColor sets the window color.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > TextBkColor Property
- **223 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/textbkcolor-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/textbkcolor-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/textbkcolor-property/llms-full.txt

---

Returns or sets the background color for selected text. Text Control uses the Microsoft Windows operating environment red-green-blue (RGB) color scheme.

### Syntax

```vbscript
TXTextControl.TextBkColor [= value]
```

### Data Types

Long.

### Remarks

The TextBkColor property applies only to the currently selected text. The [BackColor](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/backcolor-property/llms-full.txt) property can be used to set the window background color. The valid range for a RGB color is 0 to &HFFFFFF. The high byte of a number in this range equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. The red, green, and blue components are each represented by a number between 0 and 255 (&HFF).

### See Also

- [FormatSelection Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt)
- [BackColor Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/backcolor-property/llms-full.txt)
- [Programming Category: Character Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/character-formatting/llms-full.txt)

---

## Nearby

- **Previous:** [Text Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/text-property/llms-full.txt)
- **Next:** [TextDirection Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/textdirection-property/llms-full.txt)
