public class ColorUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Color[] |
colorWheel |
static Color |
cyan |
static Color |
gold |
static Color |
orange |
Constructor and Description |
---|
ColorUtils() |
Modifier and Type | Method and Description |
---|---|
static Color |
darker(Color color,
double fraction)
Make a color darker.
|
static Color |
getIntermediate(Color start,
Color end,
int stepSize,
int position) |
static Color |
lighter(Color color,
double fraction)
Make a color lighter.
|
static void |
main(String[] args) |
static Color |
rotateHue(Color color,
float fraction)
Rotate a color through HSB space
|
static String |
toHexColor(Color col) |
public static Color orange
public static Color cyan
public static Color gold
public static final Color[] colorWheel
public static void main(String[] args)
public static Color rotateHue(Color color, float fraction)
color
- Starting colorfraction
- Amount to add to the hue. The integer part is discarded to leave a number in [0,1)public static Color getIntermediate(Color start, Color end, int stepSize, int position)
public static Color darker(Color color, double fraction)
color
- Color to make darker.fraction
- Darkness fraction.Copyright © 2000–2016 BioJava. All rights reserved.