Class Colors

java.lang.Object
org.opentrafficsim.draw.Colors

public final class Colors extends Object
List of colors to use for various legends.

Copyright (c) 2023-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Peter Knoppers, Wouter Schakel
  • Field Details

    • COLORS

      public static Color[] COLORS
      List of colors.
    • NAMES

      public static String[] NAMES
      Names of the colors.
  • Constructor Details

    • Colors

      public Colors()
  • Method Details

    • get

      public static Color get(int index)
      Returns a color for the index. Modulo is applied for indices outside of the normal range.
      Parameters:
      index - int; index.
      Returns:
      Color; color for index.
    • name

      public static String name(int index)
      Returns the name of a color for the index. Modulo is applied for indices outside of the normal range.
      Parameters:
      index - int; index.
      Returns:
      String; name of color for index.