The Physiologist's Friend Simulation API

ch.unizh.ini.friend.graphics
Class LMSColor

java.lang.Object
  extended by ch.unizh.ini.friend.graphics.LMSColor

public class LMSColor
extends Object

Represents a color in the LMS color space. The Color class itself supports color spaces, however, this class does not use this feature. It's merely a convenience class to keep things simple.

Version:
$Revision: 1.2 $
Author:
Johann Gyger

Constructor Summary
LMSColor(Color color)
          Creates a new color instance in the LMS color space.
 
Method Summary
 Color getColor()
          Returns the color in the sRGB color space.
 float getL()
          Returns the long-wavelength (red) component.
 float getM()
          Returns the middle-wavelength (green) component.
 float getS()
          Returns the short-wavelength (blue) component.
 String toString()
          Returns a string representation of this LMSColor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LMSColor

public LMSColor(Color color)
Creates a new color instance in the LMS color space.

Parameters:
color - the color in the sRGB color space
Method Detail

getL

public float getL()
Returns the long-wavelength (red) component.

Returns:
float the L color component

getM

public float getM()
Returns the middle-wavelength (green) component.

Returns:
float the M color component

getS

public float getS()
Returns the short-wavelength (blue) component.

Returns:
float the S color component

getColor

public Color getColor()
Returns the color in the sRGB color space.

Returns:
Color the color in the sRGB space

toString

public String toString()
Returns a string representation of this LMSColor. This method is intended to be used only for debugging purposes. The content and format of the returned string might vary between implementations. The returned string might be empty but cannot be null.

Overrides:
toString in class Object
Returns:
a string representation of this LMSColor.

http://www.ini.unizh.ch/~tobi/friend