# Javascript: Footnote.setHighlightColor Method

> Sets the highlight color for the reference mark and the footnote mark.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 32.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Footnote.setHighlightColor Method
- **418 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/footnote/sethighlightcolor-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/footnote/sethighlightcolor-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/footnote/sethighlightcolor-method/llms-full.txt

---

### Description

Sets the highlight color for the reference mark and the footnote mark.

### Syntax

```javascript
<void> Footnote.setHighlightColor(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| value | The property value. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Footnote.setHighlightColor` in a practical document-editing workflow. It sets the highlight color for the reference mark and the footnote mark.

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

TXTextControl.footnotes.elementAt(0, function(footnote) {
    if (!footnote) {
        console.warn("No footnote is available.");
        return;
    }

    footnote.setHighlightColor(
        "#ffd54f",
        function() {
            console.log("set highlight color completed.");
        },
        onTxError
    );
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: Footnote.scrollToPosition Method](https://docs.textcontrol.com/ds-server/reference/javascript/footnote/scrolltoposition-method/llms-full.txt)
- **Next:** [Javascript: Footnote.setHighlightMode Method](https://docs.textcontrol.com/ds-server/reference/javascript/footnote/sethighlightmode-method/llms-full.txt)
