2025 should be the year you stop using WCAG 2 colour contrast testing, and switch to APCA. This article is a few years old, and covers everything well. https://blog.datawrapper.de/color-contrast-check-data-vis-wcag-apca/
It's time for a more sophisticated color contrast check for data visualizations - Datawrapper Blog

The WCAG contrast requirements are flawed. Here's what a new approach could mean for data visualizations.

Datawrapper Blog
@marcedwards No white text on light purple? You're going to upset the ms teams folk šŸ˜›
@bartreardon Oh, the point is that you probably *can* use that combo, if you use common sense or APCA testing, rather than WCAG 2.
@marcedwards unfortunately orgs being held to (or going for) wcag AA don’t have a choice.
@nesevis If it’s due to regulations, I get it. I’d still use APCA for testing, but also make sure WCAG 2 is met, where required.

@marcedwards @nesevis

APCA substantially exceeds WCAG2 contrast in terms of actual accessibility, especially for dark mode.

WCAG 2 contrast SCs are essentially unusable for dark mode, and can be harmful to actual accessibility & readability. The fact that the EU is putting WCAG2 contrast into law is unfortunate.

WCAG 2 contrast is not based on any relevant readability research. WCAG 2 contrast is not peer reviewed, and the statements made in the understanding doc lack scientific support.

@marcedwards @nesevis

The few places APCA passes colors that WCAG 2 contrast rejects, are cases where the rejected colors are actually better for those with color vision deficiency.

In other words, WCAG 2 contrast isn't just wrong, its results can negatively impact readability.

@nesevis Organisations that aren’t required by law to do it, should reassess if WCAG 2 is actually helping.
@marcedwards @nesevis I don't like being all doom and gloom, but, honnestly, at least in Europe, orgs that are not legally obliged to be accessible mostly don't know / don't care about accessibility, I doubt they know there's 2 algorithms.
So I would go for use the WCAG to be on the safe side, laws change, test with users, and let's see what WCAG 3 brings. Who knows, maybe something better than APCA that is peer reviewed and tested.
@stephaniewalter @nesevis I think you’re right, and I don’t even think many accessibility experts know about APCA yet. I really do hope WCAG 3 has improvements with contrast testing, be it APCA or something else new. I just worry that WCAG 2 is so bad that it’s causing harm in some cases. Whatever is chosen for WCAG 3 will be added immediately to Pinwheel.
@marcedwards Very much agreed. Are you aware of any open-source Swift implementations?
@redalemeden Sorry about the slow reply to this! Finding out now how we’re doing it.
@redalemeden Looks like we converted some JavaScript to Swift to do it.
@marcedwards I see! Might end up doing the same next time I need this to be running dynamically in-app.

@marcedwards Thanks for the reminder!

I completely forgot about APCA, but I did experiment with it back then. It perfectly explained the readability issues I experienced with the Google Weather app on a dim screen.

Woooow @marcedwards, thanks for sharing!

I always felt that some WCAG 2 color #a11y results were weird, but I never dove deeper. This shines a completely different perspective, super insightful!

The problem now is that benchmarking and testing services do still use #WCAG2 as their reference, so, absurdly enough, if we switched to #APCA we would get worse acccessibility scores… 🤨

@tommi @marcedwards welcome to my life where I try to work with colors that get good scores on BOTH systems 
@Seth Yeah, that’s no fun. Hopefully this can be resolved at some point soon. +@tommi
@tommi @marcedwards
APCA is no longer part of WCAG3. You can still use it, but for conformance (legal, policy, etc.) reasons you will still need to follow WCAG2. It’s possible to satisfy both in most cases.
The Easy Intro to the APCA Contrast Method

This is the APCA project repo on GitHub.Documentation linked below.

APCA

@marcedwards

APCA is a key part of the APCA Readability Criterion, the draft standard from the non-profit Inclusive Reading Technologies, Inc.

https://www.readtech.org/ARC/

APCA Readability Criterion • Contrast

The APCA Readability Criterion (ARC) provides a range of recommendations for making visual content on illuminated displays more accessible to all users, especially with visual impairments

Inclusive Reading Technologies