public class ColorHelper
extends java.lang.Object
| Constructor and Description |
|---|
ColorHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
formatRGBasHex(int... rgb)
Returns the HTML hex code for the given RGB color components, in the format #RRGGBB, or null if the array is null
or doesn't contains 3
elements
|
static int[] |
fromHSVtoRGB(int[] hsv) |
static int[] |
fromHSVtoRGB(int h,
int s,
int v)
Converts a color represented by the given HSV values to RGB values.
|
static int[] |
fromRGB(int rgb)
Returns a color from the given number, being the first byte the red value, and the other 2 bytes, green and blue
|
static int[] |
fromRGBtoHSV(int[] rgb) |
static int[] |
fromRGBtoHSV(int r,
int g,
int b)
Converts a color represented by the given RGB values to HSV values.
|
static int[] |
parse(java.lang.String string)
Parses the RGB color from the given string
|
static int[] |
parseRGB(java.lang.String rgbString)
Returns a color from the given RGB string, in form rgb(R,G,B)
|
static int[] |
parseRGBfromHex(java.lang.String hexString)
Returns the RGB components from the given hex string, in form #RRGGBB
|
static int |
toRGB(int[] rgb)
Returns an integer with 6 bytes, being them RRGGBB, or -1 if the given array is null or doesn't have 3 elements
|
public static java.lang.String formatRGBasHex(int... rgb)
public static int[] fromHSVtoRGB(int h,
int s,
int v)
public static int[] fromHSVtoRGB(int[] hsv)
fromHSVtoRGB(int, int, int)public static int[] fromRGB(int rgb)
public static int[] fromRGBtoHSV(int r,
int g,
int b)
public static int[] fromRGBtoHSV(int[] rgb)
fromRGBtoHSV(int, int, int)public static int[] parse(java.lang.String string)
public static int[] parseRGB(java.lang.String rgbString)
public static int[] parseRGBfromHex(java.lang.String hexString)
public static int toRGB(int[] rgb)