Package edu.wisc.game.rest

## Class ColorMap

- java.lang.Object
- - java.util.AbstractMap<K,​V>
  - - java.util.HashMap<String,​Object>
    - - edu.wisc.game.rest.ColorMap

- All Implemented Interfaces:
    `Serializable`, `Cloneable`, `Map<String,​Object>`

      public class ColorMap
      extends HashMap<String,​Object>

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K extends Object,​V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,​V extends Object>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K extends Object,​V extends Object>`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ColorMap()` | Reads in the color map file.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `String` | `getHex​(Piece.Color color, boolean brighten)` |
    `String` | `getHex​(String name, boolean brighten)` |
    `boolean` | `hasColor​(Piece.Color color)` |

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### ColorMap

          public ColorMap()

      Reads in the color map file. // FIXME: Maybe it's not such a great idea that the server has just one // color map file, shared by all experiments.

  - ### Method Detail

    - #### getHex

          public String getHex​(Piece.Color color,
                               boolean brighten)

    - #### getHex

          public String getHex​(String name,
                               boolean brighten)

      Parameters:
        `name` - "RED"
        `brighten` - If true, replace with a lighter color, so that it can be more suitable for use as a background.
      Returns:
        "FF00000"

    - #### hasColor

          public boolean hasColor​(Piece.Color color)