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.
EDIT: (tested on freya)
To make changes permanent, add the script to start-up applications.
Open terminal and run:
nano monitor_display.sh
Add the following lines.
#!/bin/bash
sleep 50
xrandr --output VGA1 --gamma 1.28:1:1.28 #same command you used previously.
Now Ctrl+X --> Y--> ENTER.
Now run:
chmod +x monitor_display.sh
Now to add to startup applications:
Open system settings --> applications --> startup --> click on + and add the command:
/bin/bash monitor_display.sh
Now reboot.
Note: You will see custom command .desktop
file in ~/.config/autostart