QuantEcon / quantecon-book-theme

A Jupyter Book Theme for QuantEcon Book Style Projects
BSD 3-Clause "New" or "Revised" License
38 stars 19 forks source link

[review] Dark Mode -- Figure Contrast for Transparent Section of Image #37

Open mmcky opened 3 years ago

mmcky commented 3 years ago

Is there a way to control background for the transparent components of the generated images?

See first generated image in

https://quantecon.github.io/lecture-python-programming.myst/numba.html

with dark mode enabled.

The axis data is a bit difficult to read.

DrDrij commented 3 years ago

Yes we can, we can use a filter to invert the colours. Here are two examples from that page:

image image

For self reference

filter: invert(100%) hue-rotate(-180deg) !important;
-ms-filter: invert(100%) !important;
-webkit-filter: invert(100%) hue-rotate(-180deg) !important;
mmcky commented 3 years ago

thanks @DrDrij that looks like a big improvement

mmcky commented 3 years ago

@DrDrij - just fyi - the preview on that commit doesn't seem to have taken effect for images

https://5f8437440d7ad18f9eee916c--hungry-lovelace-7d0512.netlify.app/matplotlib.html