Adjust the white point, gamma or make your XDR display darker without losing HDR peak luminance or the ability to adjust display brightness

Overview

XDR Tuner

Adjust the white point, gamma or make your XDR display darker without losing HDR peak luminance or the ability to adjust display brightness

Project: https://github.com/supercurio/xdr-tuner

Purpose

On the 2021 MacBook Pro M1 Pro & M1 Max running macOS Monterey 12.0.1, the "Apple XDR Display (P3-1600 nits)" and "Apple Display (P3-500 nits)" presets calibration cannot be "fine-tuned" in the display settings.

At the same time, calibrating the display using a sensor with X-Rite i1Profiler clips all the colors above SDR levels to SDR maximums, preventing the system to show HDR content.

However, there is a variation in the factory calibration between units, and the white point on yours might not perceptually matching the D65 spec, nor your other calibrated displays.

XDR Tuner lifts all the restrictions of the display presets by leveraging the support of full dynamic range max and gamma parameters for red/green/blue channels in ColorSync ICC profiles vcgt tag.

This allows to change the display's white point freely without limiting losing HDR support, limiting HDR peak brightness to full-screen luminance, losing the ability to adjust brightness or introducing banding artifacts.

Usage

This is script, it will need to be launched in a terminal like in the Terminal application.
Once your command shell is in this directory, you will be able to launch the script with the following commands.

Launch with default settings and sample configuration

./xdr-tuner.py

This will create a custom profile based on your system-generated one for your display, and apply it immediately.

Customize config and apply automatically

./xdr-tuner.py --loop

Then modify configs/default.json in any text editor until you get the desired color presentation.
Typically, you can open a white page or image and color-match the white point of the XDR display visually with a reference monitor.

Once finished, interrupt xdr-tuner with ctrl-c.

I would only like to lower the minimum brightness

./xdr-tuner.py --config configs/dim.json

If you find the display still too bright at the minimum brightness allowed by the system, applying the dark config will allow to make it darker. By changing the values for red, green and blue in the max section, you can make the display as dark as you'd like.

Changing the gamma to values lower than 1 might help with legibility when the screen is very dim.

Reset to factory profile

./xdr-tuner.py --reset

Set and apply an existing ICC profile

./xdr-tuner.py -a path/to/your-profile.icc

Print help

./xdr-tuner.py --help

Compatible with TrueTone and Night Shift

Both functionalities will work as expected, using your tuned display profile as reference, with no difference compared to factory calibration.

Limitations & TODO

  • This utility was not tested yet with multiple displays connected.
    Support will be added in a future version.
  • The profiles are not re-applied automatically at boot at the moment.
    Coming in a next version - stay tuned for updates
  • Switching between presets in Display Preferences resets the tuning, which needs to be re-applied manually. It looks like a bug in macOS color management, which should re-apply the current profile by itself.
    I don't know how to fix this currently.
  • No GUI: someone experienced with macOS gui app development is welcome to contribute a gui for this, or use this script as a mean to generate and apply the profiles. The license is liberal so maybe you will create your own utility inspired by this. Would appreciate a mention and shout out!
  • Ultimately, I think Apple should provide this capability out of the box in a system update. Hopefully, various display calibration software will gain full HDR support. This is still very new.
  • Better error management needs to be implemented

Bugs and issues

Please report any issue encountered in the dedicated section on Github.

This will help me or contributors to improve this software.

Story behind this

After recently receiving my 2021 MacBook Pro 16.2, I was happy with the device overall but really bummed that its display had too much blue and green, giving a greyish-green tint to all content displays.

Exploring the tuning option offered and trying i1Profiler led to unsatisfactory results as I didn't want to give up on 1600-nits HDR peak brightness nor the ability to adjust display brightness, including automatically with the light sensor.

My options were to return it, wait 2 months for a new custom order to be fulfilled and hope for the best on the new factory calibration, or give it for repair, giving up the ability to return it later and with unknown results.

So I decided to use all this frustration as motivation and leveraged my experience with display calibration and development.

And I'm very happy with the results :D

This solves all the problems I had with color matching displays.
Tuning is also a lot easier than by setting Yxy coordinates in Apple's solution, which is currently not very useful as the popular colorimeter sensors are lacking corrections matrices for the new type of phosphors the Liquid Retina XDR display are using.
Very few people can access a high resolution spectrophotometer that which is required to do a real D65 and colorspace calibration on this panel otherwise.
I tested my old i1Pro, its results are worthless with all the illuminant observer types known.

Credits

Thanks to Timothy Sutton with customdisplayprofiles and Chromium authors with color_profile_manager_mac.py for the inspiration and sample code.

Author

François Simond (supercurio)
https://twitter.com/supercurio

