Package moa.gui.colorGenerator
Class HSVColorGenerator
- java.lang.Object
-
- moa.gui.colorGenerator.HSVColorGenerator
-
- All Implemented Interfaces:
ColorGenerator
public class HSVColorGenerator extends Object implements ColorGenerator
This class generates colors in the HSV space. The space where the colors are sampled from can be configured by specifying the range of hue, saturation and brightness.- Version:
- $Revision: 1 $
- Author:
- Tuan Pham Minh (tuan.pham@ovgu.de)
-
-
Constructor Summary
Constructors Constructor Description HSVColorGenerator()
constructor which sets the range to: hue - [0.0, 1.0) saturation - [1.0, 1.0] brightness - [1.0, 1.0]HSVColorGenerator(float saturationMin, float saturationMax, float brightnessMin, float brightnessMax)
constructor which sets the range of the hue to [0,1) and sets the ranges for saturation and brightness to the parameterHSVColorGenerator(float hueMin, float hueMax, float saturationMin, float saturationMax, float brightnessMin, float brightnessMax)
constructor which sets the ranges for saturation and brightness to the parameter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color[]
generateColors(int numColors)
Generate numColors unique colors which should be easily distinguishable.
-
-
-
Constructor Detail
-
HSVColorGenerator
public HSVColorGenerator()
constructor which sets the range to: hue - [0.0, 1.0) saturation - [1.0, 1.0] brightness - [1.0, 1.0]
-
HSVColorGenerator
public HSVColorGenerator(float saturationMin, float saturationMax, float brightnessMin, float brightnessMax)
constructor which sets the range of the hue to [0,1) and sets the ranges for saturation and brightness to the parameter
-
HSVColorGenerator
public HSVColorGenerator(float hueMin, float hueMax, float saturationMin, float saturationMax, float brightnessMin, float brightnessMax)
constructor which sets the ranges for saturation and brightness to the parameter
-
-
Method Detail
-
generateColors
public Color[] generateColors(int numColors)
Generate numColors unique colors which should be easily distinguishable.- Specified by:
generateColors
in interfaceColorGenerator
- Parameters:
numColors
- the number of colors to generate- Returns:
- an array of unique colors
-
-