Package org.opentrafficsim.draw
Class Colors
java.lang.Object
org.opentrafficsim.draw.Colors
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 Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
COLORS
List of colors. -
NAMES
Names of the colors.
-
-
Constructor Details
-
Colors
public Colors()
-
-
Method Details
-
get
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
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.
-