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 ayf
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intaverage(int first, int second) static intchannelFromFloat(float value) private 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 floatmethod_65100(int int2) static floatmethod_65101(int int2) static floatmethod_65102(int int2) static floatmethod_65103(int int2) static intmix(int first, int second) static intscaleRgb(int argb, float scale) static intscaleRgb(int argb, float redScale, float greenScale, float blueScale) static intscaleRgb(int argb, int scale) static inttoAbgr(int argb) static Vector3ftoVector(int rgb) 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 aLayf;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 bLayf;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 cLayf;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 dLayf;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 aLayf;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 aLayf;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 aLayf;a(Lfbr;)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 aLayf;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 aLayf;a(IF)I
-
scaleRgb
public static int scaleRgb(int argb, float redScale, float greenScale, float blueScale) - Mappings:
Namespace Name Mixin selector named scaleRgbLnet/minecraft/util/math/ColorHelper;scaleRgb(IFFF)Iintermediary method_64602Lnet/minecraft/class_9848;method_64602(IFFF)Iofficial aLayf;a(IFFF)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 bLayf;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 eLayf;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 aLayf;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 fLayf;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 gLayf;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 cLayf;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 aLayf;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 aLayf;a(FFFF)I
-
toVector
- Mappings:
Namespace Name Mixin selector named toVectorLnet/minecraft/util/math/ColorHelper;toVector(I)Lorg/joml/Vector3f;intermediary method_64963Lnet/minecraft/class_9848;method_64963(I)Lorg/joml/Vector3f;official hLayf;h(I)Lorg/joml/Vector3f;
-
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 dLayf;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 bLayf;b(F)I
-
method_65100
public static float method_65100(int int2) - Mappings:
Namespace Name Mixin selector named method_65100Lnet/minecraft/util/math/ColorHelper;method_65100(I)Fintermediary method_65100Lnet/minecraft/class_9848;method_65100(I)Fofficial iLayf;i(I)F
-
method_65101
public static float method_65101(int int2) - Mappings:
Namespace Name Mixin selector named method_65101Lnet/minecraft/util/math/ColorHelper;method_65101(I)Fintermediary method_65101Lnet/minecraft/class_9848;method_65101(I)Fofficial jLayf;j(I)F
-
method_65102
public static float method_65102(int int2) - Mappings:
Namespace Name Mixin selector named method_65102Lnet/minecraft/util/math/ColorHelper;method_65102(I)Fintermediary method_65102Lnet/minecraft/class_9848;method_65102(I)Fofficial kLayf;k(I)F
-
method_65103
public static float method_65103(int int2) - Mappings:
Namespace Name Mixin selector named method_65103Lnet/minecraft/util/math/ColorHelper;method_65103(I)Fintermediary method_65103Lnet/minecraft/class_9848;method_65103(I)Fofficial lLayf;l(I)F
-
floatFromChannel
private 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 oLayf;o(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 mLayf;m(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 nLayf;n(I)I
-