dodona-edu / papyros

📜 Scratchpad for Python and JS, running in the browser.
https://papyros.dodona.be/
MIT License
18 stars 8 forks source link

Invert plots in dark mode #131

Closed pdawyndt closed 2 years ago

pdawyndt commented 2 years ago

Maybe we could consider to invert plots (Matplotlib) in dark mode:

img {
   -webkit-filter: invert(1);
   filter: invert(1);
}

turns

image

into

image

winniederidder commented 2 years ago

Matplotlib also supports a dark-background option (https://matplotlib.org/stable/gallery/style_sheets/dark_background.html) which could be used as an alternative. This would however require informing the Backend about whether it is run in dark mode and requires overriding a matplotlib method in this case. So this is only useful if there are obvious problems with the style method mentioned here. Examples would be users loading images (such as plt.imshow) which might not want this altering.

pdawyndt commented 2 years ago

Maybe we add some options to images: save to file, show full screen (or full screen popup), ...