public final class ColorUtils extends Object
Constructor and Description |
---|
ColorUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
alpha(int color)
Returns the alpha component of the specified color
|
static int |
blue(int color)
Returns the blue component of the specified color
|
static int |
color(int red,
int green,
int blue,
int alpha)
Puts back the four color components into a integer representation
|
static int |
compareLong(long l1,
long l2)
Compares two longs, to be used in comparators
|
static int |
green(int color)
Returns the green component of the specified color
|
static int |
red(int color)
Returns the red component of the specified color
|
static int |
shift(int component,
int shift)
Bit shifts a color component, loosing the less significant bits
|
static int |
unshift(int component,
int shift)
Undoes what shift did, with some heuristics to preserve full "black", full "white" and lighter colors
|
public static int alpha(int color)
color
- public static int red(int color)
color
- public static int green(int color)
color
- public static int blue(int color)
color
- public static int color(int red, int green, int blue, int alpha)
public static int shift(int component, int shift)
component
- shift
- public static int unshift(int component, int shift)
component
- shift
- public static int compareLong(long l1, long l2)
l1
- l2
- Copyright © 2006–2016 GeoSolutions. All rights reserved.