private static TextAttributes readTextAttributes(@NotNull String tag, Attributes attributes, boolean isBackground) throws SAXException {
    TextAttributes textAttributes = new TextAttributes();
    Color color = getColor(attributes);
    if (isBackground)  {
      textAttributes.setBackgroundColor(color);
    }
    else {
      textAttributes.setForegroundColor(color);
    }
    textAttributes.setFontType(getFontStyle(tag, attributes));
    EffectType effectType = getEffectType(attributes);
    if (effectType != null) {
      textAttributes.setEffectType(effectType);
      textAttributes.setEffectColor(textAttributes.getForegroundColor());
    }
    return textAttributes;
  }
private static TextAttributes readTextAttributes(@NotNull String tag, Attributes attributes, boolean isBackground)