Package arc.graphics

Class Colors

java.lang.Object
arc.graphics.Colors

public final class Colors extends Object
A general purpose class containing named colors that can be changed at will. For example, the markup language defined by the BitmapFontCache class uses this class to retrieve colors. Custom colors can be defined here.
  • Method Details

    • getColors

      public static OrderedMap<String,Color> getColors()
      Returns the color map.
    • get

      public static Color get(String name)
      Convenience method to lookup a color by name. The invocation of this method is equivalent to the expression Colors.getColors().get(name)
      Parameters:
      name - the name of the color
      Returns:
      the color to which the specified name is mapped, or null if there was no mapping for name .
    • put

      public static Color put(String name, Color color)
      Convenience method to add a color with its name. The invocation of this method is equivalent to the expression Colors.getColors().put(name, color)
      Parameters:
      name - the name of the color
      color - the color
      Returns:
      the previous color associated with name, or null if there was no mapping for name .
    • reset

      public static void reset()
      Resets the color map to the predefined colors.