I'm writing a book using Texifier, which supports dark mode on my Mac. I thought it would be amazing to have the book show nicely in both dark and light modes. I have made no effort in trying to make the document compatible with dark mode, and yet since most figures are created using tikz/pgfplots (vector graphics), they actually look nice out from the start (see images). However, I think colors can be nicer, but I'm not sure how to go about this. I think that having to compile two different documents is not the way to go, since it involves too much effort from the user. Choosing colors that look good in both modes may be a better option, but I'm not sure there are color themes (in colorbrewer for instance) that have been designed accordingly. This option would definitely solve, for instance, the issue with the hyperref links you see in the images. Since I couldn't find anything about this on the web (except for this post), I decided to ask for recommendations for creating such document. Perhaps it would be nice to have a
dark tag as well, which I couldn't find. The question:
- How do you prepare in LaTeX a document that can be properly viewed in both light/dark modes? Since this is not a built-in functionality of LaTeX, the question refers design rules regarding the libraries normally used (hyperref, pgfplots, tikz, choice of colors, etc.). I would not like to have a solution that involves conditional compilation on a dark/light flag in the preamble, but rather an automated approach.