Class ColorHelper

java.lang.Object
net.minecraft.util.math.ColorHelper

public class ColorHelper extends Object
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 axk
  • Constructor Details Link icon

    • ColorHelper Link icon

      public ColorHelper()
  • Method Details Link icon

    • getAlpha Link icon

      public static int getAlpha(int argb)
      Returns:
      the alpha value of argb

      The returned value is between 0 and 255 (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 Laxk;a(I)I
    • getRed Link icon

      public static int getRed(int argb)
      Returns:
      the red value of argb

      The returned value is between 0 and 255 (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 Laxk;b(I)I
    • getGreen Link icon

      public static int getGreen(int argb)
      Returns:
      the green value of argb

      The returned value is between 0 and 255 (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 Laxk;c(I)I
    • getBlue Link icon

      public static int getBlue(int argb)
      Returns:
      the blue value of argb

      The returned value is between 0 and 255 (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 Laxk;d(I)I
    • getArgb Link icon

      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 getArgb Lnet/minecraft/util/math/ColorHelper;getArgb(IIII)I
      intermediary method_61324 Lnet/minecraft/class_9848;method_61324(IIII)I
      official a Laxk;a(IIII)I
    • getArgb Link icon

      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 getArgb Lnet/minecraft/util/math/ColorHelper;getArgb(III)I
      intermediary method_61323 Lnet/minecraft/class_9848;method_61323(III)I
      official a Laxk;a(III)I
    • getArgb Link icon

      public static int getArgb(Vec3d rgb)
      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 Laxk;a(Lfbb;)I
    • mix Link icon

      public 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 Laxk;a(II)I
    • scaleRgb Link icon

      public 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 Laxk;a(IF)I
    • scaleRgb Link icon

      public 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 Laxk;a(IFFF)I
    • scaleRgb Link icon

      public 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 Laxk;b(II)I
    • grayscale Link icon

      public 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 Laxk;e(I)I
    • lerp Link icon

      public 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 Laxk;a(FII)I
    • fullAlpha Link icon

      public 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 Laxk;f(I)I
    • zeroAlpha Link icon

      public 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 Laxk;g(I)I
    • withAlpha Link icon

      public 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 Laxk;c(II)I
    • getWhite Link icon

      public 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 Laxk;a(F)I
    • fromFloats Link icon

      public 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 Laxk;a(FFFF)I
    • toVector Link icon

      public static Vector3f toVector(int rgb)
      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 Laxk;h(I)Lorg/joml/Vector3f;
    • average Link icon

      public 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 Laxk;d(II)I
    • channelFromFloat Link icon

      public 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 Laxk;b(F)I
    • getAlphaFloat Link icon

      public 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 Laxk;i(I)F
    • getRedFloat Link icon

      public 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 Laxk;j(I)F
    • getGreenFloat Link icon

      public 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 Laxk;k(I)F
    • getBlueFloat Link icon

      public 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 Laxk;l(I)F
    • floatFromChannel Link icon

      private 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 Laxk;o(I)F
    • toAbgr Link icon

      public 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 Laxk;m(I)I
    • fromAbgr Link icon

      public 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 Laxk;n(I)I