package o; import android.graphics.Color; /* renamed from: o.nyu, reason: case insensitive filesystem */ /* loaded from: classes.dex */ final class C16404nyu { static final float[][] b = {new float[]{0.401288f, 0.650173f, -0.051461f}, new float[]{-0.250268f, 1.204414f, 0.045854f}, new float[]{-0.002079f, 0.048952f, 0.953127f}}; static final float[][] a = {new float[]{1.8620678f, -1.0112547f, 0.14918678f}, new float[]{0.38752654f, 0.62144744f, -0.00897398f}, new float[]{-0.0158415f, -0.03412294f, 1.0499644f}}; static final float[] e = {95.047f, 100.0f, 108.883f}; private static float[][] c = {new float[]{0.41233894f, 0.35762063f, 0.18051042f}, new float[]{0.2126f, 0.7152f, 0.0722f}, new float[]{0.01932141f, 0.11916382f, 0.9503448f}}; /* JADX INFO: Access modifiers changed from: package-private */ public static float d() { return 0.69f; } /* JADX INFO: Access modifiers changed from: package-private */ public static int c(float f) { if (f < 1.0f) { return -16777216; } if (f > 99.0f) { return -1; } float f2 = (f + 16.0f) / 116.0f; float f3 = f > 8.0f ? f2 * f2 * f2 : f / 903.2963f; float f4 = f2 * f2 * f2; boolean z = f4 > 0.008856452f; float f5 = z ? f4 : ((f2 * 116.0f) - 16.0f) / 903.2963f; if (!z) { f4 = ((f2 * 116.0f) - 16.0f) / 903.2963f; } float[] fArr = e; return Rez.d(f5 * fArr[0], f3 * fArr[1], f4 * fArr[2]); } /* JADX INFO: Access modifiers changed from: package-private */ public static float[] e(int i) { float a2 = a(Color.red(i)); float a3 = a(Color.green(i)); float a4 = a(Color.blue(i)); float[][] fArr = c; float[] fArr2 = fArr[0]; float f = fArr2[0]; float f2 = fArr2[1]; float f3 = fArr2[2]; float[] fArr3 = fArr[1]; float f4 = fArr3[0]; float f5 = fArr3[1]; float f6 = fArr3[2]; float[] fArr4 = fArr[2]; return new float[]{(f * a2) + (f2 * a3) + (f3 * a4), (f4 * a2) + (f5 * a3) + (f6 * a4), (a2 * fArr4[0]) + (a3 * fArr4[1]) + (a4 * fArr4[2])}; } /* JADX INFO: Access modifiers changed from: package-private */ public static float b() { return ((float) Math.pow(0.5689655172413793d, 3.0d)) * 100.0f; } private static float a(int i) { float f = i / 255.0f; return (f <= 0.04045f ? f / 12.92f : (float) Math.pow((f + 0.055f) / 1.055f, 2.4000000953674316d)) * 100.0f; } /* JADX INFO: Access modifiers changed from: package-private */ public static float c(int i) { float a2 = a(Color.red(i)); float a3 = a(Color.green(i)); float a4 = a(Color.blue(i)); float[] fArr = c[1]; float f = (((a2 * fArr[0]) + (a3 * fArr[1])) + (a4 * fArr[2])) / 100.0f; return f <= 0.008856452f ? f * 903.2963f : (((float) Math.cbrt(f)) * 116.0f) - 16.0f; } }