Class X11Colors

java.lang.Object
cnuphys.splot.plot.X11Colors

public class X11Colors extends Object
  • Constructor Details

    • X11Colors

      public X11Colors()
  • Method Details

    • getX11Color

      public static Color getX11Color(String name, int alpha)
      Gets an X11 color and sets the alpha
      Parameters:
      name - the name of the color
      alpha - [0..255] (255 is opaque)
      Returns:
      the corresponding x11 color (not from cache)
    • getX11ColorAsHex

      public static String getX11ColorAsHex(String name)
      Gets the named color from the X11 color list.
      Parameters:
      name - the name of the X11 color.
      Returns:
      the named color from the X11 color list as a hex string.
    • getX11Color

      public static Color getX11Color(String name)
      Gets the named color from the X11 color list.
      Parameters:
      name - the name of the X11 color.
      Returns:
      the named color from the X11 color list, or null.