@SuppressWarnings("UseJBColor")
  public static @Nullable Color fromHexOrNull(@Nullable String str) {
    if (str == null) return null;
    int pos = str.startsWith("#") ? 1 : str.startsWith("0x") ? 2 : 0;
    int len = str.length() - pos;
    if (len == 3) return new Color(fromHex1(str, pos), fromHex1(str, pos + 1), fromHex1(str, pos + 2), 255);
    if (len == 4) return new Color(fromHex1(str, pos), fromHex1(str, pos + 1), fromHex1(str, pos + 2), fromHex1(str, pos + 3));
    if (len == 6) return new Color(fromHex2(str, pos), fromHex2(str, pos + 2), fromHex2(str, pos + 4), 255);
    if (len == 8) return new Color(fromHex2(str, pos), fromHex2(str, pos + 2), fromHex2(str, pos + 4), fromHex2(str, pos + 6));
    return null;
  }
@SuppressWarnings("UseJBColor")
  public static @Nullable Color fromHexOrNull(@Nullable String str)