Toggling the base colors of my theme
The color scheme of this site is based on Solarized: Precision colors for machine and people, where I had originally created this site based on having a light background.”
However, with my vision problems (cataracts), I don’t do well with bright things anymore. The explanation I’ve found is that I have the nuclear sclerosis form, which forms in the center of the lens, so pupil dialation gives me the opportunity to see around the cataract.
This seems to explain why when I’m self-conscious that I’ve noticed that I tend to appear to be looking to one side all the time when I’m walking.
As a result of this, I have been adjusting the settings on some of my computers to be less bright, and had found a chrome
extension called hacker vision. Though annoyingly for some reason the chrome webstore is immune to this extension, it
also doesn’t do anything for
file:// links. My normal
homepage is an html file of links that I’ve been
maintaining from back when my browser of choice was primarily netscape, before it had become IE for a while, and then
Though I don’t update it as much anymore, as I’ve been using Xmarks, though it since my departure from Firefox it hasn’t quite worked the same. Namely I had Firefox extensions to use different folders as my bookmark bar and other profile tricks, so the huge set of bookmarks sync’d by Xmarks had at least work and home profiles. I had tried Xmarks profile option, but it would frequently mess things up and I’ve had a few close calls of losing everything. But, its working for now that I haven’t looked for an alternative.
Anyways, I tweaked the color settings of my
Which brings me to this site. (but not my other sites, yet.) The Hacker Vision extension has its own scheme for ‘inverting’ a sites color scheme. But, its not the same as what can be done when using these precision colors.
I could swap out the CSS file for this page for ones that use a dark base scheme rather than the light base scheme (which
leaves the other colors of the site unaffected – i.e. red stays red.) Now there were two css files associated with this
site, and one was from a pair of
Solarized files For use with Jekyll and Pygments…forget where I had found them, but
think it there’s a github repo with for them. The other file handles the rest of my site. So I created a version of for
‘dark’. I used a sed line like this:
But, then it struck me that I should have a way to offer either scheme and have a control on the site to allow toggling between the two.
The mess can be tracked down on github, so I won’t bother will making this post any longer….