# QTheme

Information noteSTABLE.   
  
This API is reliable and breaking changes are unlikely.

### Class

QTheme()

An object that encapsulates a theme. The object is identical to the original theme.json file but with calculated styling values and helper methods for the theme.

Information noteCalculated values are different than the values in the original JSON file of the theme.

Functions, variables and fallback logic are computed to return a final value that can be used for styling. For example, the original value for "color" can be a variable like "@B80", whereas the calculated value then might be "#CCCCCC".

## Version history

Version history

| Version state | Details |
| --- | --- |
| Introduced | Qlik Sense February 2018 |

## Returned properties

### id

Type: String

Theme ID.

### properties

Type: Object

Theme properties tree structure with calculated styling values.

Functions, variables and inheritance have been computed from the original theme JSON file.

[Custom theme JSON properties](https://help.qlik.com/en-US/sense-developer/November2025/Subsystems/Extensions/Content/Sense_Extensions/CustomThemes/custom-themes-properties.htm)

Example of returned properties

```
QTheme {
  id: "my-theme",
  properties: {
    "color": "#000",
    "fontSize": "12px",
    "backgroundColor": "#999",
    "object" : {
      "title": {
        "main": {
          "fontSize" : "13px"
        }
      },
      "pieChart": {
        "title": {
          "main": {
            "fontSize" : "16px"
          }
        }
      }
    }
  }
}
```

## Example

```
app.theme.get('my-theme-id').then(function(qtheme){
  alert('Theme background color: ' + qtheme.properties.backgroundColor);
});
```