public abstract class NamedColorSet
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static NamedColorSet |
CSS |
Standard CSS/SVG/HTML/JS list of colours (140 entries).
|
static NamedColorSet |
CSS_DARK |
CSS with all the very light colours (except White) removed.
|
Constructor | Description |
---|---|
NamedColorSet(java.util.Map<java.lang.String,java.awt.Color> map) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
java.awt.Color |
getColor(java.lang.String name) |
Returns the colour for a given name.
|
java.util.Map<java.lang.String,java.awt.Color> |
getMap() |
Returns the colour map on which this named set is based.
|
abstract java.lang.String |
toKey(java.lang.String name) |
Normalises a colour name to turn it into a map key.
|
public static final NamedColorSet CSS
public static final NamedColorSet CSS_DARK
public NamedColorSet(java.util.Map<java.lang.String,java.awt.Color> map)
map
- name->color mappublic java.util.Map<java.lang.String,java.awt.Color> getMap()
public java.awt.Color getColor(java.lang.String name)
toKey(java.lang.String)
method before matching.name
- approximate namepublic abstract java.lang.String toKey(java.lang.String name)
name
- approximate nameCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.