public class Color
extends java.lang.Object
| Constructor and Description |
|---|
Color() |
| Modifier and Type | Method and Description |
|---|---|
static int |
alpha(int color)
Extracts the alpha, in range [0, 255], from the given packed color.
|
static int |
argb(int a,
int r,
int g,
int b)
Creates a packed integer color from four ARGB values in the range [0, 255].
|
static int |
blue(int color)
Extracts the blue component, in range [0, 255], from the given packed color.
|
static float |
decodeLower(float encoded)
Decodes and returns the lower color value in a two color value encoded by
encode(float, float). |
static float |
decodeUpper(float encoded)
Decodes and returns the upper color value in a two color value encoded by
encode(float, float). |
static float |
encode(float upper,
float lower)
Encodes two [0..1] color values into the format used by the standard shader program.
|
static int |
green(int color)
Extracts the green component, in range [0, 255], from the given packed color.
|
static int |
red(int color)
Extracts the red component, in range [0, 255], from the given packed color.
|
static int |
rgb(int r,
int g,
int b)
Creates a packed integer color from three RGB values in the range [0, 255].
|
static int |
withAlpha(int color,
int alpha)
Returns a new color that's a copy of the given color, but with the new alpha value, in
range [0, 255].
|
public static int argb(int a,
int r,
int g,
int b)
public static int rgb(int r,
int g,
int b)
public static final int alpha(int color)
public static final int red(int color)
public static final int green(int color)
public static final int blue(int color)
public static int withAlpha(int color,
int alpha)
public static float encode(float upper,
float lower)
public static float decodeUpper(float encoded)
encode(float, float).public static float decodeLower(float encoded)
encode(float, float).Copyright © 2018. All Rights Reserved.