> For the complete documentation index, see [llms.txt](https://sryvkver.gitbook.io/cobi.bike/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sryvkver.gitbook.io/cobi.bike/namespaces/app/theme.md).

# Theme

The app color theme. This can be used to match the appearance of the COBI.Bike app in, for example, DevKit modules.

{% tabs %}
{% tab title="Typescript" %}

```typescript
const onThemeChange = (theme: Theme, timestamp?: Date) => {
    console.log(theme, timestamp);
};


COBI.app.theme.subscribe(onThemeChange);
COBI.app.theme.unsubscribe(onThemeChange);
```

{% content-ref url="/pages/QcUtJWdMnVee1QyFBRNR" %}
[Theme](/cobi.bike/entities/theme.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Javascript" %}

```javascript
const onThemeChange = (theme, timestamp) => {
    console.log(theme, timestamp);
};


COBI.app.theme.subscribe(onThemeChange);
COBI.app.theme.unsubscribe(onThemeChange);
```

{% endtab %}
{% endtabs %}

<details>

<summary>Example JSON</summary>

```json
{
    "baseColor": {
        "red": 0.0,
        "green": 0.0,
        "blue": 0.0
    },
    "identifier": "com.cobi.bike.theme.default",
    "bundleIdentifier": "com.cobi.bike.theme.default",
    "name": "Default",
    "accentColor": {
        "red": 0.0,
        "green": 0.0,
        "blue": 0.0
    },
    "backgroundColor": {
        "red": 0.0,
        "green": 0.0,
        "blue": 0.0
    },
    "logoUrl": "https://cdn.cobi.bike/cobi.js/0.44.0/images/logo.png"
}
```

</details>
