public class ColorUtil
extends java.lang.Object
Constructor | Description |
---|---|
ColorUtil() |
Modifier and Type | Method | Description |
---|---|---|
static int |
calcGreyscaleRgbFromRgb(int rgb) |
Return a greyscale rgb value 0-FF using NTSC color luminance algorithm
|
static Point3f |
colorPointFromInt(int color,
Point3f pt) |
|
static Point3f |
colorPointFromInt2(int color) |
|
static Point3f |
colorPointFromString(java.lang.String colorName,
Point3f pt) |
|
static int |
colorPtToInt(Point3f pt) |
|
static int |
colorTriadToInt(float x,
float y,
float z) |
|
static int |
getArgbFromString(java.lang.String strColor) |
accepts [xRRGGBB] or [0xRRGGBB] or [0xFFRRGGBB] or #RRGGBB or
[red,green,blue] or a valid JavaScript color
|
static int |
rgb(int red,
int grn,
int blu) |
public static int getArgbFromString(java.lang.String strColor)
strColor
- public static int colorTriadToInt(float x, float y, float z)
public static int rgb(int red, int grn, int blu)
public static final Point3f colorPointFromString(java.lang.String colorName, Point3f pt)
public static final Point3f colorPointFromInt2(int color)
public static int colorPtToInt(Point3f pt)
public static int calcGreyscaleRgbFromRgb(int rgb)
the alpha component is set to 0xFF. If you want a value in the range 0-255 then & the result with 0xFF;
rgb
- the rgb value