Option Dark Mode UI Only - Keep for UI, but disable for Cards

Dark mode affects both the UI and styles for cards. Dark mode can be previewed to see how it affects cards by going to a note (or add note) and toggling Dark Mode from the drop down arrow.

This kills custom font and background color customizations users might want to keep. I only want dark mode for the menu UI, not for cards.

In the app preferences window, please add another checkbox box, nested under Night Mode, that makes it so Night Mode only affect the UI and not cards.

This answer is not a solution, but maybe useful: There’s an add-on that allows to disable night mode for notes/cards (on Anki for PC) if you add a special tag to them: disable_night_mode_temporarily_by_tag.py. It’s not on ankiweb but you have to install it manually. I haven’t tried it with the latest Anki version but it should still work.

This add-on was made by the user /u/yumenotogoshi (reddit)/hikaru-y (github)/ hkr (this forum) who as posted many very useful snippets for add-ons and js in the templates.

1 Like

This is from memory so it may not be 100% correct. I used to do something like that but my cards are 100% LaTeX (using svg option) so it may or may not work for you. Add the following to your card styling. I think this un-does the adjustments for night mode. I think one inverts the images back to what they were, and the other inverts the css affects. Not a dev. Found code like this on the internet. The background-color sets the color white.

.card.nightMode { 

 background-color: white; 

 -webkit-filter: invert(100%); 
   filter: invert(100%); 

Putting in the same stuff from .card { } inside card.nightMode { } did the trick, thank you.