TTY detection foreground/background color
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 38/100
Piste de recherche
Aucun fichier d’implémentation ni test n’est indiqué. Commencez par localiser l’API de stream existante qui interroge la profondeur de couleur du terminal, puis examinez la manière dont le comportement de TTY est géré sur les plateformes prises en charge. Le travail est considéré comme terminé lorsqu’une fonction de stream définie peut interroger la couleur d’avant-plan et, lorsque cela est possible, la couleur d’arrière-plan, avec une couverture des cas pertinents.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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 does not guarantee that other colors will be high contrast. For instance dark blue on charcoal gray, or yellow text on iTerm's default eggshell white background, versus orange which shows well on both light and dark mode terminals.
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. And if at all possible, also the background color.
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.
- Langage dominant
- JavaScript
- Étoiles
- 122k
- Forks
- 37.4k
- Merge moyen
- 4 j 2 h
- PR mergées (30 j)
- 277
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de nodejs/node
-
doc
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
-
build
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
-
feature request
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Toutes les issues de nodejs/node
Issues similaires
-
Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Automattic/safe-publish#594 ·
-
内部文件键(绝对路径的 base64)泄漏到界面标签 Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100