superhighfives / pika

An open-source colour picker app for macOS
https://superhighfives.com/pika
MIT License
1.7k stars 55 forks source link

APCA support #22

Open superhighfives opened 3 years ago

superhighfives commented 3 years ago

Is your feature request related to a problem? Please describe. As the forthcoming WCAG 3 is proposing APCA for colour contrast, it'd be great to include it. https://www.w3.org/WAI/GL/WCAG3/2020/methods/font-characteristics-contrast/

Describe the solution you'd like Add the ability to view contrast against APCA—which is a unique challenge, given it's on an axis of colour contrast to font size and weight:

image

Thanks for flagging, @adamwathan. 🙌

Myndex commented 2 years ago

Hi @superhighfives

This year marks the third anniversary of the research and development project that underlies APCA (and it is significantly more extensive than just the APCA tool). I wanted to drop a note as that lookup table was an early draft and is now obsolete.

Quick Status Update

The Basic APCA math/algorithm is stable, and has not changed in over a year. This base algorithm is probably not going to change, however, there are more advanced versions that are separate and may be introduced due to the development of new display technologies, but that is not relevant to the Basic sRGB version that is donated to the W3C for use in guidelines.

I just published APCA W3 0.1.2, which includes some key new features, such as an integrated dynamic font lookup table that automatically indicate the appropriate font/weight, alpha blending, displayP3 support, and a "reverseAPCA" where you can specify a contrast value, and either the bg or text color, and it generates the missing color.

It is on npm, npm i apca-w3

It has one dependency, which I've also placed on npm: npm i colorparsley

Also, Bridge-PCA is a drop-in replacement for WCAG 2's math. See that tool at https://www.myndex.com/BPCA/

Please let me know of any questions. The main repo discussion area is open with active discussions on APCA and related technologies: https://github.com/Myndex/SAPC-APCA/discussions

Thank you!

Andy

foldfree commented 10 months ago

https://www.myndex.com/APCA/ The link above is an example of an interactive tool using the APCA system. Admittedly, It is way more complex that WCAG but so much better when making color decisions.. To have it natively in PIKA would be a dream. :)

Myndex commented 10 months ago

Thank you @foldfree

There is also the "Bronze Simple Level" in the APCA Readability Criterion, intended to keep things as simple as WCAG 2...

Draft

https://readtech.org/ARC/tests/bronze-simple-mode/?tn=intro