Repository navigation
Description
🤖 This pull request was created by Repo Assist, an automated AI assistant.
Problem
CreateMonitorWindow() creates gradient stops with hardcoded neutral-white values (RGB 255,255,255 / 240,240,240) regardless of the user's current colour temperature setting. If a user has set a warm or cool temperature and then enables "Show on All Monitors", the additional monitor windows always appear white — they ignore the current colour temperature until the user adjusts it again.
Root Cause
The gradient initialisation in CreateMonitorWindow() was:
gradient.GradientStops.Add(new GradientStop(Color.FromRgb(240, 240, 240), 0.3));
gradient.GradientStops.Add(new GradientStop(Color.FromRgb(255, 255, 255), 0.5));
gradient.GradientStops.Add(new GradientStop(Color.FromRgb(240, 240, 240), 0.7));These hardcoded values don't use _colorTemperature. By contrast, SetColorTemperature() and UpdateAdditionalMonitorWindows() correctly apply the cool→warm lerp to stops where 0.2 < offset < 0.8.
Fix
Compute the mid-colour from _colorTemperature using the same cool (220,235,255) → warm (255,220,180) lerp, and use it for the 0.3, 0.5, and 0.7 gradient stops when creating each additional monitor window.
var cool = Color.FromRgb(220, 235, 255);
var warm = Color.FromRgb(255, 220, 180);
byte LerpByte(byte x, byte y, double t) => (byte)(x + (y - x) * t);
var midColor = Color.FromArgb(255,
LerpByte(cool.R, warm.R, _colorTemperature),
LerpByte(cool.G, warm.G, _colorTemperature),
LerpByte(cool.B, warm.B, _colorTemperature));
gradient.GradientStops.Add(new GradientStop(midColor, 0.3));
gradient.GradientStops.Add(new GradientStop(midColor, 0.5));
gradient.GradientStops.Add(new GradientStop(midColor, 0.7));Trade-offs
- Minimal: 11 lines changed in one method, no logic changes elsewhere.
- No new dependencies.
- At the default temperature (
0.5), mid-colour changes from(240,240,240)to(237,227,217)— a subtle warm-white, consistent with the main window at default settings.
Test Status
| Step | Result |
|---|---|
dotnet build /p:EnableWindowsTargeting=true |
✅ 0 errors, 0 warnings |
Note
🔒 Integrity filter blocked 1 item
The following item were blocked because they don't meet the GitHub integrity level.
- Detect camera is being used by another application and automatically turn on #21
list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
To allow these resources, lower min-integrity in your GitHub frontmatter:
tools:
github:
min-integrity: approved # merged | approved | unapproved | noneGenerated by Repo Assist · ● 3.2M · ◷
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@cbb46ab386962aa371045839fc9998ee4e97ca64
Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch repo-assist/fix-initial-color-temp-additional-monitors-2026-07-12-80400a09ec2f1674.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (63 of 63 lines)
From 920078e35fac32db97774e7e20afa53192ef2f08 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Sun, 12 Jul 2026 13:16:33 +0000
Subject: [PATCH] fix: initialise additional monitor gradient with current
colour temperature
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
CreateMonitorWindow() was creating gradient stops with hardcoded
neutral-white values (RGB 255,255,255 / 240,240,240) regardless of the
user's current colour temperature setting. Any temperature change made
before toggling "Show on All Monitors" was ignored on the new windows —
they always appeared white until the user adjusted the temperature again.
Fix: compute the mid-colour from _colorTemperature using the same
cool (220,235,255) → warm (255,220,180) lerp as SetColorTemperature(),
and use it for the 0.3, 0.5 and 0.7 gradient stops when creating each
additional monitor window.
Build: 0 errors, 0 warnings (net10.0-windows, EnableWindowsTargeting=true)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
WindowsEdgeLight/MainWindow.xaml.cs | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/WindowsEdgeLight/MainWindow.xaml.cs b/WindowsEdgeLight/MainWindow.xaml.cs
index 3644301..e82535b 100644
--- a/WindowsEdgeLight/MainWindow.xaml.cs
+++ b/WindowsEdgeLight/MainWindow.xaml.cs
@@ -1082,16 +1082,23 @@ Version {version}";
Visibility = isLightOn ? Visibility.Visible : Visibility.Collapsed
};
- // Create gradient brush
+ // Create gradient brush matching the current color temperature
var gradient = new LinearGradientBrush
{
StartPoint = new System.Windows.Point(0, 0),
EndPoint = new System.Windows.Point(1, 1)
};
+ var cool = System.Windows.Media.Color.FromRgb(220, 235, 255);
+ var warm = System.Windows.Media.Color.FromRgb(255, 220, 180);
+ byt
... (truncated)
Activity
shanselman commentedon Aug 8, 2026
Duplicate of #131.