In android studio (official application for android programming) I have created a color I want as my primary color. However the application (Android Studio) complains that my color doesn't have enough contrast with the color black #000000 (which is used as a text color). I switched to dark theme, thinking that switching the text color (which the primary color has to complement to) to white #FFFFFF would surpass the error. However the error is still there.
Here is my color: #35885C
Ignoring whatever this application says. I am in real doubt if my color complements best with black or white. Is there some sort of mathematical formula to calculate complaince with black/white, maybe other colors. Would black or white be best suited for this color? Imagine the provided green color with either white or black text on it, are both colors non-complaint with my color?