Installing night-mode manually shows me error message

when i go to this website https://github.com/krassowski/Anki-Night-Mode and i downloaded the folder named [night_mode] and past it in the files of addons it shows me this error

how can i do to fix it

could you paste the error message text? You are only showing the first lines of text.

Anki has night mode builtin now and the plugin should not work anymore:

This plugin offered the function of night mode, similar to the one implemented in AnkiDroid*. It is no longer supported as newer Anki versions come with a built-in night mode. It remains here for the users who wish to continue to use it with older Anki versions. https://ankiweb.net/shared/info/1496166067

1 Like

The add-on works on anki versions older than 2.1.20
for other versions, like yours, it doesn’t work. you can enable the built-in night mode by opening Tools -> Preferences (or just press Ctrl + P) and enabling the Night mode

2 Likes

yep perfect i’ve enabled it, i wasn’t aware that it became a built-in mode sorry

Just to add that in case you want to style the cards and target only night mode I suggest to take a look at https://docs.ankiweb.net/#/templates/styling?id=night-mode

1 Like

@guillempalausalva “You can customize the way templates appear when night mode is enabled in the preferences screen.” when i opened preferecences i didn’t find where to customize what do they mean by preferences screen?

The sentence you quote from the Manual refers that the CSS code will only work if the nightmode is enabled in the preferences screen. You do not customize it there but on the card template. For instance .card.nightMode { background-color: #555; } will be at the styling tab (middle left window in template view).

2 Likes

@guillempalausalva ah that’s a great function thank you so much for sharing