Skip to content

Conversation

@mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jul 9, 2025

Screenshot 2025-07-09 at 3 54 46 PM

Opening this PR as a quick POC to test whether sequential color palettes can look good in dark mode using transparency, and it seems like they just work — thanks to d3-interpolate doing the right thing when given rgba(...).

Palette preview

Screenshot 2025-07-09 at 3 59 19 PM

Initial takeaways

  • A lot of existing palettes avoid going all the way to pure white or black, probably to stay somewhat neutral across themes — but that middle still ends up clashing in dark mode. Using alpha (e.g. fading to transparent) gives us a cleaner fallback.
  • I don’t want to change how any existing palettes render in light mode. Changing the output given the same data would be a soft compatibility break — and making things both backward-compatible and theme-aware might get tricky.
  • Easiest path forward: introduce new theme-aware palettes (e.g. "Safe Diverging", "Dark-Optimized Sequential") and mark older ones as “legacy”.

Experimenting

  • highjack the color scheme registry and flip the brightness (hsb) of the color if/when in dark mode
  • looks ok? unclear

Bonus: Categorical palettes

Our categorical palettes often cycle through a few base colors (say 5) and vary them with lightness to generate more (say 3 shades per base color → 15 total). We could explore using alpha here too — generating lighter/darker variants using opacity instead of tweaking RGB directly. Same caveats around preserving light-mode compatibility apply.

Opened this PR as a POC to see whether/how we can make sequential color palettes work in dark mode, and it seems to work out of the box.
@korbit-ai
Copy link

korbit-ai bot commented Jul 9, 2025

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

@mistercrunch
Copy link
Member Author

mistercrunch commented Jul 10, 2025

Experimenting with flipping the brightness on existing palettes:
Screenshot 2025-07-09 at 5 22 45 PM
Screenshot 2025-07-09 at 5 24 05 PM

@mistercrunch
Copy link
Member Author

gpt had some decent ideas around categorizing palettes in a fancier PalettePicker:

  • 🌒 Adaptive Palettes
  • 🧱 Fixed Palettes
  • 🎨 Legacy Palettes

@mistercrunch
Copy link
Member Author

🎪 @mistercrunch Creating ephemeral environment for commit e6657ab

Action: View workflow
Environment: e6657ab
Powered by: Superset Showtime

Building and deploying... Watch the labels for progress updates.

@mistercrunch
Copy link
Member Author

🎪 @mistercrunch Environment ready at http://52.1.2.3:8080

Environment: e6657ab
Credentials: admin / admin
TTL: 24h (auto-cleanup)

Feature flags: Add 🎪 conf-enable-ALERTS labels to configure
Updates: Environment updates automatically on new commits

Powered by Superset Showtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants