Class ColorUtils

java.lang.Object
org.kingdoms.utils.ColorUtils

public final class ColorUtils extends Object
  • Constructor Details

    • ColorUtils

      public ColorUtils()
  • Method Details

    • hex

      public static Color hex(String color)
    • toString

      public static String toString(Color color)
    • getRGB

      public static int getRGB(Color color)
      Actually gets the RGB without the alpha component.
    • parseColor

      public static Color parseColor(String str)
    • shortHexToLongHex

      public static String shortHexToLongHex(String shortHex)
    • toHex

      public static int toHex(Color color)
    • getHue

      public static int getHue(@Nonnull Color color)
    • getHSB

      public static float[] getHSB(Color color)
    • toHexString

      public static String toHexString(Color color)
    • toHexString

      public static String toHexString(int colorHex)
    • legacyColorToHex

      public static int legacyColorToHex(org.bukkit.ChatColor color)
    • legacyColorToAwt

      public static Color legacyColorToAwt(org.bukkit.ChatColor color)
    • hexColorToLegacy

      public static org.bukkit.ChatColor hexColorToLegacy(Color color)
    • rgb

      public static Color rgb(String color)
    • gradient

      public static List<MessagePiece> gradient(List<MessagePiece> pieces, Color from, Color to)
      https://stackoverflow.com/questions/21835739/smooth-color-transition-algorithm
    • mixColors

      public static Color mixColors(Color... colors)