如何使用命令行更改亮度和颜色?

8 linux colors fedora xorg display-settings

有没有办法改变亮度和颜色?使用任何命令行工具?

我正在 Fedora 和 Ubuntu 中尝试,但到目前为止还没有运气。

跟进:

[command]    [conneccted output]   [effects R:G:B, value 0 to 255]        
|     /      |            /        |            /
^    ^       ^            ^        ^           ^
xrandr       --output VGA1         --gamma 0:0:0
Run Code Online (Sandbox Code Playgroud)

roz*_*acz 8

您可以使用xrandr工具修改伽马设置(颜色和有效对比度)。首先确定显示器的输出名称:

 $ 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)
Run Code Online (Sandbox Code Playgroud)

在上面的示例中,我连接了一个监视器并被视为输出DFP1。所以现在对于伽马修改示例:

$ xrandr --output DFP1 --gamma 0.8:0.8:1.1
Run Code Online (Sandbox Code Playgroud)

其中 gamma 值的格式为Red:Green:Blue.

编辑:另一个选项是xcalib(您可能需要先安装它)。它可以与-a参数一起使用,直接对连接的显示器产生影响。有关xcalib更多详细信息,请参阅 的输出。不幸的是,颜色/亮度设置似乎可以叠加使用,因此您可能需要randr --output ... --gamma 1:1:1恢复默认状态。