News for hackers. Stuff that matters.
Re:New startup sells coffee through SSH by ammar2 on Thursday May 02, 2024 @09:53AM (#40236348)
A little non-portable but there is an xterm escape sequence[1] that gets the user's background color: \e]11;?\a

You might also be able to use the reverse-video[2] escape sequence to get something that works depending on the user's color scheme.

[1] https://stackoverflow.com/a/7767891

[2] https://en.wikipedia.org/wiki/Reverse_video

There are no comments on this comment yet.