Skip to content
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

Check themes for accessibility before making them available for download #352

Open
GeekyPeas opened this issue Aug 29, 2022 Discussed in #60 · 3 comments
Open

Check themes for accessibility before making them available for download #352

GeekyPeas opened this issue Aug 29, 2022 Discussed in #60 · 3 comments

Comments

@GeekyPeas
Copy link

GeekyPeas commented Aug 29, 2022

Discussed in #60

Originally posted by agauniyal March 13, 2017
Some themes like Tomorrow Bright, Monokai and others produce color combinations which are hard/impossible to distinguish things/text on terminals. Try it yourself, choose Tomorrow Bright and open htop which is a widely used system monitor kind of cli application, the portion where cpu usage is shown like -

1  [                               0.0%]

The 0.0% part and similarly other texts won't be visible to you because the background is black and text color is also black there. Several themes make them dark grey on black which is also harder to distinguish. I have tried all themes and there were several which were acting strange with all kinds of cli applications. So I propose to try the themes in atleast these cli applications before releasing them - ranger htop top vim nano.

================================

In many of the themes the problem is that COLOR_1 is same as/ similar to BACKGROUND_COLOR. I don't see any design philosophy/ policy for this project. I wish to suggest the following design rule, that:

no other colors should be same as/ similar to `BACKGROUND_COLOR`.

This should completely eliminate all readability issue.

Originally posted by @GeekyPeas in #60 (comment)

================================

I suggest we should run each color (that is COLOR_1, COLOR_2 etc.) against the BACKGROUND_COLOR via the following method in a stackoverflow answer on "Given a background color, how to get a foreground color that makes it readable on that background color?".

So according to the World Wide Web Consortium’s (W3C) Web Content Accessibility Guidelines 2.0 we must have:

  1. contrast ratio of at least 4.5:1 for regular text (12 pt or smaller), and

  2. contrast ratio of at least 3.0:1 for large text

Then for every (color, BACKGROUND_COLOR) pair that fails the test, we must replace the color.

Originally posted by @GeekyPeas in #60 (comment)

@Mgldvd
Copy link
Collaborator

Mgldvd commented Feb 27, 2023

You are absolutely right, and I apologize for not responding earlier. It was very difficult to do so before due to the disorganization in the repository and themes.

Now, with the adjustments that have been made, I believe it will be much easier.

This JSON file has all the themes organized and standardized, so many things can be done from it and all the necessary tests can be run to achieve this.

I agree that this is of great importance, and in fact, I want to create ratings for each theme related to this matter and add the results to the website for each theme.

For now, I can't promise that I'll be able to do it myself, but I'll be keeping a close eye on it and try to find time to work on it.

As always, pull requests are more than welcome.

image

Ref:

@Mgldvd
Copy link
Collaborator

Mgldvd commented Feb 28, 2023

These tests were run in comparison with the background

First approach

Screen Shot 2023-02-28 at 09 59 00-fullpage

@Mgldvd
Copy link
Collaborator

Mgldvd commented Apr 17, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants