Theme

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

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


COBI.app.theme.subscribe(onThemeChange);
COBI.app.theme.unsubscribe(onThemeChange);
pageTheme
Example 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"
}

Last updated