Flash the pane dark when BEL is emitted and pane's appearance has a light background #17878

Open
opened 2026-01-31 05:57:10 +00:00 by claunia · 0 comments
Owner

Originally created by @yunruse on GitHub (Jul 7, 2022).

Description of the new feature/enhancement

Pull request Add a setting to flash the pane when BEL is emitted #9270 implemented a visual BEL indictor on the working terminal pane. It's currently a white flash, which works well against a traditional dark-mode background. However, on a light appearance this basically only lightly flashes the text, making it a little hard to notice!
Is there a possibility this could be modified to work with higher contrast light-mode users? Thank you!

Proposed technical implementation details (optional)

I'd probably set (and store?) an isBackgroundLight bool somewhere iff the background color of the pane is "light". If it is, and the BEL handler has the window flag set, the pane would flash dark on a BEL instead of light.

A quick way to find isBackgroundLight may be to just see if the average of r, g and b is higher than 127. I can't imagine enough people have #888888-ish terminals for this to warrant being a manually-defined setting.

Originally created by @yunruse on GitHub (Jul 7, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Pull request [Add a setting to flash the pane when BEL is emitted #9270](https://github.com/microsoft/terminal/pull/9270) implemented a visual BEL indictor on the working terminal pane. It's currently a white flash, which works well against a traditional dark-mode background. However, on a light appearance this basically only lightly flashes the text, making it a little hard to notice! Is there a possibility this could be modified to work with higher contrast light-mode users? Thank you! # Proposed technical implementation details (optional) I'd probably set (and store?) an `isBackgroundLight` bool somewhere iff the background color of the pane is "light". If it is, and the BEL handler has the `window` flag set, the pane would flash _dark_ on a BEL instead of light. A quick way to find `isBackgroundLight` may be to just see if the average of `r`, `g` and `b` is higher than `127`. I can't imagine enough people have `#888888`-ish terminals for this to warrant being a manually-defined setting.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17878