Skip to content

Implement APCA Contrast #256

@facelessuser

Description

@facelessuser

APCA (Accessible Perceptual Contrast Algorithm) is a new contrast algorithm. It currently targets replacing the WCAG 2.1 color contrast, or at least that is the intent. It has not done so yet, and there is no official WCAG 3 contrast.

The repo is here: https://github.com/Myndex/apca-w3.

The algorithm is pretty straightforward to implement and we have done so locally:

>>> from coloraide import Color
>>> text = Color('red')
>>> background = Color('blue')
>>> text.contrast(background, method='apca')
-20.313299765604636

We'd love to include this, but at this time, the license is so oppressive, that I do not think I could dare include it in an MIT project. The restrictions seem too constrained for me to do so.

I understand that they want to control the implementations to not leave a bad impression about the algorithm as they wish to gain good traction in regard to their claims. They also seem to be seeking some patents in regard to the algorithm. It's very confusing territory. They seem to want to make it publicly available, at least through browsers, but want to have extremely strict control. They've licensed it to the WCAG, but restrictions dictate it can only be used for the web. Our library can be used in whatever as there are no such restrictions for our current license in that regard, not for personal or commercial.

Some minor quibbles are related to their extremely strict requirement that if you use it, you must be exact in your implementation and must be up to date. I've never seen such requirements in a license before. I don't so much have a problem with ensuring the algorithm is accurate per se, but it seems they are trying to protect the APCA, or at least the claim of "compliance".

I do hope that if/when it becomes officially WCAG 3, whatever that iteration looks like, it will have a reasonable license attached to it at that time. That would allow distribution in our package much easier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P: maybePending approval of low priority request.S: triageIssue needs triage.T: featureFeature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions