|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.scijava.util.ColorRGB
public class ColorRGB
A color with red, green and blue color components.
It exists mainly to avoid AWT references to Color.
| Constructor Summary | |
|---|---|
ColorRGB(int red,
int green,
int blue)
|
|
ColorRGB(String s)
Parses a color from the given string. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
static ColorRGB |
fromHSVColor(double h,
double s,
double v)
|
static ColorRGB |
fromHTMLColor(String color)
Convert a string in the format specified by CSS Color Module Level 3 - W3C Recommendation 07 June 2011 to a ColorRGB object. |
int |
getAlpha()
|
int |
getARGB()
Gets the color as a packed integer, 8 bits per color component. |
int |
getBlue()
|
int |
getGreen()
|
int |
getRed()
|
int |
hashCode()
|
String |
toHTMLColor()
Convert this ColorRGB to a string in the format specified by CSS Color Module Level 3 - W3C Recommendation 07 June 2011. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ColorRGB(int red,
int green,
int blue)
public ColorRGB(String s)
#), as handled by
fromHTMLColor(String).Colors.getColor(String).r,g,b, with each element in the
range [0, 255].
| Method Detail |
|---|
public int getRed()
public int getGreen()
public int getBlue()
public int getAlpha()
public int getARGB()
public String toHTMLColor()
We preferentially encode using one of the colors in the table and fall back to the hex encoding.
public String toString()
toString in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic static ColorRGB fromHTMLColor(String color)
ColorRGB object.
color - The color string to convert.
public static ColorRGB fromHSVColor(double h,
double s,
double v)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||