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/ColorHelper- intermediary - net/minecraft/class_9848- official - ayh
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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- 
ColorHelperpublic ColorHelper()
 
- 
- 
Method Details- 
getAlphapublic static int getAlpha(int argb) - Returns:
- the alpha value of argbThe returned value is between 0and255(both inclusive).
- Mappings:
- Namespace - Name - Mixin selector - named - getAlpha- Lnet/minecraft/util/math/ColorHelper;getAlpha(I)I- intermediary - method_61320- Lnet/minecraft/class_9848;method_61320(I)I- official - a- Layh;a(I)I
 
- 
getRedpublic static int getRed(int argb) - Returns:
- the red value of argbThe returned value is between 0and255(both inclusive).
- Mappings:
- Namespace - Name - Mixin selector - named - getRed- Lnet/minecraft/util/math/ColorHelper;getRed(I)I- intermediary - method_61327- Lnet/minecraft/class_9848;method_61327(I)I- official - b- Layh;b(I)I
 
- 
getGreenpublic static int getGreen(int argb) - Returns:
- the green value of argbThe returned value is between 0and255(both inclusive).
- Mappings:
- Namespace - Name - Mixin selector - named - getGreen- Lnet/minecraft/util/math/ColorHelper;getGreen(I)I- intermediary - method_61329- Lnet/minecraft/class_9848;method_61329(I)I- official - c- Layh;c(I)I
 
- 
getBluepublic static int getBlue(int argb) - Returns:
- the blue value of argbThe returned value is between 0and255(both inclusive).
- Mappings:
- Namespace - Name - Mixin selector - named - getBlue- Lnet/minecraft/util/math/ColorHelper;getBlue(I)I- intermediary - method_61331- Lnet/minecraft/class_9848;method_61331(I)I- official - d- Layh;d(I)I
 
- 
getArgbpublic 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 - getArgb- Lnet/minecraft/util/math/ColorHelper;getArgb(IIII)I- intermediary - method_61324- Lnet/minecraft/class_9848;method_61324(IIII)I- official - a- Layh;a(IIII)I
 
- 
getArgbpublic 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 - getArgb- Lnet/minecraft/util/math/ColorHelper;getArgb(III)I- intermediary - method_61323- Lnet/minecraft/class_9848;method_61323(III)I- official - a- Layh;a(III)I
 
- 
getArgb- Mappings:
- Namespace - Name - Mixin selector - named - getArgb- Lnet/minecraft/util/math/ColorHelper;getArgb(Lnet/minecraft/util/math/Vec3d;)I- intermediary - method_61325- Lnet/minecraft/class_9848;method_61325(Lnet/minecraft/class_243;)I- official - a- Layh;a(Lfgc;)I
 
- 
mixpublic static int mix(int first, int second) - Mappings:
- Namespace - Name - Mixin selector - named - mix- Lnet/minecraft/util/math/ColorHelper;mix(II)I- intermediary - method_61322- Lnet/minecraft/class_9848;method_61322(II)I- official - a- Layh;a(II)I
 
- 
scaleRgbpublic static int scaleRgb(int argb, float scale) - Mappings:
- Namespace - Name - Mixin selector - named - scaleRgb- Lnet/minecraft/util/math/ColorHelper;scaleRgb(IF)I- intermediary - method_61321- Lnet/minecraft/class_9848;method_61321(IF)I- official - a- Layh;a(IF)I
 
- 
scaleRgbpublic static int scaleRgb(int argb, float redScale, float greenScale, float blueScale) - Mappings:
- Namespace - Name - Mixin selector - named - scaleRgb- Lnet/minecraft/util/math/ColorHelper;scaleRgb(IFFF)I- intermediary - method_64602- Lnet/minecraft/class_9848;method_64602(IFFF)I- official - a- Layh;a(IFFF)I
 
- 
scaleRgbpublic static int scaleRgb(int argb, int scale) - Mappings:
- Namespace - Name - Mixin selector - named - scaleRgb- Lnet/minecraft/util/math/ColorHelper;scaleRgb(II)I- intermediary - method_61328- Lnet/minecraft/class_9848;method_61328(II)I- official - b- Layh;b(II)I
 
