# Javascript: TXTextControl.getTextBackColor Method

> Gets the background color for the text.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.getTextBackColor Method
- **296 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/gettextbackcolor-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/gettextbackcolor-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/gettextbackcolor-method/llms-full.txt

---

### Description

Gets the background color for the text.

### Syntax

```javascript
<void> TXTextControl.getTextBackColor(<RequestColorStringCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives whether the background color for the text. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TXTextControl.getTextBackColor` in a practical document-editing workflow. It gets the background color for the text.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.getTextBackColor(
    function(color) {
        console.log("get text back color result:", color);
    },
    onTxError
);
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.getText Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/gettext-method/llms-full.txt)
- **Next:** [Javascript: TXTextControl.getTextFields Method](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/gettextfields-method/llms-full.txt)
