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 ayp
  • Constructor Details

    • ColorHelper

      public ColorHelper()
  • Method Details

    • getAlpha

      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 Layp;a(I)I
    • getRed

      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 Layp;b(I)I
    • getGreen

      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 Layp;c(I)I
    • getBlue

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

      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 Layp;a(Lfbx;)I
    • mix

      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 Layp;a(II)I
    • scaleRgb

      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 Layp;a(IF)I
    • scaleRgb

      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 Layp;a(IFFF)I
    • scaleRgb

      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 Layp;b(II)I
    • grayscale

      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 Layp;e(I)I
    • lerp

      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 Layp;a(FII)I
    • fullAlpha

      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 Layp;f(I)I
    • zeroAlpha

      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 Layp;g(I)I
    • withAlpha

      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 Layp;c(II)I
    • getWhite

      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 Layp;a(F)I
    • fromFloats

      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 Layp;a(FFFF)I
    • toVector

      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 Layp;h(I)Lorg/joml/Vector3f;
    • average

      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 Layp;d(II)I
    • channelFromFloat

      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 Layp;b(F)I
    • floatFromChannel

      public 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 i Layp;i(I)F
    • toAbgr

      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 j Layp;j(I)I
    • fromAbgr

      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 k Layp;k(I)I