Package cnuphys.splot.plot
Class X11Colors
java.lang.Object
cnuphys.splot.plot.X11Colors
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Color
getX11Color
(String name) Gets the named color from the X11 color list.static Color
getX11Color
(String name, int alpha) Gets an X11 color and sets the alphastatic String
getX11ColorAsHex
(String name) Gets the named color from the X11 color list.
-
Constructor Details
-
X11Colors
public X11Colors()
-
-
Method Details
-
getX11Color
Gets an X11 color and sets the alpha- Parameters:
name
- the name of the coloralpha
- [0..255] (255 is opaque)- Returns:
- the corresponding x11 color (not from cache)
-
getX11ColorAsHex
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
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
.
-