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 (please see this post for the reason why I started this project).

Download

Latest release is Redshift 1.9 published on 2014-04-06. Packages are available from most distributions. In addition the following downloads are available:

Project page

The project is managed at Github where issues and pull requests can also be posted. Please don’t use the old bug tracker at the launchpad project page anymore. Updates to the translations can still be contributed through the launchpad translations page.

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
Redshift running in one-shot mode (right half shows a preview of the redness effect)

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 can also be applied to the Linux console by explicitly selecting the DRM driver.

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. 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. The position from Geoclue will currently not be updated regularly while Redshift is running but this is planned for a future release.

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 and put it in ~/.config/redshift.conf. The following is an example of a configuration file (thanks to kenden):

; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500

; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature. 
; 1 will gradually increase or decrease the screen temperature
transition=1

; Set the screen brightness. Default is 1.0
;brightness=0.9
; It is also possible to use different settings for day and night since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel individually)
gamma=0.8
;gamma=0.8:0.7:0.8

; Set the location-provider: 'geoclue', 'gnome-clock', 'manual'
; type 'redshift -l list' to see possible values
; The location provider settings are in a different section.
location-provider=manual

; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values
; 'randr' is the preferred method, 'vidmode' is an older API
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr

; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings
; ex: 'redshift -l manual:help'
[manual]
lat=48.1
lon=11.6

; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1. 
; Note that the numbering starts from 0, so this is actually the second screen.
[randr]
screen=1

Status icon

Start the program redshift-gtk 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. redshift-gtk requires at least Python 3.2 (since Redshift 1.9).

Note: Before version 1.8 redshift-gtk was known as gtk-redshift.

Redshift status icon
Redshift status icon

