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 ColorgetLineColor(int index) Gets a line color that matches the index.static ColorgetMarkerColor(int index) Gets a marker color that matches the index.static Color[]Gets an array of colors.static ColorphaseToColor(double phi) Converts a phase angle in the range [-Pi,Pi] to a color.static ColorGets 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
-