Class ColorHelper
- java.lang.Object
-
- org.processmining.processcomparisonpetrinetdecomposition.util.ColorHelper
-
public class ColorHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ColorHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringawtColorToHexString(java.awt.Color color)Maps an awt Color object to its respective hex string in lower case.static java.awt.Colorbwr(double difference)Mimics matplotlib 'bwr' colour map, i.e.static java.awt.ColorhexStringToAWTColor(java.lang.String hex)Maps a hex string to a respective awt Color object.
-
-
-
Method Detail
-
hexStringToAWTColor
public static java.awt.Color hexStringToAWTColor(java.lang.String hex)
Maps a hex string to a respective awt Color object.- Parameters:
hex- Hex string of the from "#RRGGBB" (in upper or lowercase)- Returns:
- Color object.
-
awtColorToHexString
public static java.lang.String awtColorToHexString(java.awt.Color color)
Maps an awt Color object to its respective hex string in lower case.- Parameters:
color-- Returns:
- lower case hex string of the from "#rrggbb".
-
bwr
public static java.awt.Color bwr(double difference)
Mimics matplotlib 'bwr' colour map, i.e. a diverging colour map with the colour blue for -1 and red for +1 in which the lightness (L*) of the colours is reduced the closer the difference value gets to 0.- Parameters:
difference- : double between -1 and 1, where 0 is no difference and -1/1 the maximal difference in the respective direction- Returns:
- Color object
-
-