โ05-08-2023 01:42 PM
I am currently running dark mode for my Databricks Notebooks, and am using the "new UI" released a few days ago (May 2023) and the "New notebook editor."
Currently all plots (like matplotlib) are showing wrong colors.
For example, denoting:
```
...
plt.figure()
plt.axvline(x=0, color='red')
plt.axhline(y=0, color='red')
...
```
is resulting in teal colored axes. Images also seem to have their colors and hues mixed up.
Is there a way to fix this without giving up any of my current settings for the notebook environment?
โ05-10-2023 12:41 AM
Hi, Could you please provide a screenshot of the same which will help us understand it better?
Please tag @Debayanโ with your next comment so that I will get notified. Thank you!
โ05-10-2023 01:21 AM
@Debayan Mukherjeeโ
Thanks in advance.
Below is a very simple example of the issue.
I denote the colors "red" for the axes and "blue" for the actual plot, but end up with teal colored axes and a yellow plot.
This is the same for any type of non-text output in the notebook environment, including images, which is the main cause of concern as it can make modeling and other tasks a bit confusing.
Not sure if there is a setting I missed, or if this is some kind of an issue.
โ05-10-2023 10:16 PM
@Wonseok Choiโ thanks for the details. Could you please confirm if you have followed any documents on the same? (https://docs.databricks.com/visualizations/index.html)
โ08-11-2023 05:48 AM - edited โ08-11-2023 05:50 AM
Hello all,
Thank you @wschoi for reporting this issue. I've lost a lot of time trying to figure out if my image plotting was wrong.
โ06-16-2024 04:33 PM
Any updated on this issue? This is a huge drawback to use the dark theme
2 weeks ago
Still seeing this issue in dark theme June 2025
a week ago
Two years and counting, no solution to this obvious and very annoying problem so far.
Thursday
Hi Team, I just checked this post and tried out the above simple plot graph with dark mode UI. It is working as expected for me. Could you please check now?
Monday
Nope, just checked and the HTML on my notebook dashboard is still displaying wrong color in dark mode. works in light
Monday
@andreapeterson could you please share the screenshot along with the code?
Monday
Sure, attached is a small snippit of the worksheet along with 2 pics of display of the code
displayHTML("""
<link href="https://fonts.googleapis.com/css2?family=Mukta:wght@400;600&display=swap" rel="stylesheet">
<div style="font-family: 'Mukta', sans-serif; background-color: #fafafa; border-left: 6px solid #4435e6; padding: 16px 24px; border-radius: 8px;">
<h2 style="color: #080b15; margin-top: 0; font-weight: 600;">
๐ ML on Masked vs Unmasked Data with ALTR
</h2>
<p style="color: #4435e6; font-size: 16px; margin-bottom: 0;">
We compared model accuracy between a user with masked data access and full unmasked access.
</p>
</div>
<h2 style="
font-family: 'Mukta', sans-serif;
font-size: 20px;
font-weight: 600;
color: #4435e6;
margin-top: 24px;
">
Unmasked Training Run: <code style='color: #080b15;'>ml_privacy_team</code> group
</h2>
""")
Monday
Checking on it.
Monday
@andreapeterson, this is likely because the CSS invert filter is applied to certain output types. We have an existing internal ticket(PROD-51027) for this issue, and being worked on.
Either we have a plan to add a setting/toggle for this, which means either invert the colour or keep showing the white background while the site is in dark mode.
Tuesday
Ah okay, thank you!!
Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now