public static int ToAndroidColor(this Color color) { if (AGUtils.IsNotAndroidCheck()) { return(0); } Color32 c = color; return(AndroidColor(c.a, c.r, c.g, c.b)); }
static int AndroidColor(int alpha, int red, int green, int blue) { if (AGUtils.IsNotAndroidCheck()) { return(0); } using (var c = new AndroidJavaClass("android.graphics.Color")) { return(c.CallStaticInt("argb", alpha, red, green, blue)); } }