Class Argb

java.lang.Object
dev.boze.api.gui.util.Argb

public final class Argb extends Object
Helpers for colors packed as ARGB ints.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    alpha(int argb)
     
    static int
    blend(int from, int to, float t)
    Blends two colors channel by channel, including alpha.
    static int
    blue(int argb)
     
    static int
    fade(int argb, float factor)
    Multiplies the alpha by factor, 0 to 1.
    static int
    green(int argb)
     
    static int
    of(int alpha, int red, int green, int blue)
     
    static int
    red(int argb)
     
    static int
    withAlpha(int argb, int alpha)
     

    Methods inherited from class Object

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

    • alpha

      public static int alpha(int argb)
    • red

      public static int red(int argb)
    • green

      public static int green(int argb)
    • blue

      public static int blue(int argb)
    • of

      public static int of(int alpha, int red, int green, int blue)
    • withAlpha

      public static int withAlpha(int argb, int alpha)
      Parameters:
      alpha - New alpha, 0 to 255
    • fade

      public static int fade(int argb, float factor)
      Multiplies the alpha by factor, 0 to 1.
    • blend

      public static int blend(int from, int to, float t)
      Blends two colors channel by channel, including alpha.
      Parameters:
      t - 0 gives from, 1 gives to