Ubuntu – How to change color profile via terminal commands

color-managementcommand line

I frequently change color profiles from the color settings. I would like to set an alias for convenient switching between color profiles e.g. D50 to D55 and switch back.

enter image description here

Does anyone know how to change via terminal commands?

In reply to A.B. answer :

$ colormgr get-devices
Object Path:   /org/freedesktop/ColorManager/devices/xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
Owner:         evn
Created:       May  7 2015, 03:36:44 PM
Modified:      May  9 2015, 08:48:18 AM
Type:          display
Enabled:       Yes
Embedded:      Yes
Model:         MacBookAir4,2
Vendor:        Apple
Serial:        unknown
Seat:          seat0
Scope:         temp
Colorspace:    rgb
Device ID:     xrandr-Apple Computer Inc-Color LCD
Profile 1:     icc-df7c0067b1eb9bcc9fc9b33bc3a797eb
               /usr/share/color/icc/colord/Gamma5000K.icc
Profile 2:     icc-57f0d896250f6f98f77ca1b0d19019c0
               /usr/share/color/icc/colord/Gamma5500K.icc
Profile 3:     icc-c385a6cc9b355dfa77d994ff54626f8a
               /home/evn/.local/share/icc/edid-2fa49b462ac314062ce76fce977d6525.icc
Metadata:      XRANDR_name=eDP1
Metadata:      OutputPriority=primary
Metadata:      OwnerCmdline=/usr/lib/unity-settings-daemon/unity-settings-daemon 
Metadata:      OutputEdidMd5=2fa49b462ac314062ce76fce977d6525

$ colormgr device-get-default-profile xrandr-Apple Computer Inc-Color LCD
Not a valid object path: xrandr-Apple
$ colormgr device-get-default-profile xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
Not a valid object path: xrandr_Apple_Computer_Inc_Color_LCD_evn_1000

I am getting an error that "Not a valid object path: …". A.B. do you know how to resolve this erorr?

A.B. answered: double quotes for the ID.

$ colormgr device-get-default-profile "xrandr-Apple Computer Inc-Color LCD"
Not a valid object path: xrandr-Apple Computer Inc-Color LCD

$ colormgr device-get-default-profile "xrandr_Apple_Computer_Inc_Color_LCD_evn_1000"
Not a valid object path: xrandr_Apple_Computer_Inc_Color_LCD_evn_1000

Pasted full path worked. Thanks A.B.!

$ colormgr device-get-default-profile /org/freedesktop/ColorManager/devices/xrandr_Apple_Computer_Inc_Color_LCD_evn_1000
Object Path:   /org/freedesktop/ColorManager/profiles/icc_df7c0067b1eb9bcc9fc9b33bc3a797eb
Owner:         root
Format:        ColorSpace..
Title:         D50
Qualifier:     RGB..
Type:          display-device
Colorspace:    rgb
Gamma Table:   Yes
System Wide:   Yes
Filename:      /usr/share/color/icc/colord/Gamma5000K.icc
Profile ID:    icc-df7c0067b1eb9bcc9fc9b33bc3a797eb
Metadata:      CMF_version=1.0.6
Metadata:      CMF_product=colord
Metadata:      FILE_checksum=df7c0067b1eb9bcc9fc9b33bc3a797eb
Metadata:      CMF_binary=cd-create-profile
Metadata:      License=CC0
Metadata:      DATA_source=test

Best Answer

from man colormgr

[..]

DESCRIPTION
       This manual page documents briefly the colormgr command.

       colormgr allows an administrator to view and change color profile to device mappings.

[..]

List all devices, eg:

$ colormgr get-devices 
Object Path:   /org/freedesktop/ColorManager/devices/cups_HP_Color_LaserJet_CP1514n
Owner:         root
Created:       Mai  9 2015, 07:57:21 
Modified:      Mai  9 2015, 07:57:21 
Type:          printer
Enabled:       Yes
Embedded:      No
Model:         HP Color LaserJet cp1514n
Vendor:        Hewlett Packard
Serial:        socket://192.168.2.160
Format:        ColorModel.MediaType.Resolution
Scope:         temp
Colorspace:    rgb
Device ID:     cups-HP_Color_LaserJet_CP1514n
Profile 1:     HP_Color_LaserJet_CP1514n-RGB..
Profile 2:     HP_Color_LaserJet_CP1514n-Gray..
Metadata:      OwnerCmdline=/usr/sbin/cupsd -l 

and get a profile with

$ colormgr device-get-default-profile cups-HP_Color_LaserJet_CP1514n
Object Path:   /org/freedesktop/ColorManager/profiles/HP_Color_LaserJet_CP1514n_RGB__
Owner:         root
Format:        ColorModel.MediaType.Resolution
Qualifier:     RGB..
Colorspace:    rgb
Scope:         temp
Gamma Table:   No
System Wide:   No
Profile ID:    HP_Color_LaserJet_CP1514n-RGB..

set a profile with:

colormgr device-make-profile-default cups-HP_Color_LaserJet_CP1514n /org/freedesktop/ColorManager/profiles/HP_Color_LaserJet_CP1514n_Gray__

check with:

$ colormgr device-get-default-profile cups-HP_Color_LaserJet_CP1514n                                                                        
Object Path:   /org/freedesktop/ColorManager/profiles/HP_Color_LaserJet_CP1514n_Gray__
Owner:         root
Format:        ColorModel.MediaType.Resolution
Qualifier:     Gray..
Colorspace:    gray
Scope:         temp
Gamma Table:   No
System Wide:   No
Profile ID:    HP_Color_LaserJet_CP1514n-Gray..
Related Question