Redshift

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).

Download

Latest release is redshift 1.7 published on 2011-07-04. There are also packages available for some distributions:

Project page (bug tracker)

This is the project page for redshift. Please report bugs or ask questions there.

Project description

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.

Redshift running in one-shot mode

Technical details

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.

Configuration options

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

Configuration file

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.

Status icon

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 status icon

Redshift status icon

Related software

  • 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 xorg.conf.

Comments, suggestions, patches or donations will be greatly appreciated.

  • Kim Mason

    Hi Alex, Redshift support for Windows is somewhat experimental. There’s another app called f.lux that has very good windows support; I recommend giving that a try.

  • Mhnkmr

    Thanks kim…..
    Yes, you were right. My problem got solved after using the -l option.

  • Mhnkmr

    Thanks!
    Its now working…….

  • http://www.facebook.com/Doc.SackMan Sawney Bean

    Really good. Makes a real difference to user experience. Should be in by default.

  • Pingback: How to: setup Redshift to be like f.lux | Bad GNU/Linux Advice

  • boosook

     Or what? :)

  • pavel

    I see the same behaviour. Therefore I have to use flux on Ubuntu instead of redshift.

  • http://jonls.dk/ Jon Lund Steffensen

    I don’t know what version of redshift you are using so I don’t know where you are getting the location from (run with -v in terminal to see). Anyway, the most reliable way is still to specifiy the location manually. The gnome clock method was a dirty hack and if it still works that is a mere coincidence. The geoclue method is the new way of getting the location automatically, unfortunately this solution is not optimal either, both because of some deficiencies in the way redshift uses this interface but also in the way geoclue is usually configured. Or rather, the problem is that people expect geoclue to work out of the box without configuring it, which has not always been the case.  In summary: set the location manually to be sure.

  • joe

    Thank You!  I’ve used flux before, but the lack of open source made me sad (the ‘gui’ doesn’t compile and I wanted to know how flux works). Now I’m using gtk-reshift and I’m happy : D

  • Ronald Pottol

    Any hope of getting it to work with the Enlightenment window manager? I’m using Bodhi Linux (Ubuntu LTS variant, from 12.04 right now), I get the following after trying to launch either redshift or gtk-redshift (and it will not work from the menu either): 

    gtk-redshift(process:30016): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL’ failed

    Thanks for promoting this idea, in any event.

  • Timpster93

    Now if we could just get this on **ALL** phones, tv’s and GPS devices!!!!

  • Timpster93

    Also…. can we please get a GUI?

    Yes I like the command line… but it would be much easier to change the temp on the fly without having to do pkill redshift and ctrl C EVERY TIME I WANT TO CHANGE IT!!!
    if you know anyone who can make a gui, try to get on that, and thank you SO MUCH for allowing this program to change gamma, it looks SO awesome with redshift -t 6500:4400 -g 0.74
    but there is one thing I have noticed

    The color temperatures are off by about 1000k
    like 4400k should be closer to 3400k
    and the overall color for all the temps is more orange than f.lux, so if you have any time, try to change the hue slightly closer to yellow / orange please, compare with f.lux if needed

    This program is AMAZING

  • Timpster93

     like 4400k should be closer to 3400k

    I mean 4400k *LOOKS* very similar to 3400k in f.lux…. this seems like it could be VERY hard to fix because well
    you go from 6500 – 3400 with f.lux
    and from 6500 to – 4400 w/ redshift so this seems like it would be very hard to get close to f.lux… but please try

  • not me, dude

    > Also…. can we please get a GUI?
    There’s already gtk-redshift, it would just need some additional configuration options.

  • knud

    There is a problem with gtk-redshift on ubuntu. If you don’t have a net connection gtk-redshift aborts. That a problem because if I auto start gtk-redshift on my laptop the desktop try to start gtk-redshift before it got a wifi connection and the result is that gtk-redshift never starts. I think that gtk-redshift should cache the geo-location and use the cashed version if there is no net connection on start up.

  • Milanium
  • Milanium

    See http://software.opensuse.org/package/redshift for the link to the SUSE RPM.

  • jellybelly

    Wait are you a Berkeley student? xD

  • Pingback: Redshift, ou preserver ses yeux,la nuit sous linux | Benasse's Blog

  • Pingback: Redshift: rien que pour vos yeux

  • Pingback: Weniger Augenauslastung durch Redshift | Seraphyn Blog

  • Anonymous

    Fantastic application, simple installation, and it’s super easy to use. Man, thank you very much! I use it for my Linux at work for the whole time now :-)

  • Pingback: My laptop display casts a very interesting pattern on the wall… | Calvin Li

  • Pingback: f.lux und Redshift | cannycode.de

  • Acommenter

    Thanks for the great program. One option I would like to see added is an “offset” to the sunset time. Recently I’ve found that the Transition mode doesn’t start soon enough for my environment. If I could pass a parameter like ‘-s -60m’ to make it shift the sunset time 60m sooner, that would be great.

  • Pingback: Mengatur brightness di Archlinux dengan Redshift | CidTux.Net

  • Desmond

    I’ve extracted the software but everytime I run the application it will display a command prompt for 1 second and disappear. Can’t seem to get the application out to work

  • http://jonls.dk/ Jon Lund Steffensen

    Please correct me if I’m wrong, but you are probably using the windows version, the one that says “experimental builds” and “it’s a command line utility”. If you don’t know what those things are, then I think you should try f.lux utility instead as you will find it easier to use.

  • DragonFartOutLoud

    how do i set it to automatically adjust to time of day? when toggled it dims out my monitor even during daytime. how do i make it dim only at nite? iv tried the command line but it says the redshit commmand not found.

  • http://jonls.dk/ Jon Lund Steffensen

    If you don’t want any dimming during daytime check that your daytime temperature is set to 6500K. Also, check that your location is set correctly.

  • http://eclecticjosh.com/ Joshua Pitzalis

    This software could be easily tweaked to remind people to drink water when they are working at their laptops for hours on end. The software just has to be re-calibrated to dim on a 2 timer (8 glasses a day, 16 hours a day, 8 hours sleep).

    The redder the screen gets the harder it is to work, which reminds people they need to hydrate their brain. Its prompts them to get up and go drink some water and refresh their dimmer making it easier to work and clearer to think.

    We can call it meltdown. I’ll market it for you and give you full credit if you want to do it.

    Great work by the way.

    Take care

  • Pingback: Redshift en kubuntu | Rinopopo

  • timbuck93

    Why is the color temperature WAY off compared to f.lux, also the color is MUCH **MUCH** more red, I mean, I like redshift, but, it’s too dark when I play games like TF2 on night maps
    Plus 4700K on redshift look about the same as 3400k on f.lux, so I’d like you to see if you could close the gap there… please? – also why is RedshiftGUI for Windows PERFECT, but redshift on Linux is way the hell off and doesn’t have a GUI AT ALL!!!

  • http://jonls.dk/ Jon Lund Steffensen

    Actually I’d say that f.lux is way off compared to redshift :p In all seriousness there is no “scientifically correct” way of calclating the redness from a given temperature value because it is all based on approximations and assumptions about the user’s screen. If you like 4700K better why not use that value with redshift? And why not use RedshiftGUI if you prefer an interface?