Comment
New Contributor

I love this, but it is not dark mode friendly.  I even tried to get Genie to find a workaround.  Has anyone found a way to have it display correctly when this is enabled?

Screenshot 2026-04-28 111700.png

Summary of what we learned:

Databricks %md-sandbox in dark mode applies an automatic color transformation at a level external to the cell content. We tested 5 approaches and none could override it:

  1. @media (prefers-color-scheme: dark) — doesn't fire
  2. light-dark() CSS function — not supported
  3. JavaScript DOM manipulation — <script> tags appear stripped/non-functional
  4. CSS filter property — blocked on inline styles
  5. Pre-compensated color math — no effect (confirming scripts don't execute)