Skip to content

fix(ui): use current light colors for previews - #68

Open
AbdelrahmanHafez wants to merge 5 commits into
jurre:mainfrom
AbdelrahmanHafez:fix/active-scene-preview-gradient
Open

fix(ui): use current light colors for previews#68
AbdelrahmanHafez wants to merge 5 commits into
jurre:mainfrom
AbdelrahmanHafez:fix/active-scene-preview-gradient

Conversation

@AbdelrahmanHafez

@AbdelrahmanHafez AbdelrahmanHafez commented May 28, 2026

Copy link
Copy Markdown
Contributor

HueBar was using scene palettes for the room/zone card background. If it didn't know which scene was active, it fell back to the first scene in that room with palette entries. That meant an inactive scene like Vapor Wave could be used for the preview even when the actual lights were currently yellow(? not sure, protanopia colorblindness) from Bright.

This PR:

  • builds room/zone preview gradients from the current on lights in the room or zone
  • supports mixed colors by using each member light as a gradient stop instead of averaging them
  • falls back to a known active scene palette only when current light colors are unavailable
  • stops using inactive scene palettes as a generic preview fallback
  • preserves palette brightness for preview colors, with a visibility floor so barely-on lights still show up in dark cards
  • also makes scene picker swatches brightness-aware when the scene palette includes per-entry dimming
  • makes individual light card colors brightness-aware too, so dimmed lights do not show full-intensity accents/backgrounds
  • renames the preview color path so it no longer reads like it is strictly scene-based
  • adds tests for the stale inactive-scene fallback case, active-scene fallback, brightness-aware preview colors, and brightness-aware light card colors
Before Before: room preview showing the wrong inactive scene gradient
After After: room preview uses current light colors After: mixed room preview colors stay consistent with current lights

@AbdelrahmanHafez
AbdelrahmanHafez marked this pull request as ready for review May 28, 2026 06:10
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.

1 participant