In this quick guide, I will show how you can adjust the color temperature of your screen in Ubuntu using the terminal. No additional GUI installation is required and you can enjoy the night light even if your desktop environment doesn’t provide a native one.
What is Color Temperature
As per Wikipedia – “Color temperature is a characteristic of visible light that has important applications in lighting, photography, videography, publishing, manufacturing, astrophysics, horticulture, and other fields”. It has a value range from 1000k to 10000k (k = unit in Kelvin) which controls the display brightness.
In layman’s term, the default color temperature value of your monitor is 6500k. So, anything upwards e.g. 7000k, etc are “blue-ish” or “cooler” and downwards are “warmer” or “yellow-ish”.
Take a look at this chart (credit: Wikipedia).
As you can see from evening to night time, it’s better to use the warmer color to give rest to your eyes.
There are many GUI utility available specific to the desktop environments in Linux to change or adjust the color temperature (also known as a night light) in Ubuntu-based systems. Even GNOME provides a native night light control feature with advanced options such as the automatic change of your system time by tracking the sunrise and sunset.
But say, if you are using the Xfce desktop environment, you are out of luck. You might need to try Redshift which has a GUI etc or any other utility.
Adjust Color Temperature of Your Screen Using Terminal in Ubuntu
But there is a utility called “
sct” or screen color temperature for Ubuntu-based system which is super lightweight to install and very easy to use.
Open up a terminal and install it using below.
sudo apt install sct
Once installed, you can start using it anytime with just a command. Even you can use it for your shell script as well.
Type sct followed by the number between 1000 to 10000 (see the color chart above to get an idea).
To reset to default settings, just type the command without any value. It should change it back to the default 6500 k.
This utility will work for Ubuntu 20.04 LTS, Ubuntu 20.10, Linux Mint 19.x, Linux Mint 20.x, Xfce 4.14, MX Linux and almost all Ubuntu based derivatives.
I could not find this utility in the Fedora repo. So, if you are using Fedora with Xfce for example, you can not use this utility.