public static boolean attributesImpactForegroundColor(@Nullable TextAttributes attributes) {
    return attributes == TextAttributes.ERASE_MARKER || (attributes != null && attributes.getForegroundColor() != null);
  }
public static boolean attributesImpactForegroundColor(@Nullable TextAttributes attributes)