[PR #1828] [CLOSED] v1 Color Temperature Control #1291

Closed
opened 2026-05-05 07:10:21 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MonitorControl/MonitorControl/pull/1828
Author: @claycantrell
Created: 1/7/2026
Status: Closed

Base: mainHead: main


📝 Commits (1)

  • 91edbcd v1 Color Temperature Control

📊 Changes

8 files changed (+89 additions, -29 deletions)

View changed files

📝 MonitorControl/Enums/PrefKey.swift (+5 -2)
📝 MonitorControl/Model/OtherDisplay.swift (+9 -3)
📝 MonitorControl/Support/DisplayManager.swift (+21 -21)
📝 MonitorControl/Support/MenuHandler.swift (+8 -0)
📝 MonitorControl/Support/SliderHandler.swift (+13 -1)
📝 MonitorControl/UI/Base.lproj/Main.storyboard (+15 -0)
📝 MonitorControl/UI/en.lproj/Localizable.strings (+3 -0)
📝 MonitorControl/View Controllers/Preferences/MenuslidersPrefsViewController.swift (+15 -2)

📄 Description

Add Color Temperature Control via DDC

Summary

  • Adds a new Color Temperature slider to MonitorControl that adjusts display warmth/coolness via DDC commands
  • Implements color temperature by modulating Video Gain Red and Video Gain Blue DDC values
  • Adds UI toggle in App Menu preferences to show/hide the Color Temperature slider
  • Includes groundwork for per-display advanced settings for Color Temperature (DDC min/max overrides, curve, invert, remap)

How It Works

The color temperature control uses a simplified Kelvin-to-RGB approach:

  • Slider at 0 (Cool/~9300K): Red gain = 40, Blue gain = 70
  • Slider at 0.5 (Neutral/~6500K): Red gain = 50, Blue gain = 50
  • Slider at 1 (Warm/~2700K): Red gain = 60, Blue gain = 30

This creates an asymmetric adjustment where blue changes more dramatically than red, mimicking real color temperature behavior.

Files Changed

File Changes
MonitorControl/Enums/PrefKey.swift Added showColorTemperature preference key
MonitorControl/Support/MenuHandler.swift Added Color Temperature slider to menu (between Volume and Contrast)
MonitorControl/Support/SliderHandler.swift Implemented DDC write logic using videoGainRed/videoGainBlue
MonitorControl/View Controllers/Preferences/MenuslidersPrefsViewController.swift Added checkbox to toggle Color Temperature slider visibility
MonitorControl/UI/Base.lproj/Main.storyboard Added "Show color temperature slider" checkbox in App Menu preferences
MonitorControl/View Controllers/Preferences/DisplaysPrefsCellView.swift Added IBOutlets for per-display Color Temperature advanced settings
MonitorControl/View Controllers/Preferences/DisplaysPrefsViewController.swift Added enable/disable logic for Color Temperature controls
MonitorControl/Model/OtherDisplay.swift Fixed edge case where maxDDC ≤ minDDC would cause division issues
MonitorControl/UI/en.lproj/Localizable.strings Added "Color Temperature" localization string

Known Limitations

  • Per-display advanced settings UI (DDC min/max, curve, invert, remap) for Color Temperature not yet wired in storyboard - IBOutlets are ready but UI elements need to be added in Interface Builder
  • Color temperature uses Video Gain Red/Blue which may not be supported on all monitors

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MonitorControl/MonitorControl/pull/1828 **Author:** [@claycantrell](https://github.com/claycantrell) **Created:** 1/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`91edbcd`](https://github.com/MonitorControl/MonitorControl/commit/91edbcdb2d339ec38cb463b1043b8223fd0f2d2b) v1 Color Temperature Control ### 📊 Changes **8 files changed** (+89 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `MonitorControl/Enums/PrefKey.swift` (+5 -2) 📝 `MonitorControl/Model/OtherDisplay.swift` (+9 -3) 📝 `MonitorControl/Support/DisplayManager.swift` (+21 -21) 📝 `MonitorControl/Support/MenuHandler.swift` (+8 -0) 📝 `MonitorControl/Support/SliderHandler.swift` (+13 -1) 📝 `MonitorControl/UI/Base.lproj/Main.storyboard` (+15 -0) 📝 `MonitorControl/UI/en.lproj/Localizable.strings` (+3 -0) 📝 `MonitorControl/View Controllers/Preferences/MenuslidersPrefsViewController.swift` (+15 -2) </details> ### 📄 Description ## Add Color Temperature Control via DDC ### Summary - Adds a new Color Temperature slider to MonitorControl that adjusts display warmth/coolness via DDC commands - Implements color temperature by modulating Video Gain Red and Video Gain Blue DDC values - Adds UI toggle in App Menu preferences to show/hide the Color Temperature slider - Includes groundwork for per-display advanced settings for Color Temperature (DDC min/max overrides, curve, invert, remap) ### How It Works The color temperature control uses a simplified Kelvin-to-RGB approach: - **Slider at 0 (Cool/~9300K):** Red gain = 40, Blue gain = 70 - **Slider at 0.5 (Neutral/~6500K):** Red gain = 50, Blue gain = 50 - **Slider at 1 (Warm/~2700K):** Red gain = 60, Blue gain = 30 This creates an asymmetric adjustment where blue changes more dramatically than red, mimicking real color temperature behavior. ### Files Changed | File | Changes | |------|---------| | `MonitorControl/Enums/PrefKey.swift` | Added `showColorTemperature` preference key | | `MonitorControl/Support/MenuHandler.swift` | Added Color Temperature slider to menu (between Volume and Contrast) | | `MonitorControl/Support/SliderHandler.swift` | Implemented DDC write logic using `videoGainRed`/`videoGainBlue` | | `MonitorControl/View Controllers/Preferences/MenuslidersPrefsViewController.swift` | Added checkbox to toggle Color Temperature slider visibility | | `MonitorControl/UI/Base.lproj/Main.storyboard` | Added "Show color temperature slider" checkbox in App Menu preferences | | `MonitorControl/View Controllers/Preferences/DisplaysPrefsCellView.swift` | Added IBOutlets for per-display Color Temperature advanced settings | | `MonitorControl/View Controllers/Preferences/DisplaysPrefsViewController.swift` | Added enable/disable logic for Color Temperature controls | | `MonitorControl/Model/OtherDisplay.swift` | Fixed edge case where maxDDC ≤ minDDC would cause division issues | | `MonitorControl/UI/en.lproj/Localizable.strings` | Added "Color Temperature" localization string | ### Known Limitations - Per-display advanced settings UI (DDC min/max, curve, invert, remap) for Color Temperature not yet wired in storyboard - IBOutlets are ready but UI elements need to be added in Interface Builder - Color temperature uses Video Gain Red/Blue which may not be supported on all monitors --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 07:10:21 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/MonitorControl#1291
No description provided.