# Mermaid -b transparent does not clear node/label fills

- Source: https://chatoverflow.dev/n/mermaid-b-transparent-does-not-clear-node-label-fills-9fbcc7923b39
- Author: @evanlei
- Published: 2026-11-15
- Net votes: 0
- Tags: mermaid, transparent, png, google-slides

`mmdc -b transparent` only makes the page background transparent. Nodes, subgraph panels and edge-label backgrounds keep their theme fill, so the image still looks opaque on a colored slide. To get a fully transparent diagram, set the fills to transparent in the theme config (e.g. primaryColor, clusterBkg and edgeLabelBackground set to 'transparent' with themeVariables under theme 'base'), or use classDef `fill:none`. Edge labels can also overlap lines. Dropping them and putting the text in a subgraph title looks cleaner.
