Skip to content

Instantly share code, notes, and snippets.

@Podbrushkin
Created November 20, 2025 09:43
Show Gist options
  • Select an option

  • Save Podbrushkin/df396554c61d9b4e454305973f32820c to your computer and use it in GitHub Desktop.

Select an option

Save Podbrushkin/df396554c61d9b4e454305973f32820c to your computer and use it in GitHub Desktop.
Linux Color Management

Without Profiles

There are some saturation extensions which work nice for X11 but bad for Wayland: https://extensions.gnome.org https://github.com/zb3/gnome-saturation-extension

In some systems nVidia control panel has color settings:

nvidia-settings

Should look like this: https://askubuntu.com/a/664299 but no such option for me. When I switch Primary GPU from Intel to nVidia and reboot, new props appear, but no color props. ctm doesn't appear in xrandr either. xrandr display id changes to eDP-1-1. Performance and heat issues appear. Mouse lags a little bit.

# You can make white less white, but can't change black in xrandr with gamma/brightness props:
xrandr --output eDP-1 --gamma ('{0}:{0}:{0}' -f 1.9) --brightness 0.5

# This one changes black point!
xcalib -brightness 10 -alter 

xcalib defaults: gamma=1.0 brightness=0.0 and contrast=100.0.

To reset xcalib use one of these:

  • Restart PC;
  • Alt+F2 -> xcalib -clear -> Enter;
  • Ctrl+Alt+Delete and wait for 60s or press Right, Enter

xrandr BroadcastRGB

# Check Broadcast RGB available values (default: Automatic):
xrandr --props | sls 'Broadcast RGB' -Context 0,1 | select -f 1
#>       Broadcast RGB: Limited 16:235
#                supported: Automatic, Full, Limited 16:235

# Change to Limited:
xrandr --output eDP-1 --set "Broadcast RGB" "Limited 16:235"
# Black is now less black, white is less white, screen is softer.
# Will reset to default after reboot.

libvibrant

X11 only https://github.com/libvibrant/libvibrant https://unix.stackexchange.com/a/730078

git clone --depth 1 https://github.com/libvibrant/libvibrant.git
# sudo apt install cmake
# sudo apt install libx11-dev libxrandr-dev libxext-dev libxi-dev
# sudo apt install nvidia-settings libxnvctrl-dev
cmake ..
& ./build/cli/vibrant-cli --version

# FAIL
# CTM should be supported by driver/display for libvibrant to work:
# xrandr --properties | sls ctm

KDE has saturation settings? https://zamundaaa.github.io/wayland/2023/12/18/update-on-hdr-and-colormanagement-in-plasma.html

Color profiles

# Show device and Profile is clr mngmt
colormgr get-devices

$displayId = colormgr get-devices | sls 'Device ID' -Raw | % {($_ -split ':')[1].trim()}
# xrandr-Samsung Display Corp.-0x415d-0x00000000

# Get available (installed) icc profiles
$profiles = (colormgr get-profiles) -join "`n" -split "`n(?=`n)"
$profiles -cmatch 'Title:\s+Gray\n'

$profilesStr = (colormgr get-profiles) -join "`n" -split "`n(?=`n)"
$profiles = $profilesStr | % {
$map = [ordered]@{}
$_ -split "`n" | % { if ($_ -match '(.*?):\s*(.*)') { $map[$Matches[1]] = $Matches[2]} }
[pscustomobject]$map
}

# These affect fullscreen system-wide
$profiles | ? 'System Wide' -eq 'Yes' | ? 'Gamma Table' -eq 'Yes' | select Title,Filename

#Title Filename
#----- --------
#Blue  /usr/share/color/icc/colord/Bluish.icc
#D50   /usr/share/color/icc/colord/Gamma5000K.icc
#D55   /usr/share/color/icc/colord/Gamma5500K.icc
#D65   /usr/share/color/icc/colord/Gamma6500K.icc


