Class TextFormatting

java.lang.Object
net.orbyfied.j8.util.TextFormatting

public class TextFormatting extends Object
  • Field Details

    • NEWLINE_REGEX

      public static final String NEWLINE_REGEX
  • Constructor Details

    • TextFormatting

      public TextFormatting()
  • Method Details

    • translate

      public static String translate(String text, String prefix, String hexprefix)
    • rgbToHex

      public static String rgbToHex(Color color)
    • gradient1d2fLr

      public static String gradient1d2fLr(String text, Color from, Color to, boolean checkForWhitespace, net.md_5.bungee.api.ChatColor... formatting)
      Creates a 1D gradient from 2 points positioned at the full left and right points. Acronym: GRADIENT 1Dimensional 2Float Left Right
      Parameters:
      text - The text to color.
      from - The color on the left.
      to - The color on the right.
      checkForWhitespace - If whitespace should be skipped.
      formatting - The formatting of each character.
      Returns:
      The final string.
    • gradient2d2fTlbr

      public static String gradient2d2fTlbr(String text, Color from, Color to, net.md_5.bungee.api.ChatColor... formatting)