# 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="../../entities/theme" %}
[theme](https://sryvkver.gitbook.io/cobi.bike/entities/theme)
{% 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>
