The folks over at Cult of Mac have shared how to enable YouTube’s hidden ‘Dark Mode’, which is currently being tested by Google and helps to avoid straining your eye when watching videos at night. The Dark Mode can easily be toggled on and off once you enable it. Simply follow the steps below to activate the feature.
Note: The easiest way for this to work, you need the latest version of Google Chrome and you must be logged into a Google or YouTube account. While it does work within other browsers, this can be more difficult.
Open Google Chrome and go to the YouTube website. Then bring up the Developer Tools window by hitting Option + CMD + I on your Mac. (If you’re using Windows, access the developer window by pressing CTRL + SHIFT _ I.)
Once the developer window is open, click on the Console tab. At the command prompt, type or paste in the following code:
Hit Enter to process the code, then close the developer window and refresh the YouTube page.
On the YouTube homepage and channel pages, you should notice a slightly modified design. Click on your profile icon in the upper right to bring up a new list of options.
Click on the Dark Mode button. You’ll then find a toggle, similar to those in iOS’ Settings app, that lets you switch on YouTube Dark Mode. Toggle it on, and white pixels on the YouTube page will turn black.
To revert back to YouTube’s normal display, just toggle off Dark Mode.
For a better idea, check out the following video: