openhands openhands commited on
Commit
c623c88
·
1 Parent(s): 73ebfec

Enable dark mode for Plotly charts with logo circle backgrounds

Browse files

- Add CSS filter-based dark mode support for all Plotly plots
- Invert chart colors when Gradio dark mode is active
- Re-invert company logo images to display correctly in dark mode
- Add light gray circular glow behind company logos for visibility
- Re-invert OpenHands branding logo and modebar icons

Co-authored-by: openhands <openhands@all-hands.dev>

Files changed (1) hide show
  1. content.py +27 -0
content.py CHANGED
@@ -1134,4 +1134,31 @@ h3 .header-link-icon {
1134
  font-size: 10px;
1135
  }
1136
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1137
  """
 
1134
  font-size: 10px;
1135
  }
1136
  }
1137
+
1138
+ /* ====== Dark Mode Plotly Charts ====== */
1139
+ /* Use filter-based inversion for reliable dark mode support */
1140
+ /* This inverts the entire chart and then re-inverts specific elements */
1141
+
1142
+ .dark .js-plotly-plot {
1143
+ filter: invert(0.88) hue-rotate(180deg);
1144
+ }
1145
+
1146
+ /* Re-invert company logo images so they display correctly */
1147
+ /* Also add a light gray circular glow behind them for visibility */
1148
+ .dark .js-plotly-plot .layer-above image,
1149
+ .dark .js-plotly-plot .imagelayer image {
1150
+ filter: invert(1) hue-rotate(180deg)
1151
+ drop-shadow(0 0 12px rgba(160, 165, 180, 0.95))
1152
+ drop-shadow(0 0 8px rgba(160, 165, 180, 0.9));
1153
+ }
1154
+
1155
+ /* Re-invert the OpenHands logo at bottom so it displays correctly */
1156
+ .dark .js-plotly-plot image[href*="openhands"] {
1157
+ filter: invert(1) hue-rotate(180deg);
1158
+ }
1159
+
1160
+ /* Modebar icons need re-inversion */
1161
+ .dark .js-plotly-plot .modebar {
1162
+ filter: invert(1) hue-rotate(180deg);
1163
+ }
1164
  """