public class

HSBColor

extends Object
implements Color
java.lang.Object
   ↳ casmi.graphics.color.HSBColor

Class Overview

HSB color class.

Summary

Fields
protected double alpha
protected double brightness
protected double hue
protected double saturation
Public Constructors
HSBColor(double hue, double saturation, double brightness)
Creates a new Color object using HSB values.
HSBColor(double hue, double saturation, double brightness, double alpha)
Creates a new Color object using HSB and alpha values.
HSBColor(ColorSet colorSet)
Creates a new Color object from ColorSet.
HSBColor(ColorSet colorSet, double alpha)
Creates a new Color object from ColorSet and an alpha value.
Public Methods
HSBColor clone()
static Color color(ColorSet colorSet)
double getAlpha()
double getBlue()
double getBrightness()
HSBColor getComplementaryColor()
Returns a Color object that shows a complementary color.
double getGreen()
double getHue()
double getRed()
double getSaturation()
static Color lerpColor(HSBColor color1, HSBColor color2, double amt)
Calculates a color or colors between two color at a specific increment.
static Color lerpColor(ColorSet colorSet1, ColorSet colorSet2, double amt)
Calculates a color or colors between two color at a specific increment.
void setAlpha(double alpha)
void setBlue(double blue)
void setBrightness(double brightness)
void setGreen(double green)
void setHue(double hue)
void setRed(double red)
void setSaturation(double saturation)
void setup(GL2 gl)
[Expand]
Inherited Methods
From class java.lang.Object
From interface casmi.graphics.color.Color

Fields

protected double alpha

protected double brightness

protected double hue

protected double saturation

Public Constructors

public HSBColor (double hue, double saturation, double brightness)

Creates a new Color object using HSB values.

Parameters
hue The H value. 0.0 - 1.0.
saturation The S value. 0.0 - 1.0.
brightness The B value. 0.0 - 1.0.

public HSBColor (double hue, double saturation, double brightness, double alpha)

Creates a new Color object using HSB and alpha values.

Parameters
hue The H value. 0.0 - 1.0.
saturation The S value. 0.0 - 1.0.
brightness The B value. 0.0 - 1.0.
alpha The Alpha value. 0.0 - 1.0.

public HSBColor (ColorSet colorSet)

Creates a new Color object from ColorSet.

Parameters
colorSet ColorSet.
See Also

public HSBColor (ColorSet colorSet, double alpha)

Creates a new Color object from ColorSet and an alpha value.

Parameters
colorSet ColorSet.
alpha alpha value. 0.0 - 1.0.
See Also

Public Methods

public HSBColor clone ()

public static Color color (ColorSet colorSet)

public double getAlpha ()

public double getBlue ()

public double getBrightness ()

public HSBColor getComplementaryColor ()

Returns a Color object that shows a complementary color.

Returns
  • a complementary Color object.

public double getGreen ()

public double getHue ()

public double getRed ()

public double getSaturation ()

public static Color lerpColor (HSBColor color1, HSBColor color2, double amt)

Calculates a color or colors between two color at a specific increment.

Parameters
color1 interpolate from this color
color2 interpolate to this color
amt between 0.0 and 1.0
Returns
  • The calculated color values.

public static Color lerpColor (ColorSet colorSet1, ColorSet colorSet2, double amt)

Calculates a color or colors between two color at a specific increment.

Parameters
colorSet1 interpolate from this color
colorSet2 interpolate to this color
amt between 0.0 and 1.0
Returns
  • The calculated color values.

public void setAlpha (double alpha)

public void setBlue (double blue)

public void setBrightness (double brightness)

public void setGreen (double green)

public void setHue (double hue)

public void setRed (double red)

public void setSaturation (double saturation)

public void setup (GL2 gl)