Your melatonin levels follow the sun, so should you browser!
Melatonin for Chrome keeps your browser's color temperature in tune with the sun. It overlays webpages with a warm film during the evening and at night, and a cold film during the day in order to ease the strain of a backlit screen on your eyes. Blue light has been shown to interfere with your sleep pattern, and so Melatonin aims to create a more natural browsing experience.
Automatic color updating is done by calculating the sun's altitude in the sky based on time of day and geolocation.
I made Melatonin for use on my Chromebook. I hope you too will find it useful.
This extension and its source code is freely available on https://github.com/giraj/melatonin.
If you are running Windows, OS X or Linux, usually there are better solutions. Check out F.lux or Redshift. I made Melatonin with ChromeOS in mind.
When loading a new page, the overlay isn't usually instantaneous. This is because the overlay is being created by a script that is injected into the webpage you're visiting, and it is run only after the document has reached a certain point in loading (as specified by "run_at" : "document_start"). Often this is quite quick, it should load before images and most of the page load (when the DOM is ready). However, it varies and depends on the page you're visiting.
Due to not being able to overlay the chrome interface itself, special pages such as "about_blank", extensions, bookmarks, etc.. are unaffected. This also means there is a blank white page between pageloads that I am unable to overlay.
To avoid white flashes between pageloads especially, I try to open new links in new tabs. When I change tab a moment later, usually the overlay has finished.