Owner
François Simond
François Simond
This interactive script demonstrates the Menezes-Vanstone-EC-Cryptosystem

Menezes-Vanstone-EC-Cryptosystem This interactive script demonstrates the Meneze

Nishaant Goswamy 1 Jan 02, 2022
PSP (Python Starter Package) is meant for those who want to start coding in python but are new to the coding scene.

Python Starter Package PSP (Python Starter Package) is meant for those who want to start coding in python, but are new to the coding scene. We include

Giter/ 1 Nov 20, 2021
Easy Alias's for bash

easy-alias Easy Alias's for bash Setup Your system needs to have 'echo' which every 21st century computer has You dont need any python requirments but

Hashm 2 Jan 18, 2022
WordlistPasswordGenerator - Shuhfab Basheer

WordlistPasswordGenerator - Shuhfab Basheer Python wordlist generator MAINTAINER

1 Dec 31, 2021
A dashboard for your code. A build system.

NOTICE: THIS REPO IS NO LONGER UPDATED Changes Changes is a build coordinator and reporting solution written in Python. The project is primarily built

Dropbox 763 Sep 09, 2022
A module that can manage you're gtps

Growtopia Private Server Controler Module For Controle Your GTPS | Build in Python3 Creator Information

iFanpS 6 Jan 14, 2022
These are my solutions to Advent of Code problems.

Advent of Code These are my solutions to Advent of Code problems. If you want to join my leaderboard, the code is 540750-9589f56d. When I solve for sp

Sumner Evans 5 Dec 19, 2022
KeyLogger cliente-servidor em Python para estudos

KeyLogger Esse projeto é apenas para estudos, não nos responsabilisamos por qualquer uso indevido ou prejudiciais do mesmo. Sobre O objetivo do projet

1 Dec 17, 2021
Repo contains Python Code Reference to learn Python in a week, It also contains Machine Learning Algorithms and some examples for Practice, Also contains MySql, Tableau etc

DataScience_ML_and_Python Repo contains Python Code Reference to learn Python in a week, It also contains Machine Learning Algorithms and some example

Meerabo D Shah 1 Jan 17, 2022
Shai-Hulud - A qtile configuration for the (spice) masses

Shai-Hulud - A qtile configuration for the (spice) masses Installation Notes These dotfiles are set up to use GNU stow for installation. To install, f

16 Dec 30, 2022
「📖」Tool created to extract metadata from a domain

Metafind is an OSINT tool created with the aim of automating the search for metadata of a particular domain from the search engine known as Google.

9 Dec 28, 2022
A class to draw curves expressed as L-System production rules

A class to draw curves expressed as L-System production rules

Juna Salviati 6 Sep 09, 2022
Svg-turtle - Use the Python turtle to write SVG files

SaVaGe Turtle Use the Python turtle to write SVG files If you're using the Pytho

Don Kirkby 7 Dec 21, 2022
WriteAIr is a website which allows users to stream their writing.

WriteAIr is a website which allows users to stream their writing. It uses HSV masking to detect a pen which the user writes with. Plus, users can select a wide range of options through hand gestures!

Atharva Patil 1 Nov 01, 2021
JARVIS PC Assistant is an assisting program to make your computer easier to use

JARVIS-PC-Assistant JARVIS PC Assistant is an assisting program to make your computer easier to use Welcome to the J.A.R.V.I.S. PC Assistant help file

Dasun Nethsara 2 Dec 02, 2022
An alternative app for core Armoury Crate functions.

NoROG DISCLAIMER: Use at your own risk. This is alpha-quality software. It has not been extensively tested, though I personally run it daily on my lap

12 Nov 29, 2022
easy_sbatch - Batch submitting Slurm jobs with script templates

easy_sbatch - Batch submitting Slurm jobs with script templates

Wei Shen 13 Oct 11, 2022
A new mini-batch framework for optimal transport in deep generative models, deep domain adaptation, approximate Bayesian computation, color transfer, and gradient flow.

BoMb-OT Python3 implementation of the papers On Transportation of Mini-batches: A Hierarchical Approach and Improving Mini-batch Optimal Transport via

Khai Ba Nguyen 18 Nov 14, 2022
A python script to simplify recompiling, signing and installing reverse engineered android apps.

urszi.py A python script to simplify the Uninstall Recompile Sign Zipalign Install cycle when reverse engineering Android applications. It checks if d

Ahmed Harmouche 4 Jun 24, 2022
A wrapper script to make working with ADB (Android Debug Bridge) easier

Python-ADB-Wrapper A wrapper script to make working with ADB (Android Debug Bridge) easier This project was just a simple test to see if I could wrap

18iteration 1 Nov 25, 2021