---
title: "updateThemeColor"
description: "API reference for the updateThemeColor function."
version: "0.10.1"
---

## updateThemeColor (v0.9.10)

##### Description

A function that updates the `html:theme-color` of the page by setting the `html:content` attribute on the HTML `html:theme-color` meta-tag.

If a `<Sheet.Backdrop>` with `themeColorDimming="auto"` is presented when the update is made, only the underlying `html:theme-color` will be updated, preserving the dimming.

##### Parameters

| **Type**                                                                   | **Description**                                            |
| -------------------------------------------------------------------------- | ---------------------------------------------------------- |
| `string` (color expressed in the `rgb()`, `rgba()`, or hexadecimal format) | Required. The color the `html:theme-color` will be set to. |

##### Example

```tsx
updateThemeColor("#000000");
```
