|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.util.ColorUtils
public class ColorUtils
An set of utility functions that convert from one color space to another.
The RGB<->HSV color space conversions have been taken from Foley & van Dam Computer Graphics Principles and Practice, 2nd Edition, Addison Wesley, 1990.
The RGB <-> YUV colorspace conversion is based on the formulas found at http://astronomy.swin.edu.au/~pbourke/colour/convert/
Internationalisation Resource Names
| Constructor Summary | |
|---|---|
ColorUtils()
|
|
| Method Summary | |
|---|---|
static void |
convertHSVtoRGB(float[] hsv,
float[] rgb)
Change an HSV color to RGB color. |
static void |
convertHSVtoRGB(float h,
float s,
float v,
float[] rgb)
Change an HSV color to RGB color. |
static void |
convertRGBtoHSV(float[] rgb,
float[] hsv)
Change an RGB color to HSV color. |
static void |
convertRGBtoHSV(float r,
float g,
float b,
float[] hsv)
Change an RGB color to HSV color. |
static void |
convertRGBtoYIQ(float[] rgb,
float[] yiq)
Change an RGB color to YIQ (JPEG) color. |
static void |
convertRGBtoYUV(float[] rgb,
float[] yuv)
Change an RGB color to YUV (YCrCb) color. |
static void |
convertYIQtoRGB(float[] yiq,
float[] rgb)
Change an YIQ (JPEG) color to RGB color. |
static void |
convertYUVtoRGB(float[] yuv,
float[] rgb)
Change an YUV (YCrCb) color to RGB color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorUtils()
| Method Detail |
|---|
public static void convertRGBtoHSV(float[] rgb,
float[] hsv)
rgb - The array of RGB components to converthsv - An array to return the colour values with
public static void convertRGBtoHSV(float r,
float g,
float b,
float[] hsv)
r - The r component of the colorg - The g component of the colorb - The b component of the colorhsv - An array to return the HSV colour values in
public static void convertHSVtoRGB(float[] hsv,
float[] rgb)
hsv - The HSV component of the color as an arrayrgb - An array to return the RGB colour values in
public static void convertHSVtoRGB(float h,
float s,
float v,
float[] rgb)
h - The h component of the colors - The s component of the colorv - The v component of the colorrgb - An array to return the RGB colour values in
public static void convertRGBtoYUV(float[] rgb,
float[] yuv)
rgb - The array of RGB components to convertyuv - An array to return the colour values with
public static void convertYUVtoRGB(float[] yuv,
float[] rgb)
yuv - The array of YUV components to convertrgb - An array to return the colour values with
public static void convertRGBtoYIQ(float[] rgb,
float[] yiq)
rgb - The array of RGB components to convertyiq - An array to return the colour values with
public static void convertYIQtoRGB(float[] yiq,
float[] rgb)
yiq - The array of YIQ components to convertrgb - An array to return the colour values with
|
j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||