Thursday, October 24, 2013

Changing Color Temperature in Linux

Color calibration has never really been a problem on Macs with built-in monitors like iMacs and 'Books of various sorts. Naturally, since they make both the hardware and software. The picture is bright, and the colors are warm and vibrant. The same can't be said, though, when you introduce anything non-Apple into the mix like a third-party external monitor, or booting into Linux. In those cases, the default color temperature tends to look too blue, too cool.

If you have an external monitor, that isn't a problem as you can just reach up and adjust the color temperature manually on your monitor's controls, but if you're booted into Linux and you're on an iMac or a laptop, you don't have that option. You need a software solution, and as chance has it, there is one. It's called Redshift, and it's a cool little command line utility that was originally intended to adjust the color temperature of your screen according to the time of day, but there's also a "one shot manual mode" that lets you adjust once to a permanent setting.

To change your screen's color temperature, you just need to type one simple command:

redshift -O colortemperature

where colortemperature is a number in Degrees Kelvin (the default seems to be 6500). Also, the -O is capital O, not zero. So if your iMac or laptop screen is too cool, try lowering the temperature number a little, to say 6200, for a slightly warmer picture. On my iBook, I eventually settled on 6250. An easy way to calibrate your screen correctly is to hold up a Macintosh laptop booted into OS X next to it and make them match.

Now put that command in your autostart file or a startup script and you're good to go.

I've written before about Xgamma which I used to adjust the gamma level, and I also tried it for warming up the screen by adjusting the red, blue, and green levels separately, but I could never get it quite...right. So Redshift really comes to the rescue here.

Also monitor related, if you're using an external monitor connected to your laptop, I discovered a simple GUI front end for xrandr called LXRandr.



So if you were trying to deal with xrandr from the command line to put your laptop display to sleep and set the resolution for your external monitor, this significantly simplifies things.

4 comments:

  1. You can also use xcalib with the ICC profile from OS X. It should be in /Library somewhere. I haven't tested it on PowerPC, but at least on my Intel Mac I get the exact same color profile in Linux that I do in OS X when I use that.

    ReplyDelete
  2. Anyone ever tried a Huey or other hardware calibrator with Linux? Huey has been so much better than trying to colour adjust my screens by "eye."

    ReplyDelete
    Replies
    1. Supposedly it works with Gnome Color Manager, though I haven't tried it myself.

      Delete
  3. Useful stuff. Works on my Limix Mint 17.1 x64 (on an old Dell laptop). Thanks!

    ReplyDelete