Package net.minecraft.util.math
Class ColorHelper
java.lang.Object
net.minecraft.util.math.ColorHelper
Contains color-related helper methods that mostly use ARGB colors represented as
0xAARRGGBB.- Mappings:
Namespace Name named net/minecraft/util/math/ColorHelperintermediary net/minecraft/class_9848official axq
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intaverage(int first, int second) static intchannelFromFloat(float value) static floatfloatFromChannel(int channel) static intfromAbgr(int abgr) static intfromFloats(float alpha, float red, float green, float blue) static intfullAlpha(int argb) static intgetAlpha(int argb) static intgetArgb(int red, int green, int blue) static intgetArgb(int alpha, int red, int green, int blue) static intstatic intgetBlue(int argb) static intgetGreen(int argb) static intgetRed(int argb) static intgetWhite(float alpha) static intgrayscale(int argb) static intlerp(float delta, int start, int end) static intmix(int first, int second) static intscaleRgb(int argb, float scale) static intscaleRgb(int argb, int scale) static inttoAbgr(int argb) static intwithAlpha(int alpha, int rgb) static intzeroAlpha(int argb)
-
Constructor Details
-
ColorHelper
public ColorHelper()
-
-
Method Details
-
getAlpha
public static int getAlpha(int argb) - Returns:
- the alpha value of
argbThe returned value is between
0and255(both inclusive). - Mappings:
Namespace Name Mixin selector named getAlphaLnet/minecraft/util/math/ColorHelper;getAlpha(I)Iintermediary method_61320Lnet/minecraft/class_9848;method_61320(I)Iofficial aLaxq;a(I)I
-
getRed
public static int getRed(int argb) - Returns:
- the red value of
argbThe returned value is between
0and255(both inclusive). - Mappings:
Namespace Name Mixin selector named getRedLnet/minecraft/util/math/ColorHelper;getRed(I)Iintermediary method_61327Lnet/minecraft/class_9848;method_61327(I)Iofficial bLaxq;b(I)I
-
getGreen
public static int getGreen(int argb) - Returns:
- the green value of
argbThe returned value is between
0and255(both inclusive). - Mappings:
Namespace Name Mixin selector named getGreenLnet/minecraft/util/math/ColorHelper;getGreen(I)Iintermediary method_61329Lnet/minecraft/class_9848;method_61329(I)Iofficial cLaxq;c(I)I
-
getBlue
public static int getBlue(int argb) - Returns:
- the blue value of
argbThe returned value is between
0and255(both inclusive). - Mappings:
Namespace Name Mixin selector named getBlueLnet/minecraft/util/math/ColorHelper;getBlue(I)Iintermediary method_61331Lnet/minecraft/class_9848;method_61331(I)Iofficial dLaxq;d(I)I
-
getArgb
public static int getArgb(int alpha, int red, int green, int blue) - Returns:
- the ARGB color value from its components
- Mappings:
Namespace Name Mixin selector named getArgbLnet/minecraft/util/math/ColorHelper;getArgb(IIII)Iintermediary method_61324Lnet/minecraft/class_9848;method_61324(IIII)Iofficial aLaxq;a(IIII)I
-
getArgb
public static int getArgb(int red, int green, int blue) - Returns:
- the full alpha ARGB color value from its components
- Mappings:
Namespace Name Mixin selector named getArgbLnet/minecraft/util/math/ColorHelper;getArgb(III)Iintermediary method_61323Lnet/minecraft/class_9848;method_61323(III)Iofficial aLaxq;a(III)I
-
getArgb
- Mappings:
Namespace Name Mixin selector named getArgbLnet/minecraft/util/math/ColorHelper;getArgb(Lnet/minecraft/util/math/Vec3d;)Iintermediary method_61325Lnet/minecraft/class_9848;method_61325(Lnet/minecraft/class_243;)Iofficial aLaxq;a(Leyw;)I
-
mix
public static int mix(int first, int second) - Mappings:
Namespace Name Mixin selector named mixLnet/minecraft/util/math/ColorHelper;mix(II)Iintermediary method_61322Lnet/minecraft/class_9848;method_61322(II)Iofficial aLaxq;a(II)I
-
scaleRgb
public static int scaleRgb(int argb, float scale) - Mappings:
Namespace Name Mixin selector named scaleRgbLnet/minecraft/util/math/ColorHelper;scaleRgb(IF)Iintermediary method_61321Lnet/minecraft/class_9848;method_61321(IF)Iofficial aLaxq;a(IF)I
-
scaleRgb
public static int scaleRgb(int argb, int scale) - Mappings:
Namespace Name Mixin selector named scaleRgbLnet/minecraft/util/math/ColorHelper;scaleRgb(II)Iintermediary method_61328Lnet/minecraft/class_9848;method_61328(II)Iofficial bLaxq;b(II)I
-
grayscale
public static int grayscale(int argb) - Mappings:
Namespace Name Mixin selector named grayscaleLnet/minecraft/util/math/ColorHelper;grayscale(I)Iintermediary method_61333Lnet/minecraft/class_9848;method_61333(I)Iofficial eLaxq;e(I)I
-
lerp
public static int lerp(float delta, int start, int end) - Mappings:
Namespace Name Mixin selector named lerpLnet/minecraft/util/math/ColorHelper;lerp(FII)Iintermediary method_61319Lnet/minecraft/class_9848;method_61319(FII)Iofficial aLaxq;a(FII)I
-
fullAlpha
public static int fullAlpha(int argb) - Mappings:
Namespace Name Mixin selector named fullAlphaLnet/minecraft/util/math/ColorHelper;fullAlpha(I)Iintermediary method_61334Lnet/minecraft/class_9848;method_61334(I)Iofficial fLaxq;f(I)I
-
zeroAlpha
public static int zeroAlpha(int argb) - Mappings:
Namespace Name Mixin selector named zeroAlphaLnet/minecraft/util/math/ColorHelper;zeroAlpha(I)Iintermediary method_61335Lnet/minecraft/class_9848;method_61335(I)Iofficial gLaxq;g(I)I
-
withAlpha
public static int withAlpha(int alpha, int rgb) - Mappings:
Namespace Name Mixin selector named withAlphaLnet/minecraft/util/math/ColorHelper;withAlpha(II)Iintermediary method_61330Lnet/minecraft/class_9848;method_61330(II)Iofficial cLaxq;c(II)I
-
getWhite
public static int getWhite(float alpha) - Mappings:
Namespace Name Mixin selector named getWhiteLnet/minecraft/util/math/ColorHelper;getWhite(F)Iintermediary method_61317Lnet/minecraft/class_9848;method_61317(F)Iofficial aLaxq;a(F)I
-
fromFloats
public static int fromFloats(float alpha, float red, float green, float blue) - Mappings:
Namespace Name Mixin selector named fromFloatsLnet/minecraft/util/math/ColorHelper;fromFloats(FFFF)Iintermediary method_61318Lnet/minecraft/class_9848;method_61318(FFFF)Iofficial aLaxq;a(FFFF)I
-
average
public static int average(int first, int second) - Mappings:
Namespace Name Mixin selector named averageLnet/minecraft/util/math/ColorHelper;average(II)Iintermediary method_61332Lnet/minecraft/class_9848;method_61332(II)Iofficial dLaxq;d(II)I
-
channelFromFloat
public static int channelFromFloat(float value) - Mappings:
Namespace Name Mixin selector named channelFromFloatLnet/minecraft/util/math/ColorHelper;channelFromFloat(F)Iintermediary method_61326Lnet/minecraft/class_9848;method_61326(F)Iofficial bLaxq;b(F)I
-
floatFromChannel
public static float floatFromChannel(int channel) - Mappings:
Namespace Name Mixin selector named floatFromChannelLnet/minecraft/util/math/ColorHelper;floatFromChannel(I)Fintermediary method_61336Lnet/minecraft/class_9848;method_61336(I)Fofficial hLaxq;h(I)F
-
toAbgr
public static int toAbgr(int argb) - Mappings:
Namespace Name Mixin selector named toAbgrLnet/minecraft/util/math/ColorHelper;toAbgr(I)Iintermediary method_61337Lnet/minecraft/class_9848;method_61337(I)Iofficial iLaxq;i(I)I
-
fromAbgr
public static int fromAbgr(int abgr) - Mappings:
Namespace Name Mixin selector named fromAbgrLnet/minecraft/util/math/ColorHelper;fromAbgr(I)Iintermediary method_61338Lnet/minecraft/class_9848;method_61338(I)Iofficial jLaxq;j(I)I
-