Linux – How to use command line to change brightness and color

colorsdisplay-settingsfedoralinuxxorg

Is there any way to change the brightness and color? Using any command line tools?

I am trying in Fedora and Ubuntu but no luck so far.

Follow up:

[command]    [conneccted output]   [effects R:G:B, value 0 to 255]        
|     /      |            /        |            /
^    ^       ^            ^        ^           ^
xrandr       --output VGA1         --gamma 0:0:0

Best Answer

You can modify gamma settings (colors and effectively contrast too) using xrandr tool. First determine the output name of your monitor:

 $ xrandr -q | grep connected
 DFP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
 CRT1 disconnected (normal left inverted right x axis y axis)

In the above example I have a monitor connected and seen as output DFP1. So now for the gamma modification example:

$ xrandr --output DFP1 --gamma 0.8:0.8:1.1

Where gamma values are in format Red:Green:Blue.

Edit: Another option is xcalib (you may need to install it first). It can be used with -a parameter to have effect directly on the connected monitor. See the output of xcalib for more details. Unfortunately, the color/brightness settings seem to work additively, so you might need to do randr --output ... --gamma 1:1:1 to restore the default state.

Related Question