Class ColorUtils

java.lang.Object
org.geysermc.geyser.util.ColorUtils

public final class ColorUtils extends Object
  • Method Details

    • toHSV

      public static net.kyori.adventure.util.HSVLike toHSV(int rgbValue)
    • distance

      public static float distance(net.kyori.adventure.util.HSVLike self, net.kyori.adventure.util.HSVLike other)
      Returns a distance metric to the other color.

      This value is unitless and should only be used to compare with other firework colors.

      Parameters:
      other - color to compare to
      Returns:
      distance metric
    • argbAlpha

      public static int argbAlpha(int color)
    • argbRed

      public static int argbRed(int color)
    • argbGreen

      public static int argbGreen(int color)
    • argbBlue

      public static int argbBlue(int color)
    • argbColor

      public static int argbColor(int alpha, int red, int green, int blue)
    • argbOpaque

      public static int argbOpaque(int color)
    • mixDyes

      public static int mixDyes(@Nullable Integer current, List<DyeColor> dyes)