Color that everyone can read
Roughly one person in twelve with male biology and one in two hundred with female biology sees colour differently, and everyone sees it badly in sunlight. Accessible colour is mostly about not relying on hue alone.
#1f2937
#ffffff
#5576ff
#facc15
#b91c1c
Contrast, measured
Contrast ratio compares the brightness of two colours, from 1:1 (invisible) to 21:1 (black on white). WCAG asks for 4.5:1 for normal text, 3:1 for large text, and 3:1 for interface parts like borders and icons. These are not opinions — they are testable, and most "our brand colour is fine" arguments end when the number is on screen.
Never hue alone
If the only difference between two states is red versus green, some of your users see one state. Add a second signal: an icon, a label, a pattern, a position. The same rule applies to charts, where two adjacent series should differ in lightness as well as hue, and to form validation, where the message matters more than the colour of the border.
The two habits
First, pick text colours by measuring rather than by eye; it takes seconds and removes the argument. Second, view your design in greyscale before you ship it. If it still works — if you can tell the button from the background and one chart line from another — it will work for colour blindness, on a cheap screen and in direct sun.
The part to remember
Measure the contrast, and make sure nothing important is carried by hue alone.
Check a pair in the contrast checker