he pending value and paint the contents red if they are known to
       * be invalid.
       */
      String pendingValue = (viewData == null) ? null : viewData.getValue();
      boolean invalid = (viewData == null) ? false : viewData.isInvalid();

      String color = pendingValue != null ? (invalid ? "red" : "blue") : "black";
      SafeStyles safeColor = SafeStylesUtils.fromTrustedString("color: " + color + ";");
      sb.append(template.input(pendingValue != null ? pendingValue : value, safeColor));

  