code: public static ForegroundColorSpan foregroundColor(@ColorInt int color, int i) {
          if (sForeColors == null) {
              sForeColors = new SparseArray<>();
          }
          List<ForegroundColorSpan> spans = sForeColors.get(color);
          if (spans == null) {
              spans = new ArrayList<>();
              sForeColors.put(color, spans);
          }
          if (i < spans.size()) {
              return spans.get(i);
          } else {
              ForegroundColorSpan span = new ForegroundColorSpan(color);
              spans.add(span);
              return span;
          }
      }
docs: Get a cached foreground color span.
  
  @param i starts at zero
  @since 3.0.0