Modifier and Type | Method and Description |
---|---|
static Color |
deriveColor(Color original,
int alpha)
Creates an sRGB color with the RGB values of the
original
and the specified alpha value. |
static Color |
getColorFromRGBString(String... values)
|
static Color |
getDifference(Color c1,
Color c2,
float pos) |
static Color |
getMiddle(Color c1,
Color c2)
Creates a color from the average values of the given
c1 and
c2 . |
static String |
toString(Color color)
Returns the given colors values as concatenated String
|
static String |
toString(Color color,
boolean withAlpha)
Returns the given colors values as concatenated String
|
public static Color deriveColor(Color original, int alpha) throws IllegalArgumentException
original
and the specified alpha
value.original
- the original Color
alpha
- the alpha component (range 0 - 255)IllegalArgumentException
- if alpha
are outside of the range 0 to 255,
inclusiveColor
public static Color getMiddle(Color c1, Color c2)
c1
and
c2
.c1
- first colorc2
- second colorColor
with the average valuespublic static Color getColorFromRGBString(String... values)
values
- the RGB
String
values.Color
representation of the given values, or
null
if no Color
could be calculated.public static String toString(Color color)
color
- the color to convert.Copyright © 2003–2021 XDEV Software. All rights reserved.