Created
November 28, 2025 10:44
-
-
Save rliessum/288604c6899e898957dc5d504ce76a48 to your computer and use it in GitHub Desktop.
Script to set an optimal color profile and balance on a Corsair Xeneon Edge touchscreen display on macOS without using iCue.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Corsair Xeneon Edge Color Calibration Script | |
| # Based on Tweakers.net review findings: | |
| # https://tweakers.net/reviews/13662/corsair-xeneon-edge-tof-idee-maar-dramatisch-uitgevoerd.html | |
| # | |
| # The factory settings prioritize brightness (365 cd/m²) over color accuracy. | |
| # This script applies calibrated settings for better color reproduction (~255 cd/m²). | |
| set -e | |
| echo "==============================================" | |
| echo " Corsair Xeneon Edge Color Calibration Tool" | |
| echo "==============================================" | |
| echo "" | |
| echo "Factory settings sacrifice color accuracy for brightness." | |
| echo "This script applies calibrated settings for better colors." | |
| echo "" | |
| # Check for m1ddc | |
| if ! command -v m1ddc &> /dev/null; then | |
| echo "Error: m1ddc not found." | |
| echo "Install with: brew install m1ddc" | |
| exit 1 | |
| fi | |
| # Detect displays | |
| echo "Detecting displays..." | |
| m1ddc display list | |
| echo "" | |
| # Find Xeneon display number | |
| DISPLAY_NUM=$(m1ddc display list | grep -n -i "Xeneon\|Corsair\|32QHD" | head -n1 | cut -d: -f1) | |
| if [ -z "$DISPLAY_NUM" ]; then | |
| echo "Corsair Xeneon not found by name. Available displays:" | |
| m1ddc display list | |
| echo "" | |
| read -p "Enter display number: " DISPLAY_NUM | |
| fi | |
| echo "Target Display: $DISPLAY_NUM" | |
| echo "" | |
| # Functions | |
| get_val() { | |
| m1ddc display "$DISPLAY_NUM" get "$1" 2>/dev/null || echo "N/A" | |
| } | |
| set_val() { | |
| echo -n " $3: $2... " | |
| if m1ddc display "$DISPLAY_NUM" set "$1" "$2" 2>/dev/null; then | |
| echo "✓" | |
| else | |
| echo "✗" | |
| fi | |
| } | |
| echo "==============================================" | |
| echo " Current Settings (Factory)" | |
| echo "==============================================" | |
| echo " Luminance: $(get_val luminance)" | |
| echo " Contrast: $(get_val contrast)" | |
| echo " Red: $(get_val red)" | |
| echo " Green: $(get_val green)" | |
| echo " Blue: $(get_val blue)" | |
| echo "" | |
| echo "==============================================" | |
| echo " Applying Calibrated Profile" | |
| echo "==============================================" | |
| echo "" | |
| echo "Factory problem: 11,907K color temp (should be 6500K)" | |
| echo "Factory RGB: R=151, G=127, B=139 (0-255 scale) - way too blue!" | |
| echo "" | |
| # Backlight/Luminance: 50 for ~150 cd/m² (good for indoor use) | |
| set_val luminance 90 "Luminance (50% = ~150 cd/m²)" | |
| # Contrast: 50 (neutral - review says changing this does more harm than good) | |
| set_val contrast 60 "Contrast (50% = neutral)" | |
| # RGB Gains - Tweakers calibrated values converted from iCUE 0-255 to DDC 0-100 | |
| set_val red 50 "Red Gain (50 = iCUE 127)" | |
| set_val green 41 "Green Gain (41 = iCUE 105)" | |
| set_val blue 35 "Blue Gain (35 = iCUE 89)" | |
| echo "" | |
| echo "==============================================" | |
| echo " Verification" | |
| echo "==============================================" | |
| echo " Luminance: $(get_val luminance)" | |
| echo " Contrast: $(get_val contrast)" | |
| echo " Red: $(get_val red)" | |
| echo " Green: $(get_val green)" | |
| echo " Blue: $(get_val blue)" | |
| echo "" | |
| # Try to set Picture Mode if BetterDisplay is available | |
| BD_CLI="/Applications/BetterDisplay.app/Contents/MacOS/BetterDisplay" | |
| if [ -x "$BD_CLI" ]; then | |
| echo "==============================================" | |
| echo " Setting Picture Mode via BetterDisplay" | |
| echo "==============================================" | |
| # Try sRGB preset (VCP 0x14 = 1) | |
| "$BD_CLI" set -ddc="0x14:0x01" 2>/dev/null && echo " ✓ Picture Mode: sRGB" || echo " ✗ Could not set preset" | |
| echo "" | |
| fi | |
| echo "==============================================" | |
| echo " Calibration Complete!" | |
| echo "==============================================" | |
| echo "" | |
| echo " • Color temp: 6500K (was 11,907K factory!)" | |
| echo " • Gray deviation: 3.12 (excellent)" | |
| echo " • ColorChecker deviation: 2.94 (excellent)" | |
| echo " • Brightness: ~150 cd/m² (comfortable indoor)" | |
| echo "" | |
| echo "Settings are stored ON THE DISPLAY itself," | |
| echo "" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment