Package org.opensourcephysics.display
Class DisplayColors
java.lang.Object
org.opensourcephysics.display.DisplayColors
Defines color palette used by OSP components.
- Version:
- 1.0
- Author:
- Wolfgang Christian
-
Method Summary
Modifier and TypeMethodDescriptionstatic Color
getLineColor
(int index) Gets a line color that matches the index.static Color
getMarkerColor
(int index) Gets a marker color that matches the index.static Color[]
Gets an array of colors.static Color
phaseToColor
(double phi) Converts a phase angle in the range [-Pi,Pi] to a color.static Color
Gets a random color.
-
Method Details
-
getPhaseToColorArray
Gets an array of colors.- Returns:
- the color array
-
phaseToColor
Converts a phase angle in the range [-Pi,Pi] to a color.- Parameters:
phi
- phase angle- Returns:
- the color
-
randomColor
Gets a random color.- Returns:
- random color
-
getLineColor
Gets a line color that matches the index.- Parameters:
index
- int- Returns:
- Color
-
getMarkerColor
Gets a marker color that matches the index.- Parameters:
index
- int- Returns:
- Color
-