You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
3.4 KiB
99 lines
3.4 KiB
package p071y;
|
|
|
|
import android.graphics.Color;
|
|
import p073z.C1865a;
|
|
|
|
/* renamed from: y.b */
|
|
/* loaded from: classes.dex */
|
|
public final class C1808b {
|
|
|
|
/* renamed from: a */
|
|
public static final float[][] f4532a = {new float[]{0.401288f, 0.650173f, -0.051461f}, new float[]{-0.250268f, 1.204414f, 0.045854f}, new float[]{-0.002079f, 0.048952f, 0.953127f}};
|
|
|
|
/* renamed from: b */
|
|
public static final float[][] f4533b = {new float[]{1.8620678f, -1.0112547f, 0.14918678f}, new float[]{0.38752654f, 0.62144744f, -0.00897398f}, new float[]{-0.0158415f, -0.03412294f, 1.0499644f}};
|
|
|
|
/* renamed from: c */
|
|
public static final float[] f4534c = {95.047f, 100.0f, 108.883f};
|
|
|
|
/* renamed from: d */
|
|
public static final float[][] f4535d = {new float[]{0.41233894f, 0.35762063f, 0.18051042f}, new float[]{0.2126f, 0.7152f, 0.0722f}, new float[]{0.01932141f, 0.11916382f, 0.9503448f}};
|
|
|
|
/* renamed from: a */
|
|
public static int m347a(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 ? 1 : (f == 8.0f ? 0 : -1)) > 0 ? 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 = f4534c;
|
|
return C1865a.m160a(f5 * fArr[0], f3 * fArr[1], f4 * fArr[2]);
|
|
}
|
|
|
|
/* renamed from: b */
|
|
public static float m346b(int i) {
|
|
return m345c(m341g(i));
|
|
}
|
|
|
|
/* renamed from: c */
|
|
public static float m345c(float f) {
|
|
float f2 = f / 100.0f;
|
|
return f2 <= 0.008856452f ? f2 * 903.2963f : (((float) Math.cbrt(f2)) * 116.0f) - 16.0f;
|
|
}
|
|
|
|
/* renamed from: d */
|
|
public static float m344d(float f, float f2, float f3) {
|
|
return f + ((f2 - f) * f3);
|
|
}
|
|
|
|
/* renamed from: e */
|
|
public static float m343e(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;
|
|
}
|
|
|
|
/* renamed from: f */
|
|
public static float[] m342f(int i) {
|
|
float m343e = m343e(Color.red(i));
|
|
float m343e2 = m343e(Color.green(i));
|
|
float m343e3 = m343e(Color.blue(i));
|
|
float[][] fArr = f4535d;
|
|
float[] fArr2 = fArr[0];
|
|
float f = (fArr2[0] * m343e) + (fArr2[1] * m343e2) + (fArr2[2] * m343e3);
|
|
float[] fArr3 = fArr[1];
|
|
float f2 = (fArr3[0] * m343e) + (fArr3[1] * m343e2) + (fArr3[2] * m343e3);
|
|
float[] fArr4 = fArr[2];
|
|
return new float[]{f, f2, (m343e * fArr4[0]) + (m343e2 * fArr4[1]) + (m343e3 * fArr4[2])};
|
|
}
|
|
|
|
/* renamed from: g */
|
|
public static float m341g(int i) {
|
|
float m343e = m343e(Color.red(i));
|
|
float m343e2 = m343e(Color.green(i));
|
|
float m343e3 = m343e(Color.blue(i));
|
|
float[] fArr = f4535d[1];
|
|
return (m343e * fArr[0]) + (m343e2 * fArr[1]) + (m343e3 * fArr[2]);
|
|
}
|
|
|
|
/* renamed from: h */
|
|
public static float m340h(float f) {
|
|
float f2;
|
|
if (f > 8.0f) {
|
|
double d = f;
|
|
Double.isNaN(d);
|
|
f2 = (float) Math.pow((d + 16.0d) / 116.0d, 3.0d);
|
|
} else {
|
|
f2 = f / 903.2963f;
|
|
}
|
|
return f2 * 100.0f;
|
|
}
|
|
} |