- 
grayscalepublic static int grayscale(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - grayscale- Lnet/minecraft/util/math/ColorHelper;grayscale(I)I- intermediary - method_61333- Lnet/minecraft/class_9848;method_61333(I)I- official - e- Layh;e(I)I
 
- 
lerppublic static int lerp(float delta, int start, int end) - Mappings:
- Namespace - Name - Mixin selector - named - lerp- Lnet/minecraft/util/math/ColorHelper;lerp(FII)I- intermediary - method_61319- Lnet/minecraft/class_9848;method_61319(FII)I- official - a- Layh;a(FII)I
 
- 
fullAlphapublic static int fullAlpha(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - fullAlpha- Lnet/minecraft/util/math/ColorHelper;fullAlpha(I)I- intermediary - method_61334- Lnet/minecraft/class_9848;method_61334(I)I- official - f- Layh;f(I)I
 
- 
zeroAlphapublic static int zeroAlpha(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - zeroAlpha- Lnet/minecraft/util/math/ColorHelper;zeroAlpha(I)I- intermediary - method_61335- Lnet/minecraft/class_9848;method_61335(I)I- official - g- Layh;g(I)I
 
- 
withAlphapublic static int withAlpha(int alpha, int rgb) - Mappings:
- Namespace - Name - Mixin selector - named - withAlpha- Lnet/minecraft/util/math/ColorHelper;withAlpha(II)I- intermediary - method_61330- Lnet/minecraft/class_9848;method_61330(II)I- official - c- Layh;c(II)I
 
- 
getWhitepublic static int getWhite(float alpha) - Mappings:
- Namespace - Name - Mixin selector - named - getWhite- Lnet/minecraft/util/math/ColorHelper;getWhite(F)I- intermediary - method_61317- Lnet/minecraft/class_9848;method_61317(F)I- official - a- Layh;a(F)I
 
- 
fromFloatspublic static int fromFloats(float alpha, float red, float green, float blue) - Mappings:
- Namespace - Name - Mixin selector - named - fromFloats- Lnet/minecraft/util/math/ColorHelper;fromFloats(FFFF)I- intermediary - method_61318- Lnet/minecraft/class_9848;method_61318(FFFF)I- official - a- Layh;a(FFFF)I
 
- 
toVector- Mappings:
- Namespace - Name - Mixin selector - named - toVector- Lnet/minecraft/util/math/ColorHelper;toVector(I)Lorg/joml/Vector3f;- intermediary - method_64963- Lnet/minecraft/class_9848;method_64963(I)Lorg/joml/Vector3f;- official - h- Layh;h(I)Lorg/joml/Vector3f;
 
- 
averagepublic static int average(int first, int second) - Mappings:
- Namespace - Name - Mixin selector - named - average- Lnet/minecraft/util/math/ColorHelper;average(II)I- intermediary - method_61332- Lnet/minecraft/class_9848;method_61332(II)I- official - d- Layh;d(II)I
 
- 
channelFromFloatpublic static int channelFromFloat(float value) - Mappings:
- Namespace - Name - Mixin selector - named - channelFromFloat- Lnet/minecraft/util/math/ColorHelper;channelFromFloat(F)I- intermediary - method_61326- Lnet/minecraft/class_9848;method_61326(F)I- official - b- Layh;b(F)I
 
- 
getAlphaFloatpublic static float getAlphaFloat(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - getAlphaFloat- Lnet/minecraft/util/math/ColorHelper;getAlphaFloat(I)F- intermediary - method_65100- Lnet/minecraft/class_9848;method_65100(I)F- official - i- Layh;i(I)F
 
- 
getRedFloatpublic static float getRedFloat(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - getRedFloat- Lnet/minecraft/util/math/ColorHelper;getRedFloat(I)F- intermediary - method_65101- Lnet/minecraft/class_9848;method_65101(I)F- official - j- Layh;j(I)F
 
- 
getGreenFloatpublic static float getGreenFloat(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - getGreenFloat- Lnet/minecraft/util/math/ColorHelper;getGreenFloat(I)F- intermediary - method_65102- Lnet/minecraft/class_9848;method_65102(I)F- official - k- Layh;k(I)F
 
- 
getBlueFloatpublic static float getBlueFloat(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - getBlueFloat- Lnet/minecraft/util/math/ColorHelper;getBlueFloat(I)F- intermediary - method_65103- Lnet/minecraft/class_9848;method_65103(I)F- official - l- Layh;l(I)F
 
- 
floatFromChannelprivate static float floatFromChannel(int channel) - Mappings:
- Namespace - Name - Mixin selector - named - floatFromChannel- Lnet/minecraft/util/math/ColorHelper;floatFromChannel(I)F- intermediary - method_61336- Lnet/minecraft/class_9848;method_61336(I)F- official - o- Layh;o(I)F
 
- 
toAbgrpublic static int toAbgr(int argb) - Mappings:
- Namespace - Name - Mixin selector - named - toAbgr- Lnet/minecraft/util/math/ColorHelper;toAbgr(I)I- intermediary - method_61337- Lnet/minecraft/class_9848;method_61337(I)I- official - m- Layh;m(I)I
 
- 
fromAbgrpublic static int fromAbgr(int abgr) - Mappings:
- Namespace - Name - Mixin selector - named - fromAbgr- Lnet/minecraft/util/math/ColorHelper;fromAbgr(I)I- intermediary - method_61338- Lnet/minecraft/class_9848;method_61338(I)I- official - n- Layh;n(I)I
 
 
-