Is there a single text color that, when used on either dark or light background, produces a readable (or at least tolerable) output?
If it makes it easier, constraints can be put on the hue, saturation or brightness of the backgrounds and/or the text color, as necessary.
Motivation: Although there may be other uses of this, my motivation is from a user’s point of view. I prefer to use dark themes both on my OS and my browser, but many applications and websites set only either the background or the text color, while at the same time doesn’t bother with setting the other one. The default theme in my OS and browser is dark text on light backround and that’s what most applications expect. I would like to select a color that is acceptable when an application is not respecting my themes.
Try something around #777 grey. That should give you tolerable contrast on black or white.