Skip to content

Fix ControlPaint.Light interpolation for system colors - #14833

Merged
Shyam-Gupta merged 1 commit into
mainfrom
dev/shgu/light
Jul 31, 2026
Merged

Shyam-Gupta merged 1 commit into
mainfrom
dev/shgu/light

Conversation

@Shyam-Gupta

@Shyam-Gupta Shyam-Gupta commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Issue: ControlPaint.Light returned incorrect colors for SystemColors.Control because interpolation performed an intermediate byte cast.

Solution: Perform interpolation using integer arithmetic and cast to byte only once at the end.

Testing: All System.Windows.Forms.Tests.ControlPaintTests now pass successfully

Microsoft Reviewers: Open in CodeFlow

@Shyam-Gupta
Shyam-Gupta requested a review from a team as a code owner July 31, 2026 20:13
@Shyam-Gupta Shyam-Gupta self-assigned this Jul 31, 2026
@Shyam-Gupta
Shyam-Gupta merged commit 480ddfb into main Jul 31, 2026
10 checks passed
@Shyam-Gupta
Shyam-Gupta deleted the dev/shgu/light branch July 31, 2026 23:15
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 3, 2026
SimonZhao888 pushed a commit to SimonZhao888/v-weidzh-winforms that referenced this pull request Aug 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants