Fix HslColor.A setter clamping to always be 0 by xDeeKay · Pull Request #36 · TeamAntumbra/wintumbra · GitHub
Skip to content

Fix HslColor.A setter clamping to always be 0 - #36

Merged
walshie4 merged 1 commit into
TeamAntumbra:masterfrom
xDeeKay:fix/hslcolor-alpha-setter
Aug 4, 2026
Merged

Fix HslColor.A setter clamping to always be 0#36
walshie4 merged 1 commit into
TeamAntumbra:masterfrom
xDeeKay:fix/hslcolor-alpha-setter

Conversation

@xDeeKay

@xDeeKay xDeeKay commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Math.Min and Math.Max arguments were swapped, so any assigned value was clamped to 0 regardless of input. Now clamps to the valid 0-255 range, matching the pattern used by the H/L/S setters.

Testing: This bug isn't actually reachable anywhere in the app, since nothing sets the Alpha value through this property. I confirmed the fix works by using a small separate test program, checking that values now clamp properly between 0 and 255 rather than always coming out as 0.

Math.Min and Math.Max arguments were swapped, so any assigned value
was clamped to 0 regardless of input. Now clamps to the valid 0-255
range, matching the pattern used by the H/L/S setters.
@walshie4
walshie4 merged commit 53f05b3 into TeamAntumbra:master Aug 4, 2026
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.

2 participants