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.