LinuxCommandLibrary

xgamma

Adjust display gamma, brightness, and contrast

SYNOPSIS

xgamma [-display displayname] [-gamma value] [-rgamma value] [-ggamma value] [-bgamma value] [-quiet] [-version]

PARAMETERS

-display displayname
    Specifies the X display to connect to. If not specified, the value of the DISPLAY environment variable is used.

-gamma value
    Sets the gamma value for all three (red, green, and blue) color components to the specified value. A value of 1.0 represents linear color.

-rgamma value
    Sets the gamma value specifically for the red color component to the specified value.

-ggamma value
    Sets the gamma value specifically for the green color component to the specified value.

-bgamma value
    Sets the gamma value specifically for the blue color component to the specified value.

-quiet
    Suppresses informational messages.

-version
    Displays the version number of xgamma.

DESCRIPTION

xgamma is a command-line utility for querying and modifying the gamma correction of an X server. Gamma correction affects how the system displays colors, allowing users to brighten or darken the screen, adjust color balance, and compensate for variations in monitor hardware. It works by modifying the color lookup tables (LUTs) used by the X server. Users can adjust the red, green, and blue components independently or collectively.
The primary use case is adjusting screen brightness and contrast beyond what the monitor hardware can achieve. It's especially useful on laptops with poor screens or in environments with varying ambient light. Be aware that excessive gamma adjustments can lead to color distortion or banding. Running xgamma without any options displays the current gamma values.

CAVEATS

Gamma settings are typically lost when the X server restarts or when a different video mode is selected. Some display managers might override xgamma's settings. Over-adjusting gamma values can result in posterization or color banding, especially with lower color depths. Consider using a color profile management system for more accurate color calibration.

EXAMPLES

To increase the overall screen brightness, you might use:
xgamma -gamma 0.8
To reset the gamma to the default value:
xgamma -gamma 1.0
To decrease red and increase blue:
xgamma -rgamma 1.2 -bgamma 0.8

HISTORY

xgamma has been a standard utility in X11 for a very long time. Its purpose is to provide a simple way to adjust the screen gamma. Originally designed when monitor calibration was less sophisticated and built-in monitor controls were less common, it remains useful for quick adjustments and scripting color settings. While modern systems increasingly rely on color management systems and graphics card drivers to handle gamma correction, xgamma provides a basic tool that still functions reliably across various X11 environments.

SEE ALSO

xrandr(1)

Copied to clipboard