static Tag create(final ArgumentQueue args, final Context ctx) {
    boolean reversed = false;
    int phase = 0;

    if (args.hasNext()) {
      String value = args.pop().value();
      if (value.startsWith(REVERSE)) {
        reversed = true;
        value = value.substring(REVERSE.length());
      }
      if (value.length() > 0) {
        try {
          phase = Integer.parseInt(value);
        } catch (final NumberFormatException ex) {
          throw ctx.newException("Expected phase, got " + value);
        }
      }
    }

    return new RainbowTag(reversed, phase, ctx);
  }
Applies rainbow color to a component.

@since 4.10.0
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/standard/RainbowTag.java