Update 25 August 2014: As described in this newer post, this is now part of the ipython-extensions repository.
Sometimes it’s more pleasant to read light text on a dark background, particularly when dealing with code. However, depending on ambient lighting, it can be necessary to switch back to dark text on a light background on short notice.
To make this possible, I created a simple extension for the IPython notebook (version 2.0 and above). It adds a button to the toolbar that toggles between a light (default) and dark display mode for code cells in the notebook, with an optional keyboard shortcut.
This turns
into
Details and installation instructions are in the GitHub repository.