-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback from color blind users #413
Comments
@jamestalmage if I recall @isaacs did a lot of research into this when he was coming up with a color scheme for node-tap. |
I naively assume setting it in the terminal would be the best solution as it would fix it everywhere, not just in this project, but would be cool if someone knowledgeable about this would comment here (or email James). |
tap's default reporter does use quite a bit of red and green. Mostly, the difference between red and green is also communicated by the text itself, so it's fine. Where it gets tricky is in the diff coloring, where red and green colors carry a lot of the semantic weight. I sought out various sorts of less-color-sensitive folks on Twitter, and used Sim Daltonism to verify that the |
Moderate deuteranope weighing in here:
As long as additional, non-color indicators are present, it's not critical (i.e.
For me, yes. I've picked (and tweaked) a color scheme to have high contrast red/green, since that's a problem area of the spectrum for me.
I'd say leave it to "red" and "green" and let the user set their terminal to render whatever colors are sufficiently contrasty / intuitive for them. It would be difficult to find a single color scheme that worked for all types of color blindness (and potentially impossible if you consider the rare cases of totally monochromatic vision).
Everyone's color deficiencies are different, and vary in severity. I suspect coming up with enough schemes that work for everyone isn't feasible. |
Thank you @davewasmer for your input. We are prefixing lines with non-color indicators, so I think we're covered. If anybody comes across this issue because we've ended up with unreadable output please let us know. We care, you matter. |
Could we add some configuration for the colors? chalk.js: const Chalk = require('chalk').constructor;
exports.set = options => {
if (ctx) {
// Cannot easily override because of this:
throw new Error('Chalk has already been configured');
}
return new Chalk(options);
}; colors.js const chalk = require('../chalk').get();
module.exports = {
log: chalk.gray,
title: chalk.bold,
error: chalk.red,
...
}; I tried the following but it didn't take :) const colors = require('ava/lib/reporters/colors.js');
const Chalk = require('chalk');
colors.error = Chalk.magenta; Would a PR with an additional colors configuration option be merged? Example
|
Hi @Laoujin, thanks for the feedback. I think ideally we'd have a theme suitable for color blind users. I'm not sure if there's any standard for CLI tools on how to indicate that preference. We could switch it based on an environment variable — that way you could configure it in your shell and any AVA-using project would pick it up, without needing additional configuration. What do you think? |
I don't think you can have a "color-blind safe theme" because there are different types of colorblindness: What works for the red/green guys might not be suitable for other types of colorblindness. But yeah, if there is any way to change red to any other color (I usually pick magenta), then I will be very happy. If you can give a few pointers (ie: implement this like xxx), then perhaps I can help creating the PR? |
@Laoujin configuring the colors certainly isn't a bad feature to add, but if you're looking for a stop-gap solution, most terminals allow you to configure your color scheme such that when ava prints something "red", you can pick what that red color is. I've done this with my terminal setup, as mentioned above, and found it immensely helpful even outside of ava (since it affects all the terminal colors, not just one program at a time). |
Yea fair enough. I think if we can make sure we have semantic names for the colors we use, and we can configure those through a straight-forward object, then we could support an |
@novemberborn I did a lot of research into this a few years ago, and haven't heard any complaints about TAP ever since. #413 (comment) sums it up. The feedback I got from a bunch of people who struggle with this was:
You have my explicit permission to copy node-tap's diff coloring. It works well, and in fact, even as a person with very high color sensitivity, I've found it so much clearer that I've configured git to use that color scheme as well. It's just easier to look at. Keep in mind that it's not just color blindness to worry about. There's huge variability on how people respond to contrast as well. High contrast is necessary for some, but harmful for others, and same for low contrast. Some people can't easily look at light on dark, and others, dark on light. Accessibility is tricky. Supporting an easy way to configure the colors is often best. |
Both due to the age of this issue, and the state of our reporters, I've decided to roll this into #2501. |
We currently use
red
/yellow
/green
to signalerror
/warning
/ok
level messages.@bcoe brought up a good point in an
nyc
thread.I know very little about being colorblind aside from what I've read on Wikipedia, so I would like to here from colorblind users.
Terminal.app
on the mac allows you to change the ansi color scheme, so maybe that's the de facto solution for colorblind users (manipulate the color scheme to one they can see).If you aren't comfortable discussing this in an open forum, please email me (my email is available on my profile page).
The text was updated successfully, but these errors were encountered: