public class GralColorConv
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) static float |
bfbl |
(package private) static float |
bfgn |
(package private) static float |
bfrd |
(package private) static float |
cfbl |
(package private) static float |
cfgn |
(package private) static float |
cfrd |
(package private) static float[] |
cfrgb
Factors for rd, ye, gn, cy, bl, ma
|
(package private) static float[][] |
clight
Sensivity of light in respect to the color.
|
(package private) static float[][] |
clightSat |
(package private) static float[][] |
clightVal
Light value in depending of hex
|
(package private) static float[][] |
grayTable |
(package private) static float[][] |
hiTable |
(package private) static float[][] |
loTable |
Constructor and Description |
---|
GralColorConv() |
Modifier and Type | Method and Description |
---|---|
static int |
HLStoRGB(float hue,
float light,
float sat) |
static int |
HLStoRGB3(float hue,
float light,
float sat)
Converts a color given by hue, light and sat to rgb.
|
static void |
HSBtoHLS(float hue,
float sat,
float brightness,
float[] hls) |
static java.lang.String |
htmlhlb(float h,
int l,
int s) |
static java.lang.String |
htmlhls(float h,
int l,
int s) |
static float |
ligthFromRGB(int rgb) |
static void |
RGBtoHLS(int rgb,
float[] hls) |
(package private) static float |
RGBtoHue(int rgb) |
(package private) static float |
RGBtoligth(float rd,
float gn,
float bl,
float sat) |
static float |
satFromRGB(int rgb) |
(package private) static void |
XXXRGBtoHSL(int rgb,
float[] hsl) |
static float[][] clight
static float[][] clightSat
static float[][] clightVal
static float[][] loTable
static float[][] grayTable
static float[][] hiTable
static float bfrd
static float bfgn
static float bfbl
static float cfrd
static float cfgn
static float cfbl
static float[] cfrgb
public static int HLStoRGB(float hue, float light, float sat)
public static int HLStoRGB3(float hue, float light, float sat)
hue
- The color in range 0..24.0. 0 is magenta, 4: red, 8 yellow, 12 green 16 cyan, 20 blue, 24 magenta.light
- The light, 0 to 2.0. 1.0 is the saturated red 0xff0000 or a darker yellow. 1.4 is yellow 0xffff00.
till 2.0 it uses the base values for color in white direction. 2.0 it is white.sat
- Saturation 0..1. part of gray. 1.0 is non-gray. 0 is full gray.public static void HSBtoHLS(float hue, float sat, float brightness, float[] hls)
public static void RGBtoHLS(int rgb, float[] hls)
static void XXXRGBtoHSL(int rgb, float[] hsl)
public static float satFromRGB(int rgb)
public static float ligthFromRGB(int rgb)
static float RGBtoHue(int rgb)
static float RGBtoligth(float rd, float gn, float bl, float sat)
public static java.lang.String htmlhls(float h, int l, int s)
public static java.lang.String htmlhlb(float h, int l, int s)