de.lmu.ifi.dbs.elki.visualization.colors
Class PublicationColorLibrary
java.lang.Object
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
PublicationColorLibrary
public PublicationColorLibrary()
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