{"id":15106909,"url":"https://github.com/krassowski/anki-night-mode","last_synced_at":"2025-09-27T05:31:26.176Z","repository":{"id":29967697,"uuid":"33514597","full_name":"krassowski/Anki-Night-Mode","owner":"krassowski","description":"Enabling studying at night with Anki - without eye strain","archived":true,"fork":false,"pushed_at":"2020-05-11T19:52:01.000Z","size":638,"stargazers_count":72,"open_issues_count":37,"forks_count":13,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-09-26T21:02:44.519Z","etag":null,"topics":["addon","anki","anki-addon","anki-night-mode","anki-theme","anki21","night-mode","python"],"latest_commit_sha":null,"homepage":"https://ankiweb.net/shared/info/1496166067","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krassowski.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-07T01:12:39.000Z","updated_at":"2023-09-18T14:45:21.000Z","dependencies_parsed_at":"2022-08-22T14:30:13.477Z","dependency_job_id":null,"html_url":"https://github.com/krassowski/Anki-Night-Mode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2FAnki-Night-Mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2FAnki-Night-Mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2FAnki-Night-Mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2FAnki-Night-Mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krassowski","download_url":"https://codeload.github.com/krassowski/Anki-Night-Mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234391379,"owners_count":18824809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["addon","anki","anki-addon","anki-night-mode","anki-theme","anki21","night-mode","python"],"created_at":"2024-09-25T21:03:03.646Z","updated_at":"2025-09-27T05:31:20.887Z","avatar_url":"https://github.com/krassowski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anki-Night-Mode\n[![Build Status](https://travis-ci.org/krassowski/Anki-Night-Mode.svg?branch=master)](https://travis-ci.org/krassowski/Anki-Night-Mode) [![Code Climate](https://codeclimate.com/github/krassowski/Anki-Night-Mode/badges/gpa.svg)](https://codeclimate.com/github/krassowski/Anki-Night-Mode)\n\nThis plugin adds a functionality of night mode, similar to the one implemented in AnkiDroid app.\n\n## Archiving note\n\nRecent versions of Anki (2.1.20+) introduced built-in Night Mode support. While it does not have all the features that this add-on offered, it causes fewer conflicts and does not require a never-ending maintenance burden due to the limited add-ons API and breaking changes in the interfaces. You are advised to upgrade Anki and use the built-in night mode instead of this add-on; please report any missing features to the Anki authors.\n\nTo prevent user confusion this repository has been archived but you are welcome to install the old versions as legacy support, or to contact the author (who still uses Anki) if you wish to port this add-on to a newer version ([see this issue](https://github.com/krassowski/Anki-Night-Mode/issues/101#issuecomment-626913211)).\n\nIt was fun 5 years; many thanks to all contributors listed [here](https://github.com/krassowski/Anki-Night-Mode/blob/master/night_mode/night_mode.py#L25-L38) and [there](https://github.com/krassowski/Anki-Night-Mode/graphs/contributors) and to all of you: friendly users who encouraged developement and maintenance.\n\n### How it works?\n\nIt adds a \"view\" menu entity with options like:\n- Automatic (i.e. at specified time) or manual switching of the night mode\n- Inverting colors of images or latex formulas\n- Defining custom color substitution rules\n\nIt provides shortcut \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003en\u003c/kbd\u003e to quickly switch mode and color picker to adjust some of color parameters.\n\nAfter enabling the night mode, the add-on changes colors of menubar, toolbar, bottombars and content windows. Take a look at a screenshot at the bottom of this page to see an example.\n\n### Compatibility\n\nThe add-on supports Anki in 2.1 version. While there is an older version of the add-on written for Anki 2.0, it is no longer supported as Anki 2.0 uses [well oudated and unsecure](https://github.com/krassowski/Anki-Night-Mode/issues/79#issuecomment-517806633) technology which lead to a large number of [difficult do diagnose issues](https://github.com/krassowski/Anki-Night-Mode/issues?utf8=✓\u0026q=+label%3Aold-version+).\n\n### How can I get it?\n\n#### Automatic install\n\nYou can download this add-on from within the Anki app.\nFrom menu select: `Tools \u003e\u003e Add-ons \u003e\u003e Browse \u0026\u0026 Install...` and type the following code:\n\n```python\n1496166067\n```\n\nafter clicking `ok` the add-on will be downloaded and installed. You neeed to restart Anki to enable changes.\n\nTo switch into the night mode you can use \u003ckbd\u003ectrl\u003c/kbd\u003e+\u003ckbd\u003en\u003c/kbd\u003e shortcut, or use one of the new options in the menu: `View \u003e\u003e Night Mode \u003e\u003e ...`.\n\n#### Manual installation\n\nFor the most recent updates and additions you may want to install a newer version of this addon manually.\nFollow this steps:\n\n1. Get the newest version of `night_mode` directory from GitHub\n2. Run Anki, from menu select `Tools \u003e\u003e Add-ons \u003e\u003e Open Add-ons Folder...` to open add-ons directory\n4. Copy downloaded directory into the directory opened in the previous step\n5. Restart Anki and enjoy the latest features!\n\n#### After installation\n\nPlease, leave any feedback on [Anki webpage](https://ankiweb.net/shared/info/1496166067) or let me know of any issues here, on GitHub.\n\n### Preview\n\n![Preview](https://raw.githubusercontent.com/krassowski/Anki-Night-Mode/master/preview.png)\n\n\n### Tags color in the edit window\n\nThe Mac OS users might experience an issue with the tags colors in the edit window. There are couple of workarounds proposed for this, one of which is disabling the edit widow styling and another (proposed [here](https://github.com/krassowski/Anki-Night-Mode/issues/59#issuecomment-517092923)) depends on a new functionality of Mojave system:\n\n- close Anki\n- paste the following command in the Terminal:\n```bash\ndefaults write net.ankiweb.dtop NSRequiresAquaSystemAppearance -bool no\n```\n- restart Anki\n\nThe application (including title bar) should be styled dark now and the tags box contrast problem should be resolved. Please let us know if it worked for you [here](https://github.com/krassowski/Anki-Night-Mode/issues/59).\n\n\n### For developers \u0026 translators\n\nFeel free to contribute, send bug reports or feature requests :)\n\nIf you can help translate the add-on to your language, please join us [at POEditor](https://poeditor.com/join/project/0waBVUY8oC).\n\n\n#### Custom CSS in night mode\n\nYou may use `night_mode` class, to overwrite some of the CSS rules; sometimes usage of `important!` directive or catch-all selector (`*`) will be needed to enforce you own styling. Examples:\n\n#### Change color of every piece of text:\n\n```css\n.night_mode * {\n    color: red;\n}\n```\n\n#### Change card background\n\n```css\n.night_mode.card {\n    background: red !important;\n}\n```\n\n#### Specifically replace a background of an element\n\ngiven the HTML of your card:\n\n```html\n\u003cdiv\u003eNormal text \u003cspan style=\"background-color: rgb(240, 244, 198);\"\u003ehighlighted text\u003c/span\u003e\u003c/div\u003e\n```\n\n```css\n.night_mode span[style=\"background-color: rgb(240, 244, 198);\"] {\n    background-color: red!important;\n}\n```\n\n#### Change the color of a cloze\n\n```css\n.night_mode .cloze {\n    color: red!important;\n}\n```\n\n### Add-ons compatibility\n\nAdd-ons which are known to work well with the night mode:\n- [Anki-TouchScreen](https://github.com/krassowski/Anki-TouchScreen)\n- [Anki-Zoom](https://github.com/krassowski/Anki-Zoom)\n\nIf you add-on works well Night Mode, please feel free to add your add-on on to the list above by editing this file (proposing a change)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrassowski%2Fanki-night-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrassowski%2Fanki-night-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrassowski%2Fanki-night-mode/lists"}