# Javascript: PageBorder.getTopLineColor Method

> Gets the color of the top border line.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 26.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: PageBorder.getTopLineColor Method
- **382 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/gettoplinecolor-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/gettoplinecolor-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/gettoplinecolor-method/llms-full.txt

---

### Description

Gets the color of the top border line.

### Syntax

```javascript
<void> PageBorder.getTopLineColor(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the color of the top border line. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `PageBorder.getTopLineColor` in a practical document-editing workflow. It gets the color of the top border line.

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

function inspectTopLineColor(pageBorder) {
    pageBorder.getTopLineColor(
        function(result) {
            if (result) {
                console.log("get top line color is available.");
            } else {
                console.warn("get top line color is not available in the current document state.");
            }
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: PageBorder.getTopDistance Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/gettopdistance-method/llms-full.txt)
- **Next:** [Javascript: PageBorder.getTopLineWidth Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/pageborder/gettoplinewidth-method/llms-full.txt)
