Class RGBColor

java.lang.Object
com.aoapps.hodgepodge.awt.RGBColor

public final class RGBColor extends Object
Gets color integers provided color names. Supports the standard Unix colors as found in rgb.txt, hex colors starting with 0x, hex colors starting with #, or hex colors on their own.
Author:
AO Industries, Inc.
  • Method Details

    • getColor

      public static int getColor(String name) throws IOException, IllegalArgumentException
      Gets color integers provided color names. Supports the standard Unix colors as found in rgb.txt, hex colors starting with 0x, hex colors starting with #, or hex colors on their own.
      Parameters:
      name - the name of the color or a hex value
      Returns:
      an int in 8 bit RGB format
      Throws:
      NullPointerException - if name is null
      IllegalArgumentException - if unable to determine the color
      IOException