Twilight Dark adaptation from CodeMirror