There are tools that can change the colors of your screen to simulate different kinds of color blindness, that makes it pretty easy to test for the basics. I've been using this one in the past: https://colororacle.org/
But in general, it's also just a good guideline to never rely only on color to communicate important information, and always also have a graphical or textual cue to go with the color.