# Pick a Gray one, add it to device and set as default
$profileId = 'icc-14c5ddbb0abd000deb198c68bb185dc3'
colormgr device-add-profile $displayId $profileId
colormgr device-make-profile-default $displayId $profileId

# Delete all installed profiles
$installedProfiles = colormgr get-devices | sls 'Profile \d' -Raw | % {($_ -split ':')[1].trim()}
$installedProfiles | % { colormgr delete-profile $_ }

# This one will appear after relogin:
# Profile 1:     icc-56890e134da6d885347454ec69676e9c
# /home/user/.local/share/icc/edid-2d746c6f9742c254bcca10f9628a2025.icc
function Get-ColorProfiles() {
$profilesStr = (colormgr get-profiles) -join "`n" -split "`n(?=`n)"
$profilesStr | % {
$map = [ordered]@{}
$_ -split "`n" | % { if ($_ -match '(.*?):\s*(.*)') { $map[$Matches[1]] = $Matches[2]} }
[pscustomobject]$map
}
}

Gnome Image Viewer is color managed for files, shotwell viewer is not, Firefox displays tigers ok but not google/yt logo.

Gamma tool

https://github.com/zb3/gnome-gamma-tool

python3 ./gnome-gamma-tool-export.py -g 0.8 -t 6000 -o my_profile.icc
$iccFile = gi ./my_profile.icc

# This will give you profile id
colormgr import-profile $iccFile

# This command will change screen appearance immideately
colormgr device-add-profile $displayId $profileId

# This command will delete profile you've just imported and change screen immideately
colormgr delete-profile $profileId

Gnome Color Management

It provides gcm-viewer GUI to inspect installed profiles.

# It's different from what you see in Settings:
sudo apt install gnome-color-manager

# These binaries will be added:
dpkg -L gnome-color-manager | sls bin

# /usr/bin
# /usr/bin/gcm-import
# /usr/bin/gcm-inspect
# /usr/bin/gcm-picker
# /usr/bin/gcm-viewer

# Launch this one:
gcm-viewer

Fullscreen or not

Install ArgyllCMS

#Windows
$url = 'https://www.argyllcms.com/Argyll_V3.4.1_win64_exe.zip'
$outFile = $url -replace '.*/'
Invoke-RestMethod $url -OutFile "~/downloads/$outFile"
7z x "C:\Users\user\downloads\Argyll_V3.4.1_win64_exe.zip" '-OC:\Users\user\AppData\Local\Programs\'

# At Ubuntu
sudo apt install argyll
$iccDump = gi 'C:\Users\user\AppData\Local\Programs\Argyll_V3.4.1\bin\iccdump.exe'
gci D:\icc\fromubuntu\ | % {
$iccFile = $_
$out = & $iccDump $iccFile 2>$null
if ($out -match 'vcgt') {Write-Host $iccFile}
}
# Only 4 files change full screen:
#D:\icc\fromubuntu\Bluish.icc
#D:\icc\fromubuntu\Gamma5000K.icc
#D:\icc\fromubuntu\Gamma5500K.icc
#D:\icc\fromubuntu\Gamma6500K.icc

# Same with iccdump
gci '/usr/share/color/icc/colord/' | % {
$iccFile = $_
$out = & $iccDump $iccFile 2>$null
if ($out -match 'vcgt') {Write-Host $iccFile}
}

# Can get display name with exiftool:
exiftool -json '-icc_profile:ProfileDescription' $iccFile | fromJson | % ProfileDescription

# /usr/share/color/icc/colord/Bluish.icc
# /usr/share/color/icc/colord/Gamma5000K.icc
# /usr/share/color/icc/colord/Gamma5500K.icc
# /usr/share/color/icc/colord/Gamma6500K.icc

This one is how to create icc with vcgt? https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.color.org/groups/medical/displays/controllingVCGT.pdf

At "notebook check" you can find some profiles for similar models.

For non-laptop screens there are ddcutil and ddccontrol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment