- java.lang.Object
-
- org.logicng.io.graphical.GraphicalColor
-
public class GraphicalColor extends Object
A color for graphical representations of formulas, BDDs, and graphs.A color can be generated from RGB or hex values.
- Since:
- 2.4.0
- Version:
- 2.4.0
-
-
Field Summary
Fields Modifier and Type Field Description static GraphicalColorBLACKstatic GraphicalColorBLUEstatic GraphicalColorCYANstatic GraphicalColorGRAY_DARKstatic GraphicalColorGRAY_LIGHTstatic GraphicalColorGREENstatic GraphicalColorORANGEstatic GraphicalColorPURPLEstatic GraphicalColorREDstatic GraphicalColorTURQUOISEstatic GraphicalColorWHITEstatic GraphicalColorYELLOW
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetHexValue()Returns the hex value of this color.inthashCode()static GraphicalColorhex(String hexValue)Constructs a new color from a hex value.static GraphicalColorrgb(int red, int green, int blue)Constructs a new color from an RGB value.StringtoString()
-
-
-
Field Detail
-
BLACK
public static final GraphicalColor BLACK
-
WHITE
public static final GraphicalColor WHITE
-
GRAY_DARK
public static final GraphicalColor GRAY_DARK
-
GRAY_LIGHT
public static final GraphicalColor GRAY_LIGHT
-
RED
public static final GraphicalColor RED
-
GREEN
public static final GraphicalColor GREEN
-
BLUE
public static final GraphicalColor BLUE
-
YELLOW
public static final GraphicalColor YELLOW
-
ORANGE
public static final GraphicalColor ORANGE
-
CYAN
public static final GraphicalColor CYAN
-
PURPLE
public static final GraphicalColor PURPLE
-
TURQUOISE
public static final GraphicalColor TURQUOISE
-
-
Method Detail
-
hex
public static GraphicalColor hex(String hexValue)
Constructs a new color from a hex value. The string must be of the form "#aabbcc". E.g. the default red has the representation "#ea2027".- Parameters:
hexValue- the hex value- Returns:
- the color object
-
rgb
public static GraphicalColor rgb(int red, int green, int blue)
Constructs a new color from an RGB value. Each value must be within range 0 (inclusive) and 255 (inclusive).- Parameters:
red- the red valuegreen- the green valueblue- the blue value- Returns:
- the color object
-
getHexValue
public String getHexValue()
Returns the hex value of this color.- Returns:
- the hex value of this color
-
-