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 in the following paragraphs. 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.

  -h		Display this help message
  -v		Verbose output
  -V		Show program version

  -b N		Screen brightness to apply (max is 1.0)
  -c FILE	Load settings from the specified configuration file
  -g R:G:B	Additional gamma correction to apply
  -l LAT:LON	Your current location
  -l PROVIDER	Select provider for automatic location updates
  		(Type `list' to see available providers)
  -m METHOD	Method to use to set color temperature
  		(Type `list' to see available methods)
  -o		One shot mode (do not continously adjust color temperature)
  -x		Reset mode (remove adjustment from screen)
  -r		Disable temperature transitions
  -t DAY:NIGHT	Color temperature to set at daytime/night

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

Automatic location provider

Redshift can automatically determine your current location from Geoclue. The location can also be specified manually either with a command line option or in the configuration file.

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.

  • Pingback: Can I hide running applications from the unity launcher? Drija

  • Pingback: Catatan » Blog Archive » Beberapa Hal Yang Saya Lakukan Setelah Menginstall Ubuntu 10.10

  • http://riledhel.blogspot.com Javier Constanzo

    Great tool! Thank you very much. It works perfectly on my Ubuntu 10.04 64bits.

  • http://nikolay.com Nikolay Kolev

    BTW, here are some nice monochromic icons that you may use as default!

  • M. Glenn

    How to Make Autostart Remember Your Settings
    (building on Draak’s work, because I strongly prefer to use default utilities instead of tracking the locations of scripts)

    Start Redshift normally. From the panel icon, select Autostart.

    Go to System>Preference> Startup Applications and find the Redshift entry. Select it and click Edit. From here you can edit the command. Use Draak’s instructions above to construct a settings command that works for you, and paste it in here. Voila.

    Dev feedback:
    I couldn’t find where to enter coordinates unless starting it from the command line. I’m making another vote for a small GUI settings window, available from the panel icon. It doesn’t have to do anything fancy, just a list of arguments with text boxes so we can set our lat, long, color temperatures, and gamma without going to a command line or restarting the program.

    The settings designated in that window could be kept in a config file and used on any routine startup of the program, including autostart. They would be superceded if a command line request gives a different value.

  • Pingback: RedShift – Farbtemperatur des Bildschirms an Tageszeit anpassen » RedShift, Augen, Farbtemperatur, Icon, Bildschirms, Programm, Licht, Panel, Dazu, SystemEinstellungenStartprogramme » Pablos Blog

  • http://www.hofplatten.de R-C

    Nice tool! Saves my nights…
    Use it on Ubuntu 10.10 64bit, thanks for the updated packages.

  • BC

    Great tool ! Thank you for my eyes !
    Note that gnome clock location detection does not seem to work under archlinux… Only manual settings.

  • José Luis

    Sorry but my English is too basic.

    I deactivate the Clock applet because I try to use Docky and Redshift fails on Status Icon, obviusly when I activate the applet works normally.
    But I took time to discover this issue.

    Thank you for the software is great!!!

  • Stefan Haller

    I really like your project and it’s incredible easy to use.

    Thank you very much!

  • Marvin Vek

    The first thing i noticed when running Redshift, was that the screen went completely red. Then again, the Thinkpad x201 has a very bad quality LED LCD, the viewing angles are so bad that when you look at it from a high angle everything turns red when running in the standard 6500K. Thanks to Redshift however i spend a night to calibrate the LCD gamma and colors, and went for the D50 norm for nights.

    I really can’t be bothered creating a launchpad account, so i’ll state the question/opinion about the Redshift functionality here.

    Redshift seems to poll every 5 seconds for information, which imho is a bit much. Enabling Redshift at night using 6500K it takes 100 steps to go down to 3700K. Beside the fact that i doubt that anyone notices the tiny color differences using 100 steps, 5 seconds is a bit much as well. The average sunset is 30 minutes, with 100 steps 15 seconds polls would do. Minimizing the steps by 50% you’re able to poll for just once every 30 seconds. Currently solved it for myself by creating a cron job which runs Redshift once every 5 minutes for my D65 to D50 transition.

  • Paddy Landau

    Thank you for this program. Only on my first day, and I already find the screen easier on my eyes.

  • Dmitri I.

    Thanks for a great program!
    Would it be possible to add options for brightness and contrast? If I try to adjust brightness/contrast with xcalib on top of redshit, the temperaure reverts to default, and vice versa. It would be nice to have a tool which could adjust all color parameters simultaneously.

  • Pingback: Happy 2 Ubuntu years.. « Jaqoup's Weblog

  • http://easba-longcoun.livejournal.com mesespart

    “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.”
    Where else can I read about it?

  • http://www.patrickbarta.com Pat Barta

    Thanks for writing this program!

    One possible interesting (and essentially trivial) modification to make to this program would be to add a flag which lets you shift the time used in calculating the proper color temperature from system time to system time +/- an offset, e.g.:

    redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v -o 1

    would use not the current time, but the system time + one hour when calculating the proper color temperature for right now.

    The reason to do this is that many people’s circadian rhythms are out of whack (particularly some of those who would be drawn to using this program because of sleep problems). A positive offset might help phase advance the user’s circadian rhythms (making it easier to go to sleep earlier), while a negative offset might help retard circadian rhythms (making it easier to go to sleep later.) There is evidence that melanopsin recepters might respond preferentially to blue light (which is richer in daylight than household lighting).

  • Pingback: Descansando os olhos com Redshift « Processo Linux

  • Pingback: Redshift regle la luminosité de votre écran lorsque la nuit tombe. | Planete Linux

  • Pingback: redshift für warme farben im computeralltag » monitor, eine, lichtverhältnisse, uhrzeit, bild, standortes » life inprogress

  • Pingback: More ergonomics – desktop lightning: redshift at Andi Kleen's blog

  • Pingback: Rich Jerrido » Blog Archive » Things I learned by becoming a telecommuter

  • guy

    I installed redshift, found in accessories and get no status icon. So I installed the gtk-redshift package but it fails, says it’s basically trying to overwrite existing files from newer version and won’t complete. Do I have to uninstall the newer 1.6.x version and install only the 1.2.x version to use on ubuntu?

  • Shawn MacLean

    Lovely program! I too used f.lux and found that it didn’t really work that well. Redshift on the other hand performs like a dream, has a beautiful little icon and is unobtrusive and pulls in the necessary details from gnome-clock, as it should. Excellent job and keep up the good work. If you continue to develop this I guarantee that I’ll donate to you in the future.

  • Anna

    There is no monochrome icon for light themes – it would be great if there was one like there is for the dark ones, thanks.

  • Robert

    great little app, although it doesn’t seem to grab the lat/long in debian-squeeze(x86)

  • Octavian

    During night the screen just keeps flashing between red and normal continuously, it’s actually quite annoying. Any ideas on why it does this?
    [Ubuntu 10.10 on Asus k52]

  • http://www.hermit.eu harmus

    That’s right, automatic lat/long-grabbing doesn’t work in Squeeze. Not a big problem tho.. Redshift is genius!

  • Rafael

    tried it on my multiple-monitor setup and it only adjusted one of the screens…

  • Ollie

    The -x option isn’t working with the latest redshift.


    $ redshift -x
    redshift: invalid option -- 'x'
    Try `-h' for more information.

    Is there another way to remove redshift’s adjustments?

  • http://wojciech.oxos.pl Wojciech Kruszewski

    Works like a charm on Ubuntu 10.10 on GeForce 8400 GS. I also missed configuration options in F.lux -good command like better than poor GUI (-:

  • jaspercayne

    Loving it! I tried flux on Windows and enjoyed its benefits, and then when I installed it on Ubuntu I found that it was lacking in features, and couldn’t affect both my monitors… Found this in the Gentoo portage tree shortly after installation and couldn’t be happier to have automatic colour adjustment back! Only hitch I’m finding is that it doesn’t seem to display the icon in the status tray, only that default “I have no icon” icon (holy redunancy batman…) Any way to get that badboy working, or should I try to dig through the files for why it doesn’t pick up the icons properly?

  • Pingback: 404 Tech Support: Where IT Help Is Found

  • Pingback: Maximi89 » Blog Archive » Cómo cuidar nuestros ojos?

  • Chris

    Awesome, thanks!

  • Pingback: tired eyes | Steve's Systems Biology blog

  • Fred

    Eeep !
    $ killall -USR1 redshift

    Don’t do stuff like that ! Use pkill(1) instead. On several platforms, killall does *exactly* what its name says and will definitely get you in trouble.

  • Pingback: Backlight Brightness on a Gateway NV5915h

  • A Person

    Thanks! Redshift is just what we needed for Linux.

  • http://theorieswithproblems.com Jonas G. Drange

    The new icon is great! I love redshift and I am recommending it to everyone.

    Keep up the excellent work!

    NB: something is wrong with the e-mail input. It deletes text as you type.

  • Pingback: Protegiu els vostres ulls amb RedShift | GNULinux.cat

  • Peti

    I’m not sure whether this is supported by Jon, but for anyone still looking for a Redshift GUI, I found this gem:

    https://github.com/maoserr/redshiftgui/downloads

    Works like a charm.

  • Pingback: Redshift – szanuj wzrok swój i cykle organizmu twego « harce

  • Pingback: Update for Wednesday, 6 April 2011 « Haven't decided on title

  • Philip

    Episk niceness~

    en flattr herfra :D .. fortsæt gerne~


    Epic niceness~

    Sending you a flattr :D .. by all means, continue coding.

  • Kevin Brubeck Unhammer

    Hvordan er formatet på konfigurasjonsfilen?

  • http://gimmy.homelinux.net Gimmy

    Thank you very much! I install Redshift on Natty: it works wonderfully!

  • Pingback: weiße schrift auf schwarzem grund -> netzhautburn? - inQuake Forum

  • Mika

    Is it possible to set a different gamma setting for day/night and how?

  • Mika

    Never mind, I found a way to change gamma through a shell script.

    Kudos, Redshift rocks!!!

  • Pingback: F.lux Suits your Eyes to Daylight Changes on the Screen - TheNewBlog