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 beo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final byte[]private static final short[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intadd(int a, int b) static intaverage(int first, int second) private static intaverageSrgbIntensities(int a, int b, int c, int d) static intchannelFromFloat(float value) private static floatcomputeLinearToSrgb(float linear) private static floatcomupteSrgbToLinear(float srgb) 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 intinterpolate(int a, int b, int c, int d) static intlerp(float delta, int start, int end) static intlinearToSrgb(float linear) static intmethod_75605(float float2, int int2, int int3) static intmix(int first, int second) static intscaleAlpha(int argb, float scale) static intscaleRgb(int argb, float scale) static intscaleRgb(int argb, float redScale, float greenScale, float blueScale) static intscaleRgb(int argb, int scale) static floatsrgbToLinear(int srgb) static intsubtract(int a, int b) static inttoAbgr(int argb) static inttoAlpha(float alpha) static inttoAlpha(int alpha) static Vector3ftoVector(int rgb) static intwhiteWithAlpha(int alpha) static intwithAlpha(float alpha, int color) static intwithAlpha(int alpha, int rgb) static intwithBrightness(int argb, float brightness) static intzeroAlpha(int argb)
-
Field Details
-
field_63677
private static final int field_63677- See Also:
- Mappings:
Namespace Name Mixin selector named field_63677Lnet/minecraft/util/math/ColorHelper;field_63677:Iintermediary field_63677Lnet/minecraft/class_9848;field_63677:Iofficial aLbeo;a:I
-
SRGB_TO_LINEAR
private static final short[] SRGB_TO_LINEAR- Mappings:
Namespace Name Mixin selector named SRGB_TO_LINEARLnet/minecraft/util/math/ColorHelper;SRGB_TO_LINEAR:[Sintermediary field_63678Lnet/minecraft/class_9848;field_63678:[Sofficial bLbeo;b:[S
-
LINEAR_TO_SRGB
private static final byte[] LINEAR_TO_SRGB- Mappings:
Namespace Name Mixin selector named LINEAR_TO_SRGBLnet/minecraft/util/math/ColorHelper;LINEAR_TO_SRGB:[Bintermediary field_63679Lnet/minecraft/class_9848;field_63679:[Bofficial cLbeo;c:[B
-
-
Constructor Details
-
ColorHelper
public ColorHelper()
-
-
Method Details
-
comupteSrgbToLinear
private static float comupteSrgbToLinear(float srgb) - Mappings:
Namespace Name Mixin selector named comupteSrgbToLinearLnet/minecraft/util/math/ColorHelper;comupteSrgbToLinear(F)Fintermediary method_75610Lnet/minecraft/class_9848;method_75610(F)Fofficial eLbeo;e(F)F
-
computeLinearToSrgb
private static float computeLinearToSrgb(float linear) - Mappings:
Namespace Name Mixin selector named computeLinearToSrgbLnet/minecraft/util/math/ColorHelper;computeLinearToSrgb(F)Fintermediary method_75611Lnet/minecraft/class_9848;method_75611(F)Fofficial fLbeo;f(F)F
-
srgbToLinear
public static float srgbToLinear(int srgb) - Mappings:
Namespace Name Mixin selector named srgbToLinearLnet/minecraft/util/math/ColorHelper;srgbToLinear(I)Fintermediary method_75600Lnet/minecraft/class_9848;method_75600(I)Fofficial aLbeo;a(I)F
-
linearToSrgb
public static int linearToSrgb(float linear) - Mappings:
Namespace Name Mixin selector named linearToSrgbLnet/minecraft/util/math/ColorHelper;linearToSrgb(F)Iintermediary method_75599Lnet/minecraft/class_9848;method_75599(F)Iofficial aLbeo;a(F)I
-
interpolate
public static int interpolate(int a, int b, int c, int d) - Mappings:
Namespace Name Mixin selector named interpolateLnet/minecraft/util/math/ColorHelper;interpolate(IIII)Iintermediary method_75602Lnet/minecraft/class_9848;method_75602(IIII)Iofficial aLbeo;a(IIII)I
-
averageSrgbIntensities
private static int averageSrgbIntensities(int a, int b, int c, int d) - Mappings:
Namespace Name Mixin selector named averageSrgbIntensitiesLnet/minecraft/util/math/ColorHelper;averageSrgbIntensities(IIII)Iintermediary method_75609Lnet/minecraft/class_9848;method_75609(IIII)Iofficial cLbeo;c(IIII)I
-
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 bLbeo;b(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 cLbeo;c(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 dLbeo;d(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 eLbeo;e(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 bLbeo;b(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 aLbeo;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 aLbeo;a(Lfrd;)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 aLbeo;a(II)I
-
add
public static int add(int a, int b) - Mappings:
Namespace Name Mixin selector named addLnet/minecraft/util/math/ColorHelper;add(II)Iintermediary method_75606Lnet/minecraft/class_9848;method_75606(II)Iofficial bLbeo;b(II)I
-
subtract
public static int subtract(int a, int b) - Mappings:
Namespace Name Mixin selector named subtractLnet/minecraft/util/math/ColorHelper;subtract(II)Iintermediary method_75608Lnet/minecraft/class_9848;method_75608(II)Iofficial cLbeo;c(II)I
-
scaleAlpha
public static int scaleAlpha(int argb, float scale) - Mappings:
Namespace Name Mixin selector named scaleAlphaLnet/minecraft/util/math/ColorHelper;scaleAlpha(IF)Iintermediary method_75601Lnet/minecraft/class_9848;method_75601(IF)Iofficial aLbeo;a(IF)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 bLbeo;b(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 aLbeo;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 dLbeo;d(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 fLbeo;f(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 aLbeo;a(FII)I
-
method_75605
public static int method_75605(float float2, int int2, int int3) - Mappings:
Namespace Name Mixin selector named method_75605Lnet/minecraft/util/math/ColorHelper;method_75605(FII)Iintermediary method_75605Lnet/minecraft/class_9848;method_75605(FII)Iofficial bLbeo;b(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 gLbeo;g(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 hLbeo;h(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 eLbeo;e(II)I
-
withAlpha
public static int withAlpha(float alpha, int color) - Mappings:
Namespace Name Mixin selector named withAlphaLnet/minecraft/util/math/ColorHelper;withAlpha(FI)Iintermediary method_71346Lnet/minecraft/class_9848;method_71346(FI)Iofficial aLbeo;a(FI)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 bLbeo;b(F)I
-
whiteWithAlpha
public static int whiteWithAlpha(int alpha) - Mappings:
Namespace Name Mixin selector named whiteWithAlphaLnet/minecraft/util/math/ColorHelper;whiteWithAlpha(I)Iintermediary method_75612Lnet/minecraft/class_9848;method_75612(I)Iofficial iLbeo;i(I)I
-
toAlpha
public static int toAlpha(float alpha) - Mappings:
Namespace Name Mixin selector named toAlphaLnet/minecraft/util/math/ColorHelper;toAlpha(F)Iintermediary method_75607Lnet/minecraft/class_9848;method_75607(F)Iofficial cLbeo;c(F)I
-
toAlpha
public static int toAlpha(int alpha) - Mappings:
Namespace Name Mixin selector named toAlphaLnet/minecraft/util/math/ColorHelper;toAlpha(I)Iintermediary method_75613Lnet/minecraft/class_9848;method_75613(I)Iofficial jLbeo;j(I)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 aLbeo;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 kLbeo;k(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 fLbeo;f(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 dLbeo;d(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 lLbeo;l(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 mLbeo;m(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 nLbeo;n(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 oLbeo;o(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 rLbeo;r(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 pLbeo;p(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 qLbeo;q(I)I
-
withBrightness
public static int withBrightness(int argb, float brightness) - Mappings:
Namespace Name Mixin selector named withBrightnessLnet/minecraft/util/math/ColorHelper;withBrightness(IF)Iintermediary method_70658Lnet/minecraft/class_9848;method_70658(IF)Iofficial cLbeo;c(IF)I
-