You can modify gamma settings (colors and effectively contrast too) using xrandr
tool.
First determine the output name of your monitor:
For example:
ravan@ravan:~$ xrandr -q | grep connected
VGA1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 410mm x 230mm
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
In the above example I have a monitor connected and seen as output VGA1.
Using xrandr
From man page of xrandr
(See man xrandr
)
Xrandr is used to set the size, orientation and/or reflection of the outputs for a screen. It can also set the screen size.
command:
xrandr --output [DISPLAY_NAME] --gamma [R_VALUE]:[G_VALUE]:[B_VALUE]
Example:
xrandr --output VGA1 --gamma 1.28:1:1.28 # for purple
In the above example gamma values are in format Red
:Green
:Blue
See here for corresponding numeric values for RGB colors.
In RGB color table, see decimal code and if you have 128 then use 1.28
EDIT:
If you want to revert then use: 1:1:1
to restore the default state.