Skip to content

tty: add stub for async OSC 11 background color query - #65111

Draft
nirupam-06 wants to merge 3 commits into
nodejs:mainfrom
nirupam-06:tty-osc11-bg-color
Draft

tty: add stub for async OSC 11 background color query#65111
nirupam-06 wants to merge 3 commits into
nodejs:mainfrom
nirupam-06:tty-osc11-bg-color

Conversation

@nirupam-06

Copy link
Copy Markdown

Refs: #65058

This is an early draft laying out the proposed API shape for
writeStream.getBackgroundColor() — an opt-in, best-effort, async
API for querying the terminal's background color via OSC 11.

Currently a stub (always resolves undefined) with doc and test
scaffolding in place. Real OSC 11 query/response/timeout logic to
follow — opening early per the project's contributing guidelines
so design discussion can happen against real code.

Signed-off-by: nirupamzenith <sainirupamkakani@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. tty Issues and PRs related to the tty subsystem. labels Aug 7, 2026
Comment thread doc/api/tty.md Outdated
Co-authored-by: Aviv Keller <me@aviv.sh>
@nirupam-06

Copy link
Copy Markdown
Author

Thanks for the catch on the extra blank line, @avivkeller — applied. Still early/draft while I work out the OSC 11 query/response logic (timeout handling + guarding against the response leaking into stdin, per the known Windows Terminal/Warp issue), but wanted the API shape visible early. Will ping again once it's ready for a full review.

Signed-off-by: nirupamzenith <sainirupamkakani@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. tty Issues and PRs related to the tty subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants