As a principle I always go back the Rules of Tincture used in Heraldry and set about 1,000 years ago.
There are five Colours (red, green, blue, purple and black) and two Metals (gold and silver, or yellow and white as we know them in c.21st)
You can put a Metal on a Colour, or a Colour on a Metal, but never put a Metal on a Metal or a Colour on a Colour,
To demonstrate good tincture, and why the rule works, put some yellow text a white background (paper or screen) and some black text on purple background - looks godawful because the colour intensities are too similar and are metal-on-metal and colour-on-colour respectively.
The white text on green in Brogan's "Staff Member" bar is good enough because it obeys the Rule of Tincture (although the green is a bit pale!), and the green bar at the top with the white text buttons ("Mark Forums Read, Search Forums", that line) is superb, and that's because they obey the Rule of Tincture - yellow text works equally well on the green background, but red, blue, black or purple text wouldn't.
There is also a Stain in Heraldry, called Tenne (which is an orange colour) which is half way between a Metal and a Colour and can be used over or under either Metal or Colour, but should be used sparingly.
In the modern age I also class all the light pastel shades as "Metals" even if, at full intensity (saturation/hue) they were originally Colours.
I have not a clue if this helps anyone, but I always design my work in accordance with the Rules of Tincture, just because it makes it clear and easy on the eye whether on-screen or on paper.