discord-jadx/app/src/main/java/c/c/a/a0/e.java

35 lines
948 B
Java

package c.c.a.a0;
import android.graphics.Color;
import c.c.a.a0.h0.c;
import java.io.IOException;
/* compiled from: ColorParser */
public class e implements g0<Integer> {
public static final e a = new e();
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // c.c.a.a0.g0
public Integer a(c cVar, float f) throws IOException {
boolean z2 = cVar.w() == c.b.BEGIN_ARRAY;
if (z2) {
cVar.a();
}
double p = cVar.p();
double p2 = cVar.p();
double p3 = cVar.p();
double p4 = cVar.p();
if (z2) {
cVar.c();
}
if (p <= 1.0d && p2 <= 1.0d && p3 <= 1.0d) {
p *= 255.0d;
p2 *= 255.0d;
p3 *= 255.0d;
if (p4 <= 1.0d) {
p4 *= 255.0d;
}
}
return Integer.valueOf(Color.argb((int) p4, (int) p, (int) p2, (int) p3));
}
}