Adjust Color Temperature of Your Screen Using Terminal in Ubuntu and Fedora

2 min


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 terms, the default color temperature value of your monitor is 6500k.

So, anything upwards e.g. 7000k, etc, is “blue-ish” or “cooler“, and downwards is “warmer” or “yellow-ish”.

Take a look at this chart (credit: Wikipedia).

Color Chart
Color Chart

As you can see, from evening to nighttime, it’s better to use a warmer color to give leisure to your eyes.

Many GUI utilities are 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 automatically changing your system time by tracking the sunrise and sunset.

KDE also have this in the system settings for both day and night time (Plasma 5.26 onwards).

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

For Ubuntu, Linux Mint and related distros

  1. 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.
  1. Open up a terminal and install it using the below.
sudo apt install sct
  1. Once installed, you can start using it anytime with just a command. Even you can use it for your shell script as well.

Syntax

sct [temperature]

Examples

sct
sct

Type sct followed by the number between 1000 to 10000 (see the color chart above to get an idea).

sct 5000
sct 2500

To reset to default settings, just type the command without any value. It should change it back to the default 6500 k.

sct

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.

For Fedora, RHEL and related distros

  1. This utility is available in a copr repo. Open a terminal and enable the repo using the below command:
sudo dnf copr enable dmoerner/sct
  1. The refresh the package and install it using the following command.
sudo dnf update
sudo dnf install sct
  1. After installation, you can use it using the above instructions.

Wrapping Up

I have shown you how to adjust colour temperature in Ubuntu and Fedora Linux in this guide. I hope you are now able to control it without any GUI utilities.

Do let me know in the comment box if it helps.

Cheers.


Arindam

Creator of debugpoint.com. All time Linux user and open-source supporter. Connect with me via Telegram, Twitter, LinkedIn, or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

3 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
3
0
Would love your thoughts, please comment.x
()
x