How do you change brightness, color and sharpness from command line?

Solution 1:

If the driver of your graphics card supports it, then you can use xrandr.

The following command lists the current configuration:

xrandr --current --verbose

If you want to change the configuration of an output, then you need the name of the output. This name is part of the output of xrandr --current, for example LVDS1.

The brightness can be changed like this:

xrandr --output <outputname> --brightness 0.8

Gamma (red:green:blue):

xrandr --output <outputname> --gamma 0.5:1.0:1.0

Solution 2:

xrandr will not increase the screen brightness on the hardware level (the one that is changed by the laptop display brightness keys). As the xrandr manual says:

--brightness brightness

Multiply the gamma values on the crtc currently attached to the output to specified floating value. Useful for overly bright or overly dim outputs. However, this is a software only modification, if your hardware has support to actually change the brightness, you will probably prefer to use xbacklight.

Instead, use xbacklight to change the brightness:

xbacklight -get #get the current level
xbacklight -set *percent* #set brightness to a given percentage
xbacklight -inc *percent* #increase by a given percentage
xbacklight -dec *percent* #decrease by a given percentage

However, since this is same as using the laptop brightness keys, this cannot go beyond the limits of 0-100%. If you wish to brighten/darken your screen further than that limit, you can use xrandr to force software brightness levels:

xrandr --output LVDS1 --brightness 0.5

Note that xrandr accepts fractions (0.0-1.0) while xbacklight accepts percentages(0-100)

Solution 3:

For laptops, I just learned from man xrandr:

   --brightness brightness
          Multiply  the gamma values on the crtc currently attached to the
          output to specified floating value. Useful for overly bright  or
          overly  dim outputs.  However, this is a software only modifica‐
          tion, if your  hardware  has  support  to  actually  change  the
          brightness, you will probably prefer to use xbacklight.

So I tried

xbacklight -get
xbacklight -set 70

and it works!