| Modifier and Type | Field and Description |
|---|---|
(package private) int |
alpha
Color alpha
|
(package private) int |
blue
Color blue
|
(package private) int |
color
Color itself
|
(package private) int |
green
Color green
|
(package private) int |
info
Additional information
|
(package private) static int |
precision
Precision for decide if two colors are similar
|
(package private) int |
red
Color red
|
| Constructor and Description |
|---|
Color(int color)
Create a new instance of Color
|
Color(int alpha,
int red,
int green,
int blue)
Create a new instance of Color
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Color color)
Compare with an other color
Parent documentation: |
boolean |
equals(java.lang.Object object)
Indicate in an Object is equals to this color
Parent documentation: |
boolean |
isNear(Color color,
int precision)
Indicates if a color is similar to this color
|
static boolean |
isNear(int red,
int green,
int blue,
int color,
int precision)
Indicates if 2 colors are similar
|
static boolean |
isNear(int red1,
int green1,
int blue1,
int red2,
int green2,
int blue2,
int precision)
Indicates if 2 colors are similar
|
static int precision
int alpha
int blue
int color
int green
int info
int red
public Color(int color)
color - The colorpublic Color(int alpha,
int red,
int green,
int blue)
alpha - Alphared - Redgreen - Greenblue - Bluepublic static boolean isNear(int red,
int green,
int blue,
int color,
int precision)
red - Fist color redgreen - First color greenblue - First color bluecolor - Second colorprecision - Precision to usetrue if colors are similarpublic static boolean isNear(int red1,
int green1,
int blue1,
int red2,
int green2,
int blue2,
int precision)
red1 - First color redgreen1 - First color greenblue1 - First color bluered2 - Second color redgreen2 - Second color greenblue2 - Second color blueprecision - Precision to usetrue if colors are similarpublic int compareTo(Color color)
compareTo in interface java.lang.Comparable<Color>color - Color to compare withComparable.compareTo(java.lang.Object)public boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - Object to testtrue in equalityObject.equals(java.lang.Object)public boolean isNear(Color color, int precision)
color - Color to compareprecision - Precision to usetrue if the color is similar