processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.11k stars 3.22k forks source link

[p5.js 2.0 RFC Proposal]: Colour Contrast Checker #6971

Open hiddenenigma opened 2 months ago

hiddenenigma commented 2 months ago

Increasing access

Contrast is a key design principle for making elements distinguishable from one another. If there's low contrast between colors, no one will see the sketch. The proposal is to have a color contrast checker to see if it passes the double AA and triple AAA accessibility standards.

This tool is a good example where the user can input their colors and adjust using sliders until their colors meet the accessibility pass: https://colourcontrast.cc/

Which types of changes would be made?

Most appropriate sub-area of p5.js?

What's the problem?

Currently there's no way for users to know if their colors are accessible. Meaning, if there's low contrast with their colors.

What's the solution?

A color contrast checker that checks for different accessibility passes.

Pros (updated based on community comments)

Example list:

Cons (updated based on community comments)

Might be difficult to implement when there are multiple colors and it's an animation where colors overlap with each other at different times.

Proposal status

Under review

limzykenneth commented 2 months ago

I wonder if this can be expanded into a wider accessibility checker feature that can form part of the Web Accessibility module of p5.js? Eg. also adding a function that when passed a HTML container element, check everything inside it for adherene to best practices of web accessibilty/WCAG recommendations?