Class ColorUtils
java.lang.Object
org.biojava.nbio.structure.gui.util.color.ColorUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Color
Make a color darker.static Color
getIntermediate
(Color start, Color end, int stepSize, int position) static Color
Make a color lighter.static void
static Color
Rotate a color through HSB spacestatic String
toHexColor
(Color col)
-
Field Details
-
orange
-
cyan
-
gold
-
colorWheel
-
-
Constructor Details
-
ColorUtils
public ColorUtils()
-
-
Method Details
-
main
-
toHexColor
-
rotateHue
Rotate a color through HSB space- Parameters:
color
- Starting colorfraction
- Amount to add to the hue. The integer part is discarded to leave a number in [0,1)- Returns:
-
getIntermediate
-
darker
Make a color darker. (RGB color scheme)- Parameters:
color
- Color to make darker.fraction
- Darkness fraction.- Returns:
- Darker color.
-
lighter
Make a color lighter. (RGB color scheme)- Parameters:
color
- Color to make lighter.fraction
- Darkness fraction.- Returns:
- Lighter color.
-