Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.colors
Class PublicationColorLibrary

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.visualization.colors.PublicationColorLibrary
All Implemented Interfaces:
ColorLibrary

public class PublicationColorLibrary
extends Object
implements ColorLibrary

Simple color library with a small number of hand-picked colors that provide sufficient difference when printed (and that should work with all printers).

Author:
Erich Schubert

Field Summary
private static String[] colors
          These colors are hand-picked to provide reasonable contrast and readability.
 
Constructor Summary
PublicationColorLibrary()
           
 
Method Summary
 String getColor(int index)
          Return the i'th color.
 int getNumberOfNativeColors()
          Return the number of native colors available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colors

private static String[] colors
These colors are hand-picked to provide reasonable contrast and readability. Therefore we stick to primary colors first, and the first two colors are red and blue to help red-green blind people. Yellow usually offers bad contrast, therefore comes late. Magenta often shows up too similar to red, cyan too similar to blue.

Constructor Detail

PublicationColorLibrary

public PublicationColorLibrary()
Method Detail

getColor

public String getColor(int index)
Description copied from interface: ColorLibrary
Return the i'th color.

Specified by:
getColor in interface ColorLibrary
Parameters:
index - color index
Returns:
color in hexadecimal notation (#aabbcc) or color name ("red") as valid in CSS and SVG.

getNumberOfNativeColors

public int getNumberOfNativeColors()
Description copied from interface: ColorLibrary
Return the number of native colors available. These are guaranteed to be unique.

Specified by:
getNumberOfNativeColors in interface ColorLibrary
Returns:
number of native colors

Release 0.2.1 (2009-07-13_1605)