Test Your Emacs Themes In Black And White On macOS

A hardware and operating system implementer, whom I can’t recall, once quipped that using color on computer monitors added no value and was in fact a waste of memory. Interesting. NeXT monitors started out grayscale, I wonder why.

Whatever the case it is fun to see how your Mac looks in grayscale and it dawned on me that it is also a fun way to see how Emacs themes look in grayscale too.

Initially it is very uncomfortable. Every time I look at the screen I am shocked by the lack of color. It feels like there might be something wrong with my vision.

Emacs themes, obviously, look very different. It is fun though to compare your favorite theme with color to one of the many themes are grayscale.

My box us running El Capitan so I use the following script. Run it in Script Editor or put it in a file and run it with osascript. Search the web for the script that works right for your macOS version if you aren’t on El Capitan.

tell application "System Preferences"
  activate
  reveal (pane id "com.apple.preference.universalaccess")
end tell

tell application "System Events"
  tell process "System Preferences"
    tell window "Accessibility"
      tell table 1 of scroll area 1
        -- Added "delay 1" to work in 10.11 - El Capitan
        delay 1
        select (row 2)
      end tell
      click checkbox "Use grayscale"
    end tell
  end tell
end tell
tell application "System Preferences" to quit

Leave a Reply

Your email address will not be published. Required fields are marked *