Package com.kheops.util
Class ColorConverter
java.lang.Object
com.kheops.util.ColorConverter
This class permits to convert color expressed in hexadecimal to decimal (int) and vice vesa
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringgetHexColor(Color color) static StringgetHTMLColor(int rgb) This class builds the Hmtl color string from the color expressed in intstatic StringgetHTMLColor(Color color) This class builds the HTML color string from the color expressed in int.static intgetRGBColor(String htmlColor) This method builds the int color representation from the html color stringstatic intThis method converts a hexadecimal number to the corresponding int valuestatic StringintToHex(int n, int shift) This method converts an int to the corresponding hexadecimal value
- 
Constructor Details- 
ColorConverterpublic ColorConverter()
 
- 
- 
Method Details- 
getHexColor
- 
getHTMLColorThis class builds the Hmtl color string from the color expressed in int- Parameters:
- rgb- the int representing the color
 
- 
getHTMLColorThis class builds the HTML color string from the color expressed in int.- Returns:
- HTML hex color
 
- 
getRGBColorThis method builds the int color representation from the html color string- Parameters:
- htmlColor- the color expressed in the html string format
 
- 
intToHexThis method converts an int to the corresponding hexadecimal value- Parameters:
- n- the integer value
- shift- the number of bits to be shift
 
- 
hexToIntThis method converts a hexadecimal number to the corresponding int value- Parameters:
- hex- the String containing the hexadecimal number
- Returns:
- the corresponding int value.
 
 
-