What is the problem this feature will solve?
For tty’s if you output any text in black, particularly when doing TUI’s one is likely to get a rude awakening when they discover that their users are using dark mode and none of that text is visible because it’s jet black on a charcoal gray background. It would be best in such cases to simply print this text in the default foreground color, but that is difficult to do within Node without pulling in a third party library.
What is the feature you are proposing to solve the problem?
Add a function to write stream to query the foreground color the way color depth can be queried.
What alternatives have you considered?
Workarounds include:
- setting a background color and printing over it, but that makes the text/graphic look more important than it is
- resetting the tty codes rather than setting “black” - but this fails if you are looking for a more general case of high contrast colors, like dark gray on a bright background and light gray on a dark one.
What is the problem this feature will solve?
For tty’s if you output any text in black, particularly when doing TUI’s one is likely to get a rude awakening when they discover that their users are using dark mode and none of that text is visible because it’s jet black on a charcoal gray background. It would be best in such cases to simply print this text in the default foreground color, but that is difficult to do within Node without pulling in a third party library.
What is the feature you are proposing to solve the problem?
Add a function to write stream to query the foreground color the way color depth can be queried.
What alternatives have you considered?
Workarounds include: