public class GralColorConv extends java.lang.Object
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) |
static float |
satFromRGB(int rgb) |
public GralColorConv()
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 java.lang.String htmlhlb(float h, int l, int s)
public static java.lang.String htmlhls(float h, int l, int s)
public static float ligthFromRGB(int rgb)
public static void RGBtoHLS(int rgb, float[] hls)
public static float satFromRGB(int rgb)