com.meltingice.caman
Class ColorUtil

java.lang.Object
  extended by com.meltingice.caman.ColorUtil

public class ColorUtil
extends java.lang.Object

Utility class for color conversion

Version:
1.0
Author:
Ryan LeFevre

Constructor Summary
ColorUtil()
           
 
Method Summary
static int[] hsvToRgb(double[] hsv)
          Converts a HSV array back to an RGB array.
static double[] rgbToHsv(int[] rgb)
          Converts an RGB array to an HSV array
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorUtil

public ColorUtil()
Method Detail

rgbToHsv

public static double[] rgbToHsv(int[] rgb)
Converts an RGB array to an HSV array

Parameters:
rgb - The RGB values to convert
Returns:
An array of double values representing the equivalent HSV value

hsvToRgb

public static int[] hsvToRgb(double[] hsv)
Converts a HSV array back to an RGB array.

Parameters:
hsv - The HSV color array
Returns:
The RGB color array