infovis.visualization.color
Class Colors

java.lang.Object
  extended by infovis.visualization.color.Colors

public class Colors
extends Object

Class Colors

Version:
$Revision: 1.5 $
Author:
Jean-Daniel Fekete

Field Summary
static ColorSpace GRAY
           
static Colors instance
           
static ColorSpace sRGB
           
static float UprimeWhite
           
static float VprimeWhite
           
static float[] XYZwhite
           
 
Constructor Summary
Colors()
           
 
Method Summary
static int comptoRGB(float r, float g, float b)
           
static int comptoRGB(int r, int g, int b)
           
static float getLuminance(Color c)
           
static float[] LabtoLCH(float[] Lab)
           
static float[] LabtoXYZ(float[] Lab)
          Converts from La*b* to XYZ.
static float[] LCHtoLab(float[] lch)
          Convert from LCH to La*b* colorspace.
static float[] LCHtoRGB(float[] comp)
           
static int LCHtoRGB(float l, float c, float h)
           
static float[] RGBtoXYZ(float[] rgb)
           
static float[] XYZtoLab(float[] xyz)
          Converts from XYZ to La*b*.
static float[] XYZtoRGB(float[] xyz)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sRGB

public static ColorSpace sRGB

GRAY

public static ColorSpace GRAY

UprimeWhite

public static float UprimeWhite

VprimeWhite

public static float VprimeWhite

instance

public static Colors instance

XYZwhite

public static float[] XYZwhite
Constructor Detail

Colors

public Colors()
Method Detail

RGBtoXYZ

public static float[] RGBtoXYZ(float[] rgb)

XYZtoRGB

public static float[] XYZtoRGB(float[] xyz)

getLuminance

public static float getLuminance(Color c)

LabtoXYZ

public static float[] LabtoXYZ(float[] Lab)
Converts from La*b* to XYZ.

Parameters:
Lab - the La*b* values.
Returns:
the XYZ values. Reuses the array.

XYZtoLab

public static float[] XYZtoLab(float[] xyz)
Converts from XYZ to La*b*.

Parameters:
xyz - the XYZ parameters
Returns:
the La*b* parameters in the passed array.

LCHtoLab

public static float[] LCHtoLab(float[] lch)
Convert from LCH to La*b* colorspace.

Parameters:
lch -
Returns:
the La*b* values from the LCH colorspace.

LabtoLCH

public static float[] LabtoLCH(float[] Lab)

LCHtoRGB

public static float[] LCHtoRGB(float[] comp)

LCHtoRGB

public static int LCHtoRGB(float l,
                           float c,
                           float h)

comptoRGB

public static int comptoRGB(float r,
                            float g,
                            float b)

comptoRGB

public static int comptoRGB(int r,
                            int g,
                            int b)


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.