Well I asked an "AI" and it pointed me to a bunch of accessibility guidelines including how to pick pairs of colours that are contrasting enough.

I'm no designer so that's where I'd start at :)