jass.utils
Class ColorUtils

java.lang.Object
  extended by jass.utils.ColorUtils

public class ColorUtils
extends java.lang.Object

Color utils

Author:
Kees van den Doel (kvdoel@cs.ubc.ca)

Constructor Summary
ColorUtils()
           
 
Method Summary
static double[] Lab2lch(double[] lab)
          Convert L*a*b* to LCH (normalized luminance, chromaticity, hue;) Assume -100
static void main(java.lang.String[] args)
           
static double[] Rgb2lab(double[] rgb)
          Convert rgb to L*a*b*
static double[] Rgb2lch(double[] rgb)
          Convert RGB to LCH (normalized luminance, chromaticity, hue)
static float[] Rgb2lch(float[] rgb_f)
          Convert RGB to LCH (normalized luminance, chromaticity, hue)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorUtils

public ColorUtils()
Method Detail

main

public static void main(java.lang.String[] args)

Rgb2lab

public static double[] Rgb2lab(double[] rgb)
Convert rgb to L*a*b*

Parameters:
rgb - double[3] of rgb values 0-1
Returns:
double[3] of L*a*b*

Lab2lch

public static double[] Lab2lch(double[] lab)
Convert L*a*b* to LCH (normalized luminance, chromaticity, hue;) Assume -100
Parameters:
lab - double[3] of L*a*b*
Returns:
double[3] of LCH

Rgb2lch

public static double[] Rgb2lch(double[] rgb)
Convert RGB to LCH (normalized luminance, chromaticity, hue)

Parameters:
rgb - double[3] of rgb
Returns:
double[3] of LCH

Rgb2lch

public static float[] Rgb2lch(float[] rgb_f)
Convert RGB to LCH (normalized luminance, chromaticity, hue)

Parameters:
rgb_f - float[3] of rgb
Returns:
float[3] of LCH