Color workarounds

This commit is contained in:
M66B 2020-01-21 16:36:55 +01:00
parent 8932cdcc86
commit ec2ffcb3d9
1 changed files with 2 additions and 1 deletions

View File

@ -181,6 +181,7 @@ public class HtmlHelper {
case "color":
String c = value
.replace("none", "")
.replace("unset", "")
.replace("inherit", "")
.replace("initial", "")
.replace("windowtext", "")
@ -211,7 +212,7 @@ public class HtmlHelper {
try {
color = Color.parseColor(c);
} catch (IllegalArgumentException ex) {
color = Color.parseColor("#" + c);
color = Integer.decode(c) | 0xFF000000;
}
} catch (Throwable ex) {
Log.e("Color=" + c);