It depends on what you are trying to do.
GENERAL:
If you are creating a picture, there is no real problem with any color combinations.
There are some elitists who want to force their aesthetics on others. They don't like certain color combinations. Some of my personal dislikes are:
red, yellow, and violet, without green
red, yellow, and cyan, without green
red, yellow, and blue, without green
magenta, cream, and powder blue
lavender, peach, and powder blue
But personal dislikes are not universal. Every person has different color combinations he dislikes. Ignore personal dislikes.
There are others who say that color combinations at certain angles on a color wheel are bad. But their science is bad, because they are using color wheels based on the erroneous red-yellow-blue primaries.
TEXT:
If you have one color as the text and the other color as the background, then there are a lot of restrictions, because the text becomes very hard to read in certain cases:
- If the grayscale level is the same, the text disappears on a monochrome monitor.
- The human eye has a lower resolution for color differences than it has for differences in lightness. This makes small colored characters hard to read on a colored background, especially on low resolution monitors.
Color blindness makes certain colors appear to be identical:
- Red, orange, yellow, and green all look the same to a green-blind (deuteranopic) person.
- Red, black, and brown all look the same to a red-blind (protanopic) person. So do green and yellow, as well as magenta and blue.
- Browns and blues look the same to a blue-blind (tritanopic) person.
- Yellows look orange in deuteranomaly.
- Yellows look yellow-green in protanomaly.