GitHub user dosubot[bot] added a comment to the discussion: How to customize chart colors in embedded dashboards for multi-tenant SaaS application?
<!-- Greeting --> Hi @pedromelo222! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team. <!-- Answer --> There isn't an officially supported way in Superset 5.0.0 to programmatically set chart color palettes for embedded dashboards via the frontend or the embedded SDK. The SET_THEME event and similar postMessage events only affect UI theming (like CSS variables and Ant Design tokens), not the color palettes used by chart plugins for data series [reference](https://github.com/apache/superset/issues/32357). Chart color schemes are managed by the ColorSchemeRegistry and are injected at chart render time. There is no public runtime API to override these from the embedding context [reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/packages/superset-ui-core/src/color/ColorSchemeRegistry.ts). A known workaround is to inject custom CSS into embedded dashboards using a custom postMessage handler and script injection via `superset_config.py`, but this is considered a hack and may not reliably change chart colors for all chart types, especially those rendered with canvas or SVG [reference](https://github.com/apache/superset/issues/32357). For robust multi-tenant branding, you would likely need to pre-configure dashboards or charts per tenant in Superset, or extend Superset with a custom API or plugin. Recent changes like the ThemeController and ThemeEditor improve UI theming flexibility, but do not enable dynamic, per-tenant chart color palette injection via the embedded SDK [reference](https://github.com/apache/superset/pull/33420). If dynamic per-tenant chart color customization is critical, you may want to monitor future Superset releases for new embedding or theming APIs. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/921e293b-b732-4410-a05d-4646fcdfc5d4?feedback_type=other)</sup> [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34255) GitHub link: https://github.com/apache/superset/discussions/34255#discussioncomment-13836584 ---- This is an automatically sent email for notifications@superset.apache.org. To unsubscribe, please send an email to: notifications-unsubscr...@superset.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org