Class ARGB

java.lang.Object
games.stendhal.common.color.ARGB

public class ARGB extends Object
Convenience methods for dealing with ARGB colors.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
    Position of alpha component.
    static int
    Position of blue component.
    static int
    Position of green component.
    static int
    Position of red component.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    mergeRgb​(int[] rgbData)
    Merge 8 bit ARGB color components to one integer color.
    static void
    splitRgb​(int rgb, int[] result)
    Split ARGB color to its 8 bit color components.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • ARGB

      public ARGB()
  • Method Details

    • splitRgb

      public static void splitRgb(int rgb, int[] result)
      Split ARGB color to its 8 bit color components.
      Parameters:
      rgb - red, green, blue value
      result - array of length 4.
    • mergeRgb

      public static int mergeRgb(int[] rgbData)
      Merge 8 bit ARGB color components to one integer color.
      Parameters:
      rgbData - data to be merged. Array of length 4.
      Returns:
      ARGB as an integer