Let's assume we cannot use shapes, textures, or anything else to visually differentiate two elements. We must rely on colors. Which colors, besides black and white, are best to use? We only need to differentiate between two elements.
What you need to focus on for color blind users is contrast
Most countries have accessibility laws that set the minimum amount of contrast between to colors in order for people that are color blind or sight-impaired can manage with your website.
In order to measure contrast there are a lot of ways, I personally use this website.Here the laws are anything over a grade 5 is accessible and I think that's a good number to base yourself on.
We must rely on colors
If you are concerned about color blindness, as you should be, then you simply can't rely solely on colors. There are many types of color blindness not to mention many types of screens and lighting conditions. It's simply not possible to rely solely on color.