LinuxCommandLibrary

redshift

TLDR

Start redshift with automatic location detection

$ redshift
copy
Set color temperature manually (day:night)
$ redshift -O [3500]
copy
Set day and night temperatures
$ redshift -t [5500]:[3500]
copy
Set location manually (latitude:longitude)
$ redshift -l [40.7]:[74.0]
copy
Reset screen to normal color temperature
$ redshift -x
copy
Run in one-shot mode (set and exit)
$ redshift -o
copy
Print current color temperature
$ redshift -p
copy

SYNOPSIS

redshift [-l lat:lon] [-t day:night] [-b day:night] [-m method] [options]

DESCRIPTION

redshift adjusts the color temperature of the screen based on time of day, reducing blue light exposure in the evening. This can help reduce eye strain and improve sleep quality by matching screen color to ambient lighting.
During the day, the screen maintains normal color temperature (around 5500-6500K). As the sun sets, redshift gradually transitions to warmer colors (3000-4000K), reducing blue light that can interfere with circadian rhythms.
Location can be determined automatically using geolocation services (geoclue) or specified manually. The program runs continuously, adjusting temperature throughout the day based on calculated sunrise and sunset times.
Different backends support different display systems: randr for X11, wayland for Wayland compositors, and drm for console/framebuffer.

PARAMETERS

-l lat:lon

Set location (latitude:longitude) for sunrise/sunset calculation
-t day:night
Set color temperature in Kelvin (default: 5500:3500)
-b day:night
Set screen brightness (0.1-1.0)
-O temp
Set specific color temperature immediately
-o
One-shot mode; set temperature and exit
-x
Reset color temperature to default
-p
Print current settings and parameters
-m method
Adjustment method (randr, vidmode, drm, wayland)
-g r:g:b
Set gamma correction
-r
Disable temperature transitions
-v
Verbose output
-c file
Load configuration from file

CAVEATS

Automatic location detection requires geoclue and appropriate permissions. If detection fails, specify location manually with -l.
Some applications (photo/video editing, color-critical work) may require accurate colors. Use redshift -x to temporarily disable adjustments or exclude specific times.
Wayland support depends on compositor support. Some Wayland compositors implement their own night light features.
Running multiple instances may cause conflicts. Use a single instance or integrate with your desktop environment's night light settings.

SEE ALSO

xrandr(1), xgamma(1), gammastep(1)

Copied to clipboard