Ensure that foreground content is easily distinguishable from the background, particularly when viewed by someone with color deficits.
The color of the text needs to be easily distinguishable from the background.
View lower contrast | View higher contrast
When foreground and background colors are too close to the same hue, they may not provide sufficient contrast when viewed using monochrome displays or by people with different types of color deficits. (W3C)
Providing content in high contrast improves the readability of information. Providing various levels of contrast, as demonstrated by the above links, gives the ability for the user to choose a contrast which they are comfortable viewing with. However, controlling different contrast levels via javascript does carries Accessibility issues when viewing technology does not have javascript enabled.
Explore Web Safe Color Combinations [off site] - Department of Computer Science, Brown University
View WAI Checkpoint 2.2 - Ensure that foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black and white screen.