Skip to content

fix(BezelNotification): handle non-RGB colorspace for background tint alpha#35

Open
Jah-yee wants to merge 1 commit into
BlueHuskyStudios:masterfrom
Jah-yee:fix/non-rgb-tints
Open

fix(BezelNotification): handle non-RGB colorspace for background tint alpha#35
Jah-yee wants to merge 1 commit into
BlueHuskyStudios:masterfrom
Jah-yee:fix/non-rgb-tints

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

When rawBackgroundTint is not in an RGB colorspace, getRed() returns false and the alpha parameter is left unmodified (zero), making the tint fully-transparent. Use alphaComponent as a fallback for non-RGB colorspaces so that tint works correctly regardless of the source color's colorspace.

Fixes #28

… alpha

When rawBackgroundTint is not in an RGB colorspace, getRed() returns
false and the alpha parameter is left unmodified (zero), making the
tint fully-transparent. Use alphaComponent as a fallback for non-RGB
colorspaces so that tint works correctly regardless of the source
color's colorspace.

Fixes BlueHuskyStudios#28
@Jah-yee

Jah-yee commented Jun 6, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for this detailed bug report! The fix adds a fallback to use alphaComponent when getRed() returns false (non-RGB colorspace), so the tint alpha is correctly extracted regardless of the color's colorspace.

Changes:

  • In BezelNotificationParameters.swift, UIKit branch now falls back to alphaComponent when getRed() fails
  • AppKit branch already uses alphaComponent directly and is unaffected

This is a minimal, surgical fix that only changes the alpha-extraction logic.

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.

Handle non-RGB tints

1 participant