> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Colors

> How to customize colors in Atoti UI by registering custom themes via configuration.themes in index.ts, selecting them via the CoreSettings theme property in the Settings popup, and applying a ThemeProvider in standalone React integrations.

The colors of a user or group of users can be configured using the `theme` setting. The valid values for this setting are *"light-activeviam"*, *"dark-activeviam"*, *"system"* and the keys of the registered custom themes. *"system"* follows the color scheme preferred by the browser or the operating system. See [**CoreSettings**](https://docs.activeviam.com/data-visualization/atoti-ui/5.2/developer-guide/reference/types.md#coresettings)

## Create a custom theme

This section applies if you are using the Atoti UI starter. If you are not, then read [Use a custom theme in Atoti UI components integrated into a different application](#use-a-custom-theme-in-atoti-ui-components-integrated-into-a-different-application). If you plan to use the Atoti UI starter but don't know how to, read [Setup](https://docs.activeviam.com/data-visualization/atoti-ui/5.2/developer-guide/install-and-start/set-up.md) first then come back here.

In order to create a custom theme, add its definition to your `activate` function in `index.ts`:

```ts theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
configuration.themes["custom"] = {
  primaryColor: "#9900ff",
};
```

This is a basic example. Refer to [Theme](https://docs.activeviam.com/data-visualization/atoti-ui/5.2/developer-guide/reference/types.md#theme) for a list of all the attributes that can be configured in this file.

> [!NOTE]
>
> The key of your theme is up to you, it does not have to be `"custom"`.

### Use a custom theme

Once registered, your custom theme appears in the [Settings popup](https://docs.activeviam.com/data-visualization/atoti-ui/5.2/user-guide/navigate-atoti-ui/settings.md#open-the-settings-popup) alongside the built-in Light and Dark themes and can be selected from there. You can also set its key as your `theme` setting. See [Settings](https://docs.activeviam.com/data-visualization/atoti-ui/5.2/developer-guide/customize-atoti-ui/user-settings.md).

### Custom theme thumbnail

To provide a preview image for your theme in the **Settings** popup, add a PNG file named after your theme key to the `public/` folder of your project:

```
{themeKey}-theme.png
```

For example, for a theme registered as `"custom"`, the file should be named `custom-theme.png`.

> [!NOTE]
>
> The image is rendered at **160×86px**. You should provide it at a higher
> resolution (the built-in thumbnails are around 512×275px).

## Use a custom theme in Atoti UI components integrated into a different application

This more advanced section is only useful if you are **NOT** using the Atoti UI starter.

To use a custom theme in Atoti UI components integrated into a different application, add a [ThemeProvider](https://docs.activeviam.com/data-visualization/atoti-ui/5.2/developer-guide/reference/context-providers.md#themeprovider) above these components:

```tsx theme={"languages":{"custom":["/engine/python-sdk/6.2/languages/pycon.tmLanguage.json"]}}
import { ThemeProvider } from "@activeviam/atoti-ui-sdk";

const customTheme = {
  primaryColor: "#9900ff",
};

return (
  <ThemeProvider value={customTheme}>
    <App />
  </ThemeProvider>
);
```