Related software

  • Redshift Plasmoid for KDE provides a graphical configuration interface for Redshift.
  • Twilight for Android provides a similar application for Android (not open source).
  • f.lux is a similar program for Windows/Mac and iPhone/iPad, and there is also a Linux version (not open source).

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.
  • Certain video drivers do not support adjustable gamma ramps. In some cases Redshift will fail with an error message, but other drivers silently ignore adjustments to the gamma ramp.
  • Redshift has a brightness adjustment setting, but it does not work the way most people might expect. In fact it is a kind of fake brightness adjustment obtained by manipulating the gamma ramps, which means that it does not reduce the backlight of the screen.

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

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

    Check out the Twilight app (https://play.google.com/store/apps/details?id=com.urbandroid.lux ), I think it’s great.

  • Guest

    Hi! I’m using 1.9 on Ubuntu but I can’t run redshift-gtk. I get this error

    Traceback (most recent call last):
    File “/usr/local/bin/redshift-gtk”, line 26, in
    from redshift_gtk.statusicon import run
    ImportError: No module named ‘redshift_gtk’

    I’m using Ubuntu 14.04

  • Mike

    Thanks so much for making this! F.lux works really well but it creeps me out and I suspect it’s spyware. (It even says on their website that it reads potentially all of your browser’s cookies and sells that to ‘3rd parties’. The user willingly gives it admin privileges to do so too.)

  • Anonymous

    Hello !

    Great software! Are their any plans to include this latest version as a PPA for Linux Mint 16? I’ve added it as a PPA but then it fails to fetch the PPA and gives me a 404 error. Have tried compiling from source, and no luck (despite reading the HACKING file) contained in the archive. Version in Synaptic repositries is also an older version :-(

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

    No, sorry I can’t maintain PPAs right now. I’m sure the official repos will be updated but it will take some time.

  • Dario · 753 a.C. .

    hi
    first of all thank you for this great software. it works really well-
    i’ve got only one question: is it possibile that this type of continuos regulation of red, in time, can ruin hardware components of the display?

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

    No that is not possible. The gamma ramps that Redshift uses to control the redness is a part of the graphics hardware and it is normally used for color corrections or gamma corrections.

  • Dario · 753 a.C. .

    ok thank you!

  • Anonymous

    Hi, I am using Linix mint debian ed. i have installed the package but it doesn’t open / run. can you provide me with manual commands for the terminal? if possible

    Thanks

  • Ea Enki

    Great job, I appreciate it.

  • Ingo Thies

    But isn’t this the case for many proprietary freeware apps and even browser add-ons? Are there other opinions on that issue? For now I have been using f.lux on Mac, but if Redshift could be made run on Mac OS I would really appreciate it.

  • David

    Are you worried about being sued by f.lux? They are now patent-pending.

  • barry

    Where are the installation instructions?

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

    The recommended way to install Redshift is through your Linux distribution. If your distro does not package Redshift you will have to install it from source. Please see README and HACKING in the source release for further instructions.

  • bazdalikalo

    Hello, excellent app, thank you, it does what flux does and a little more, and all that without a gui. I didn’t find your contact info anywhere, so I’ll put what I’ve figured out here.

    Like you said, beside it’s main purpose Redshift can also adjust brightness but it’s a kind of fake brightness adjustment and it does
    not reduce the back-light of the screen, so it’s a workaround, not quite satisfying. Since I’m using it on Windows
    and I’ve found out about great multipurpose command-line app “nircmd” (which makes my temporary stay away from Arch Linux little more bearable :) ) that can successfully lower or increase brightness on laptop/netbook computers exactly like Fn button combinations do on my Asus Laptop by reducing or increasing back-light of the screen.

    (Note: It seems that different numbers than default must be figured out by simply experimenting with “nircmd setbrightness” command to work on some laptops. For example I’ve reduced brightness by one Fn step with command: “nircmd setbrightness 350″ and increased it with “nircmd setbrightness 351″)

    One question: Is it possible to implement that Redshift invokes external
    app, for example nircmd.exe at designated red shifting intervals?

    I don’t know If nircmd can help You to implement better brightness shifting in Redshift at least for laptops and netbooks, but I hope… If nircmd did it, why not? :)

  • timbuck93

    I just wanted to directly reply to you, because I don’t know if you get notifications etc for new comments.

    As you may know, redshift numbers and color is a bit off — 4700 is just a tiny bit more red than f.lux’s 2700k so the numbers for redshift are MUCH higher.

    If it helps at all I did a test with just f.lux, not using redshift.
    2700k looks pretty accurate.
    Then I expanded the range and 2700k looks way too orange, maybe around 1900k but missing some yellow. I think it’s Linux’s color management that it screwed up so I’m not going to blame you at all.

    If you can … maybe make 2700k look like 4700k does now, so in other words just decrease the difference between the numbers like from 5000 to 4700 is a HUGE jump.

    One more request, add just a smidgen more green into the mix and it’ll be amazing!

    Thank you for updating the app as well, I thought you’d left!
    It really shows you care and I wish more Linux developers were like you!

    Thank you for the great program! I use 6500 and 4700 for day and night, but I want 4700 to be 2700 but look the same with just a tiny bit more green, not much!

  • timbuck93

    They seem like really really nice people, I don’t think they’d sue! Don’t even worry about it!

  • timbuck93

    I tell you what! I wanted to try this SO BADLY, that I downloaded Manjaro, put it in a VM, and saw it had redshift 1.9.1
    So then I put it my flash drive, shut down Windows 7, and installed Manjaro on my Linux hard drive — you have done an AMAZING job, so amazing, so thank you for that! Just absolutely amazing!

    It’s incredibly accurate, even to extreme values like 1200k – yes I tested it! It’s EXTREMELY ACCURATE!!!

    It’s just amazing! I can’t thank you enough, it’s what I’ve always wanted redshift to be, and now it’s here! I hope all the other distros pick this up ASAP – like TODAY! It’s just incredible!

    Thank you again, and thank Manjaro for making Arch so easy, not sure if I’ll stick with it, but so far it’s been OK. The themes reset a lot though and look ugly so I have to re apply them, and when I’m zoomed in and hit a taskbar thumbnail the mouse literally disappears so I have to zoom all the way out, stay there for the mouse to come back, and then zoom back in and hope that I don’t hit another one — and I usually do within about 45 seconds, so that’s really annoying.

    Anyway, you’ve done an amazing job and all the people that say they don’t like redshift – it was because it was way off, so if they this I think they’ll really love it!

  • timbuck93

    when will they get 1.9??? WE NEED THIS!!!

  • Jeňa Kočí

    try man redshift to get started.. you can also set the same command in the startup apps
    another resource:
    http://lifehacker.com/5567172/redshift-makes-your-screen-easier-on-the-eyes-at-night

  • mina86

    Have you seen their patent application, because I could not find it? And since Redshift has been around as an free software project for years, it may well be that their application is invalid by virtue of Redshift being prior art.

  • Connor Doherty

    Thanks for making it FREE as in freedom!

  • stormchaser1983

    I am a noob. How the f do I install it? A simple tutorial/steps would be useful

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

    As with most linux software the simplest solution is often to install a package through your distribution. The details will depend on the specific distribution.

  • a different ben

    Hi hi, it’s not clear how to search these comments, so this may have been asked already… can I enable this for only screen 0? If I plug my laptop into my big screen to watch a show, it would be nice for redshift not to affect it. Or, am I being thick and there’s a simple, obvious way?

    Version 1.7-2ubuntu from the repos.

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

    If you are able to use the randr method it may be possible. If your displays are set up using randr the displays may be organized as separate “screens” in which case it would be possible for redshift to only affect one screen (see example in config file above). If your displays are organized as separate outputs under one screen it is not currently possible for redshift to alter the displays individually.

  • pamfeuer S

    DAMN!!!
    2014 and this program works on debian unstable with kernel 3.15.7
    I got high number lenses and Cant live without redshift anymore.

    BTW works with gnome-shell 3.12.2

    Works with my laptop, works with my dell 1080p monitor via HDMI.

    Tried flux, didn’t work.

    Maybe you should add donate buttons everywhere and continue working on this project.

    Thanks.

  • Fernando

    This is one of those rare applications which put together simplicity, customization with purpose and usefulness in the same software. Keep up the good work!

  • Peter

    Hey, i like this application. My eyes feel more relaxed now. I have a suggestion: While working with Netbooks or other mobile devices, environmental light temperature may vary during daytime. A small interface with a control-button woud be very helpful. Why? Imagine me, sitting i my home-office: Big windows, bright sunshine. My neighbour calls for help, so i grab my notebook, get over to him and his home-office in in a windowless cellar with lightbulbs. You know, what i mean?

    Imho the automatic adaption is “nice to have”, but i think an option to set values manually is “must have”.

    Tip: To achieve the optimum value, just perform a “human eye white balance”: Place a white paper beneath the monitor and set the value, so that the white(s) from monitor and paper appear equal.

    Kind Regards

    Peter

  • Callum Hutchinson

    Any ideas how I would get Redshift to run as a background process on Windows and keep the CMD window required hidden? Thanks~

  • or pick a name

    thanks, it’s great piece of software – i am only annoyed by fact that redshift settings turns off on video (or even audio), would this be possible to have config option to say, i would like redshift settings to hold no matter what?

  • Victor

    Hello and thank you for making this piece of software, which I have gladly used since seeing how flux appearantly doesn’t work on Ubuntu.
    There is only one thing I miss from flux, which is the Movie Mode. If something like that could be implemented, this software would be perfect.

    Thank you very much.