Rails

Dark color scheme for Ruby on Rails errors

27 Apr 2019
1 minute read

A small contribution to Ruby on Rails, which enables it to regard the OS setting for dark/light appearance when displaying errors.

It uses the prefers-color-scheme CSS media query which is currently supported by Firefox and Safari and in development for Chrome.

Essentially when you crunch it deep at night and don’t want to burn your retinas, thus have enabled dark mode for your OS, it changes this …

Rails error page, light color scheme
Rails error page, light color scheme

… into this

Rails error page, light color scheme
Rails error page, light color scheme

That feature has since been merged into Rails, you can find the Pull Request on Github.