java.lang.Object
net.ixdarklord.coolcatcore.api.utils.ARGB

public final class ARGB extends Object
Packed ARGB colour helpers: the parts of newer Minecraft's net.minecraft.util.ARGB that CoolCatLib uses, for 1.20.1, which only has FastColor.ARGB32.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    alpha(int color)
     
    static float
    alphaFloat(int color)
     
    static int
    as8BitChannel(float value)
     
    static int
    blue(int color)
     
    static float
    blueFloat(int color)
     
    static int
    color(int alpha, int rgb)
    rgb with the given alpha (0-255).
    static int
    color(int red, int green, int blue)
     
    static int
    color(int alpha, int red, int green, int blue)
     
    static int
    colorFromFloat(float alpha, float red, float green, float blue)
     
    static int
    green(int color)
     
    static float
    greenFloat(int color)
     
    static int
    lerp(float delta, int from, int to)
    Linear interpolation of each channel, from from (at 0) to to (at 1).
    static int
    multiply(int a, int b)
    Channel by channel product of two colours.
    static int
    multiplyAlpha(int color, float alphaMultiplier)
     
    static int
    opaque(int color)
     
    static int
    red(int color)
     
    static float
    redFloat(int color)
     
    static int
    scaleRGB(int color, float scale)
     
    static int
    srgbLerp(float delta, int from, int to)
    Interpolation in sRGB space, like newer Minecraft's ARGB.srgbLerp: each channel, linearly.
    static int
    transparent(int color)
     
    static int
    white(float alpha)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • alpha

      public static int alpha(int color)
    • red

      public static int red(int color)
    • green

      public static int green(int color)
    • blue

      public static int blue(int color)
    • color

      public static int color(int alpha, int red, int green, int blue)
    • color

      public static int color(int red, int green, int blue)
    • color

      public static int color(int alpha, int rgb)
      rgb with the given alpha (0-255).
    • opaque

      public static int opaque(int color)
    • transparent

      public static int transparent(int color)
    • alphaFloat

      public static float alphaFloat(int color)
    • redFloat

      public static float redFloat(int color)
    • greenFloat

      public static float greenFloat(int color)
    • blueFloat

      public static float blueFloat(int color)
    • as8BitChannel

      public static int as8BitChannel(float value)
    • colorFromFloat

      public static int colorFromFloat(float alpha, float red, float green, float blue)
    • white

      public static int white(float alpha)
    • multiply

      public static int multiply(int a, int b)
      Channel by channel product of two colours.
    • multiplyAlpha

      public static int multiplyAlpha(int color, float alphaMultiplier)
    • scaleRGB

      public static int scaleRGB(int color, float scale)
    • lerp

      public static int lerp(float delta, int from, int to)
      Linear interpolation of each channel, from from (at 0) to to (at 1).
    • srgbLerp

      public static int srgbLerp(float delta, int from, int to)
      Interpolation in sRGB space, like newer Minecraft's ARGB.srgbLerp: each channel, linearly.