public class ColorRange extends Object
Represents a range of colors. Specifies ranges using HSB representation of RGB color.
Constructor and Description |
---|
ColorRange()
Initializes a new instance of the
class. |
ColorRange(Color exactColor)
Initializes a new instance of the
class with a specified exact color. |
Modifier and Type | Method and Description |
---|---|
float |
getMaxBrightness()
Gets the ending brightness value.
|
float |
getMaxHue()
Gets the ending hue value, in degrees.
|
float |
getMaxSaturation()
Gets the ending saturation value.
|
float |
getMinBrightness()
Gets the starting brightness value.
|
float |
getMinHue()
Gets the starting hue value, in degrees.
|
float |
getMinSaturation()
Gets the starting saturation value.
|
boolean |
isEmpty()
Gets a value indicating whether only the empty color is in range.
|
void |
setEmpty(boolean value)
Sets a value indicating whether only the empty color is in range.
|
void |
setMaxBrightness(float value)
Sets the ending brightness value.
|
void |
setMaxHue(float value)
Sets the ending hue value, in degrees.
|
void |
setMaxSaturation(float value)
Sets the ending saturation value.
|
void |
setMinBrightness(float value)
Sets the starting brightness value.
|
void |
setMinHue(float value)
Sets the starting hue value, in degrees.
|
void |
setMinSaturation(float value)
Sets the starting saturation value.
|
public ColorRange()
ColorRange
class.public ColorRange(Color exactColor)
ColorRange
class with a specified exact color.exactColor
- The exact color from which the range is created.public final float getMinHue()
Gets the starting hue value, in degrees.
public final void setMinHue(float value)
Sets the starting hue value, in degrees.
value
- The starting hue value, in degrees.public final float getMaxHue()
Gets the ending hue value, in degrees.
public final void setMaxHue(float value)
Sets the ending hue value, in degrees.
value
- The ending hue value, in degrees.public final float getMinSaturation()
Gets the starting saturation value.
public final void setMinSaturation(float value)
Sets the starting saturation value.
value
- The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.public final float getMaxSaturation()
Gets the ending saturation value.
public final void setMaxSaturation(float value)
Sets the ending saturation value.
value
- The saturation ranges from 0.0 through 1.0, where 0.0 is grayscale and 1.0 is the most saturated.public final float getMinBrightness()
Gets the starting brightness value.
public final void setMinBrightness(float value)
Sets the starting brightness value.
value
- The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.public final float getMaxBrightness()
Gets the ending brightness value.
public final void setMaxBrightness(float value)
Sets the ending brightness value.
value
- The brightness ranges from 0.0 through 1.0, where 0.0 represents black and 1.0 represents white.public final boolean isEmpty()
Gets a value indicating whether only the empty color is in range.
public final void setEmpty(boolean value)
Sets a value indicating whether only the empty color is in range.
value
- True if only the empty color is in range (HSB ranges are ignored); otherwise, false.