org.jvnet.substance.color
Class ColorBlindColorScheme

java.lang.Object
  extended by org.jvnet.substance.color.BaseColorScheme
      extended by org.jvnet.substance.color.ColorBlindColorScheme
All Implemented Interfaces:
ColorScheme
Direct Known Subclasses:
DeuteranopiaColorScheme, ProtanopiaColorScheme, TritanopiaColorScheme

public class ColorBlindColorScheme
extends BaseColorScheme

Base class for color schemes simulating color-blind users.

Author:
Kirill Grouchnikov

Nested Class Summary
static class ColorBlindColorScheme.BlindnessKind
          Blindness kind.
 
Field Summary
 double[][] _lmsToRgb
          Matrix for converting LMS to RGB.
 double[][] _rgbToLms
          Matrix for converting RGB to LMS.
 
Fields inherited from class org.jvnet.substance.color.BaseColorScheme
id
 
Constructor Summary
ColorBlindColorScheme(ColorScheme origScheme, ColorBlindColorScheme.BlindnessKind kind)
          Creates a new color scheme that simulates color-blindness.
 
Method Summary
 java.awt.Color getDarkColor()
          Retrieves the dark color.
 java.awt.Color getExtraLightColor()
          Retrieves the extra color.
 java.awt.Color getForegroundColor()
          Retrieves the foreground color.
 java.awt.Color getLightColor()
          Retrieves the light color.
 java.awt.Color getMidColor()
          Retrieves the medium color.
 ColorScheme getOrigScheme()
          Returns the original color scheme.
 java.awt.Color getUltraDarkColor()
          Retrieves the ultra-dark color.
 java.awt.Color getUltraLightColor()
          Retrieves the ultra-light color.
 
Methods inherited from class org.jvnet.substance.color.BaseColorScheme
getId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_rgbToLms

public double[][] _rgbToLms
Matrix for converting RGB to LMS.


_lmsToRgb

public double[][] _lmsToRgb
Matrix for converting LMS to RGB.

Constructor Detail

ColorBlindColorScheme

public ColorBlindColorScheme(ColorScheme origScheme,
                             ColorBlindColorScheme.BlindnessKind kind)
Creates a new color scheme that simulates color-blindness.

Parameters:
origScheme - Original color scheme.
kind - Color-blindness kind.
Method Detail

getForegroundColor

public java.awt.Color getForegroundColor()
Description copied from interface: ColorScheme
Retrieves the foreground color. This method is part of officially supported API.

Returns:
Foreground color.

getUltraLightColor

public java.awt.Color getUltraLightColor()
Description copied from interface: ColorScheme
Retrieves the ultra-light color. This method is part of officially supported API.

Returns:
Ultra-light color.

getExtraLightColor

public java.awt.Color getExtraLightColor()
Description copied from interface: ColorScheme
Retrieves the extra color. This method is part of officially supported API.

Returns:
Extra color.

getLightColor

public java.awt.Color getLightColor()
Description copied from interface: ColorScheme
Retrieves the light color. This method is part of officially supported API.

Returns:
Light color.

getMidColor

public java.awt.Color getMidColor()
Description copied from interface: ColorScheme
Retrieves the medium color. This method is part of officially supported API.

Returns:
Medium color.

getDarkColor

public java.awt.Color getDarkColor()
Description copied from interface: ColorScheme
Retrieves the dark color. This method is part of officially supported API.

Returns:
Dark color.

getUltraDarkColor

public java.awt.Color getUltraDarkColor()
Description copied from interface: ColorScheme
Retrieves the ultra-dark color. This method is part of officially supported API.

Returns:
Ultra-dark color.

getOrigScheme

public ColorScheme getOrigScheme()
Returns the original color scheme.

Returns:
The original color scheme.