We did a lot of research on this topic for @CompositiveHQ and it's an incredibly deep and fascinating area!
We started from “Huh, WCAG contrast works fine on dark on light colors, but for light on dark doesn't look accurate
”, and fell in the deepest rabbit hole 
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
This seems like magic because it's deep. People have studied color for hundreds or thousands of years. Ironically, all we're doing is categorizing how our eyes and brain respond to stimulation, not actually categorizing the light itself. That's why it's so arbitrary.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.