There’s lots of research on appropriate color selection for user interface design.
You could look at the Air Force guide to user interfaces (due to their work with fighter pilot cockpit design they’re often thought to be the experts on this), which says:
Font color. Black text on a white or very light gray background is recommended for maximum contrast and legibility when viewed in office-like environments with normal ambient lighting. White text on a black background also provides high contrast but can reduce users’ reading speed (compared to black text on a white background).
When I was working for a large company with a great deal of experience in user interface design, our internal design guidelines specified at least 50% absolute difference between the luminance values of the foreground and background colors, and 70% was recommended for light-on-dark. I only remember this because I had to build a user interface design tool which enforced it.
Apple’s design guidelines have been a standard in the industry for years. Here’s what they say about color and contrast, specifically:
Use strongly contrasting colors to improve readability. Many factors affect the perception of color, including font size and weight, color brightness, screen resolution, and lighting conditions. When you increase color contrast of visual elements like text, glyphs, and controls, you can help more people use your app in more situations. To find out if the contrast of adjacent colors in your UI meets minimum acceptable levels, use an online color calculator based on the Web Content Accessibility Guidelines (WCAG) color contrast formula.
Here is such an online color calculator.