Package org.geysermc.geyser.util
Class ColorUtils
java.lang.Object
org.geysermc.geyser.util.ColorUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic intargbAlpha(int color) static intargbBlue(int color) static intargbColor(int alpha, int red, int green, int blue) static intargbGreen(int color) static intargbOpaque(int color) static intargbRed(int color) static floatdistance(net.kyori.adventure.util.HSVLike self, net.kyori.adventure.util.HSVLike other) Returns a distance metric to the other color.static intstatic net.kyori.adventure.util.HSVLiketoHSV(int rgbValue)
-
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
-