Class Color

java.lang.Object
armyc2.c5isr.renderer.utilities.Color

public class Color extends Object
Integer based Color class with utility functions
  • Field Details

    • white

      public static final Color white
      The color white. In the default sRGB space.
    • WHITE

      public static final Color WHITE
      The color white. In the default sRGB space.
      Since:
      1.4
    • lightGray

      public static final Color lightGray
      The color light gray. In the default sRGB space.
    • LIGHT_GRAY

      public static final Color LIGHT_GRAY
      The color light gray. In the default sRGB space.
      Since:
      1.4
    • gray

      public static final Color gray
      The color gray. In the default sRGB space.
    • GRAY

      public static final Color GRAY
      The color gray. In the default sRGB space.
      Since:
      1.4
    • darkGray

      public static final Color darkGray
      The color dark gray. In the default sRGB space.
    • DARK_GRAY

      public static final Color DARK_GRAY
      The color dark gray. In the default sRGB space.
      Since:
      1.4
    • black

      public static final Color black
      The color black. In the default sRGB space.
    • BLACK

      public static final Color BLACK
      The color black. In the default sRGB space.
      Since:
      1.4
    • red

      public static final Color red
      The color red. In the default sRGB space.
    • RED

      public static final Color RED
      The color red. In the default sRGB space.
      Since:
      1.4
    • pink

      public static final Color pink
      The color pink. In the default sRGB space.
    • PINK

      public static final Color PINK
      The color pink. In the default sRGB space.
      Since:
      1.4
    • orange

      public static final Color orange
      The color orange. In the default sRGB space.
    • ORANGE

      public static final Color ORANGE
      The color orange. In the default sRGB space.
      Since:
      1.4
    • yellow

      public static final Color yellow
      The color yellow. In the default sRGB space.
    • YELLOW

      public static final Color YELLOW
      The color yellow. In the default sRGB space.
      Since:
      1.4
    • green

      public static final Color green
      The color green. In the default sRGB space.
    • GREEN

      public static final Color GREEN
      The color green. In the default sRGB space.
      Since:
      1.4
    • magenta

      public static final Color magenta
      The color magenta. In the default sRGB space.
    • MAGENTA

      public static final Color MAGENTA
      The color magenta. In the default sRGB space.
      Since:
      1.4
    • cyan

      public static final Color cyan
      The color cyan. In the default sRGB space.
    • CYAN

      public static final Color CYAN
      The color cyan. In the default sRGB space.
      Since:
      1.4
    • blue

      public static final Color blue
      The color blue. In the default sRGB space.
    • BLUE

      public static final Color BLUE
      The color blue. In the default sRGB space.
      Since:
      1.4
  • Constructor Details

    • Color

      public Color(int R, int G, int B)
    • Color

      public Color(int R, int G, int B, int A)
    • Color

      public Color(Color color)
    • Color

      public Color(int color)
    • Color

      public Color(String hexString)
    • Color

      public Color(Object color)
  • Method Details

    • toARGB

      public int toARGB()
    • toHexString

      public String toHexString()
      Converts color object to hex string. You may have to prepend with '#' or "0x" depending on how you need to use the string.
      Returns:
      8 character hex string
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getRed

      public int getRed()
    • getGreen

      public int getGreen()
    • getBlue

      public int getBlue()
    • getAlpha

      public int getAlpha()
    • setAlpha

      public void setAlpha(int alpha)
      Parameters:
      alpha - 0-255
    • toInt

      public int toInt()