ColorTranslator
Inheritance: java.lang.Object
public final class ColorTranslator
Translates colors to and from GDI+ Color structures. This class cannot be inherited.
Methods
Method | Description |
---|---|
fromHtml(String htmlColor) | Takes color from the HTML color. |
fromOle(int oleColor) | Takes color from the OLE color. |
fromWin32(int win32Color) | Takes color from the HTML color. |
toHtml(Color c) | Creates HTML color from the color. |
toOle(Color c) | Translates OLE color to color. |
toWin32(Color c) | Translates the color to win32 color. |
fromHtml(String htmlColor)
public static Color fromHtml(String htmlColor)
Takes color from the HTML color.
Parameters:
Parameter | Type | Description |
---|---|---|
htmlColor | java.lang.String | HTML color. |
Returns: Color - The color.
fromOle(int oleColor)
public static Color fromOle(int oleColor)
Takes color from the OLE color.
Parameters:
Parameter | Type | Description |
---|---|---|
oleColor | int | OLE color. |
Returns: Color - The color.
fromWin32(int win32Color)
public static Color fromWin32(int win32Color)
Takes color from the HTML color.
Parameters:
Parameter | Type | Description |
---|---|---|
win32Color | int | Win32 color. |
Returns: Color - The color.
toHtml(Color c)
public static String toHtml(Color c)
Creates HTML color from the color.
Parameters:
Parameter | Type | Description |
---|---|---|
c | Color | The color class. |
Returns: java.lang.String - The html string color.
toOle(Color c)
public static int toOle(Color c)
Translates OLE color to color.
Parameters:
Parameter | Type | Description |
---|---|---|
c | Color | The color. |
Returns: int - The OLE color.
toWin32(Color c)
public static int toWin32(Color c)
Translates the color to win32 color.
Parameters:
Parameter | Type | Description |
---|---|---|
c | Color | The color. |
Returns: int - The win32 color.