Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 7, 2025

Implements HDR display detection via Windows Display Configuration APIs and adds user-facing controls without interfering with system color management.

Implementation

HDR Detection (HdrColorManager.cs)

  • P/Invoke to DisplayConfigGetDeviceInfo with DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO
  • Detects support/enabled status, color bit depth, Windows 11 Auto Color Management
  • Safe fallback to SDR capability on errors

UI Integration

  • System tray menu shows HDR status: Active (10-bit), Supported (Not Enabled), or SDR Display
  • Toggle for HDR-aware rendering (adjusts default color temperature from 0.5 to 0.55)
  • Updates help dialog with current HDR state

Technical Approach

  • Standard WPF rendering in sRGB; Windows DWM handles HDR conversion
  • No ICC profile modification or custom color space management
  • Zero impact on other applications' color pipelines

Manifest

  • Added Windows 10+ compatibility declarations for advanced color APIs
  • Maintains Per-Monitor V2 DPI awareness

Example

// Detect HDR capability at startup
_hdrCapability = HdrColorManager.DetectHdrCapability();

if (_hdrCapability?.IsHdrActive == true && _hdrAwareRenderingEnabled)
{
    SetColorTemperature(HdrColorManager.GetRecommendedColorTemperatureForHdr());
}

System tray menu dynamically reflects capabilities:

  • 🎨 HDR Active (10-bit) + ✓ HDR-Aware Rendering toggle
  • 🎨 HDR Supported (Not Enabled) for hardware-capable displays
  • 🎨 SDR Display for standard displays
  • ℹ️ Auto Color Management Active on Windows 11+
Original prompt

This section details on the original issue you should resolve

<issue_title>Fully support HDR</issue_title>
<issue_description>What's involved to support HDR fully without affecting other apps</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 6 commits December 7, 2025 21:32
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
… remove unrelated manifest setting

Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
… version check, add constant for neutral color temp, fix docs

Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
…ser feedback

Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Co-authored-by: shanselman <2892+shanselman@users.noreply.github.com>
Copilot AI changed the title [WIP] Fully support HDR without affecting other apps Add HDR/Advanced Color detection and awareness Dec 7, 2025
Copilot AI requested a review from shanselman December 7, 2025 21:45
- True HDR brightness using scRGB color space (R16G16B16A16_Float)
- DirectComposition for per-pixel alpha transparency
- Click-through overlay window
- Matches WPF geometry (EdgeThickness=80, OuterRadius=100, InnerRadius=60)
- Dynamic DPI scaling support
- Unified brightness/color temp controls work in both modes
- Inner and outer glow effects (76px extent)
- Clean menu with grayed-out option when HDR unavailable
- Fixed exit crash, safe resource disposal
- Toggle light works in HDR mode
- Multi-monitor features show limitation message in HDR mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fully support HDR

2 participants