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 ayh
-
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 floatgetAlphaFloat(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 floatgetBlueFloat(int argb) static intgetGreen(int argb) static floatgetGreenFloat(int argb) static intgetRed(int argb) static floatgetRedFloat(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, 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 aLayh;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 bLayh;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 cLayh;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 dLayh;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 aLayh;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 aLayh;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 aLayh;a(Lfgc;)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 aLayh;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 aLayh;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 aLayh;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 bLayh;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 eLayh;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 aLayh;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 fLayh;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 gLayh;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 cLayh;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 aLayh;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 aLayh;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 hLayh;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 dLayh;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 bLayh;b(F)I
-
getAlphaFloat
public static float getAlphaFloat(int argb) - Mappings:
Namespace Name Mixin selector named getAlphaFloatLnet/minecraft/util/math/ColorHelper;getAlphaFloat(I)Fintermediary method_65100Lnet/minecraft/class_9848;method_65100(I)Fofficial iLayh;i(I)F
-
getRedFloat
public static float getRedFloat(int argb) - Mappings:
Namespace Name Mixin selector named getRedFloatLnet/minecraft/util/math/ColorHelper;getRedFloat(I)Fintermediary method_65101Lnet/minecraft/class_9848;method_65101(I)Fofficial jLayh;j(I)F
-
getGreenFloat
public static float getGreenFloat(int argb) - Mappings:
Namespace Name Mixin selector named getGreenFloatLnet/minecraft/util/math/ColorHelper;getGreenFloat(I)Fintermediary method_65102Lnet/minecraft/class_9848;method_65102(I)Fofficial kLayh;k(I)F
-
getBlueFloat
public static float getBlueFloat(int argb) - Mappings:
Namespace Name Mixin selector named getBlueFloatLnet/minecraft/util/math/ColorHelper;getBlueFloat(I)Fintermediary method_65103Lnet/minecraft/class_9848;method_65103(I)Fofficial lLayh;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 oLayh;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 mLayh;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 nLayh;n(I)I
-