-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Increase contrast between filtered and learning cards in graphs #3813
Comments
I'm thinking what if Anki provides a way for users to choose the colours for graphs? There are different types of colour blindness and there might be no one-size-fits-all solution for all users. |
Would also be nice if the colors where consistent. E.g. the reviews graph uses Making them user configurable could also solve the inconsistency issue between graphs. Edit: This would probably need two colors per card state though. The left side of the graph has a ligher color then the right side, set by const cappedRange = scaleLinear().range([0.3, 0.5]);
…
const blues = scaleSequential((n) => interpolateBlues(cappedRange(n)!)).domain(
x.domain() as any,
); |
As an additional info: There is a color contrast checker: https://www.audioeye.com/color-contrast-checker/ Using the color picker (in dev tools) I get This gives a contrast of 1:1 – the minimum standard is 4.5:1 (and 7:1 recommended). Changing the code anki/ts/routes/graphs/reviews.ts Lines 177 to 189 in 8e13e6b
to something like const cappedRange = scaleLinear().range([0.3, 0.4]);
const shiftedRange = scaleLinear().range([0.75, 0.85]);
const darkerGreens = scaleSequential((n) => interpolateGreens(shiftedRange(n)!)).domain(x.domain() as any);
const lighterGreens = scaleSequential((n) => interpolateGreens(cappedRange(n)!)).domain(x.domain() as any);
const reds = scaleSequential((n) => interpolateReds(cappedRange(n)!)).domain(
x.domain() as any,
);
const blues = scaleSequential((n) => interpolateBlues(cappedRange(n)!)).domain(
x.domain() as any,
);
const purples = scaleSequential((n) => interpolatePurples(shiftedRange(n)!)).domain(
x.domain() as any,
); does fix the issue with purple and blue but causes issues with purple and dark green instead. It also looks a bit off, since dark green got changed in the process as well: |
+1 for colors being consistent. Regarding the colors in general: @kamperemu won't be the only color blind user of Anki. As @brishtibheja pointed out: Wouldn't it make sense to let the users pick a color scheme that is based on the type of color blindness, so that color blind people can pick a set that'll allow them to see everything without problems? What's your opinion? @kamperemu do you think this is a reasonable approach, or do you know a better solution (maybe the way another app you are using is handling this?). If this approach sounds good, I'd be willing to give it a shot. |
I'd like to add as a heads up that changing the colors in Reviews Graph should also change the colors in other places accordingly. E.g. the Card Counts graph uses the same color distinction for the card states. Same for the Info (browser → right click card → info): Here, the type is based on the same card states and thus should be consistent. Same applies to the deck overview screen (where e.g. the new cards color is blue, too). |
@tommylenz My own color blindness is minor enough that I rarely ever have to use color blindness settings in apps. Most apps have color choices that are contrasting enough where I don't need to worry about it. However, I have generally seen a lot of games having color blindness settings and the color profiles for different types of color blindness is exactly the approach they use. The approach you're using seems reasonable but I'd also suggest considering more contrasting colors for the defaults. |
Issue caused by fixing #3764
Now the problem becomes the filtered cards and learning cards are nearly the same color, and I really have to squint to tell the difference.
FULL DISCLOSURE I HAVE COLOR BLINDNESS
The text was updated successfully, but these errors were encountered: