Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night. This program is inspired by f.lux (read here for the reason why I started this project).
Latest release is redshift 1.7 published on 2011-07-04. There are also packages available for some distributions:
- Arch Linux: Package in the Arch Community Repository.
- Debian: Packages are included in Squeeze.
- Fedora: Packages are available from the official sources.
- FreeBSD: Package in the official Ports repository.
- Frugalware Linux: Package overview here.
- Gentoo: Package in the main package tree.
- Mandriva: Packages will be submitted it after 2010.1 is released.
- OpenBSD: Package is reportedly available from official sources.
- Ubuntu: Official packages for Ubuntu.
- Windows: Experimental builds (it’s a command line utility; be aware of windows limitations):
Project page (bug tracker)
This is the project page for redshift. Please report bugs or ask questions there.
Redshift adjusts the color temperature according to the position of the sun. A different color temperature is set during night and daytime. During twilight and early morning, the color temperature transitions smoothly from night to daytime temperature to allow your eyes to slowly adapt. At night the color temperature should be set to match the lamps in your room. This is typically a low temperature at around 3000K-4000K (default is 3700K). During the day, the color temperature should match the light from outside, typically around 5500K-6500K (default is 5500K). The light has a higher temperature on an overcast day.
On linux and similar systems the color temperature is set with an X server extension. On the windows platform it is set using GDI. The color temperature is changed by setting appropriate gamma ramps. If you have configured your own gamma ramps they will be overwritten but in that case you probably care too much about color accuracy to use this program anyway. Your graphics driver and X server needs to either support at least RANDR version 1.3 or the VidMode extension.
Redshift assumes that your screen will produce light at a color of 6500K when no color correction is applied by the program. Thus, 6500K is the neutral temperature. Setting the color temperature to a value higher than this results in more blue light, and setting a lower value will result in more red light.
Redshift will continously update the color temperature at regular intervals. One shot mode can be selected if you only want to do one adjustment. The color adjustments done by Redshift can be temporarily toggled on and off by sending it the USR1 signal:
$ pkill -USR1 redshift
The command line options are explained by running
redshift -h. All options have reasonable defaults. You’ll need to specify your current location only if redshift can’t obtain the location from an automatic location provider. All color adjustment methods will be tried until one that works is found unless you explicitly select one. The same applies to location providers.
Beware that the location providers are not perfect. In particular, the
gnome-clock method is a hack that extracts the location from configuration of the GNOME Clock applet. This happened to work at the time of implementation but YMMV. The
geoclue method provides a location through the Geoclue framework, which may or may not work out-of-the-box. If it doesn’t work check that your Geoclue installation is properly configured.
Example (location is Copenhagen, Denmark):
$ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v
A configuration file can be created, but the documentation is a bit sparse. You’ll have to create it manually. There’s an example here.
Start the program gtk-redshift instead of redshift, with the same arguments as you would pass to redshift. This will create an icon for Redshift in the system tray. The icon will allow you to toggle Redshift on and off. Thanks goes to the Tango Desktop Project for the icon. gtk-redshift requires at least Python 2.6 and PyGTK 2.12.
- Redshift Plasmoid for KDE provides a graphical configuration interface for Redshift.
Known bugs and limitations
- Redshift won’t affect the color of your cursor when your graphics driver is configured to use hardware cursors. Some graphics drivers have an option to disable hardware cursors in
Comments, suggestions, patches or donations will be greatly appreciated.