i2cute
i2cute

Reputation: 57

How can I change the colour theme for Apache Superset

I am deploying superset for my company and required to change the theme to blue. I have tried to follow the guide from https://debaatobiee.wordpress.com/2019/08/04/customizing-apache-superset-ui-config-theme-changes/ but still unsuccessful.

I have few questions in mind:-
1. Do we need to rebuild superset after amended variable.less?
2. If rebuild is required, if I upgraded to latest version in future, do I required to rebuild it again?

Upvotes: 1

Views: 7745

Answers (2)

gloccck18
gloccck18

Reputation: 116

Starting from Superset 1.1.0 it is possible to customize theme via the THEME_OVERRIDES in superset_config.py configuration file.

THEME_OVERRIDES = {
  "borderRadius": 4,
  "colors": {
    "primary": {
      "base": 'red'
    },
    "secondary": {
      "base": 'green'
    },
    "grayscale": {
      "base": 'orange'
    }
  }
}

The default theme values can be found in index.tsx file.

Please note that according to the given GitHub issue the structure of this configuration property is a subject for change and might be modified in the further Superset releases.

Upvotes: 4

meril
meril

Reputation: 582

You can make use of the docker version once you have made the changes. Use the docker-compose build command to create the new image.

1) Yes, you need to rebuild once you make changes

2) Yes, since you have a custom version, for every upgrade, you have to update the original files with your custom files and rebuild

Upvotes: 1

Related Questions