public final class Target extends Object
Palette
's generation. Instances
can be created via the Target.Builder
class.
To use the target, use the Palette.Builder.addTarget(Target)
API when building a
Palette.
Modifier and Type | Class and Description |
---|---|
static class |
Target.Builder
Builder class for generating custom
Target instances. |
Modifier and Type | Field and Description |
---|---|
static Target |
DARK_MUTED
A target which has the characteristics of a muted color which is dark in luminance.
|
static Target |
DARK_VIBRANT
A target which has the characteristics of a vibrant color which is dark in luminance.
|
static Target |
LIGHT_MUTED
A target which has the characteristics of a muted color which is light in luminance.
|
static Target |
LIGHT_VIBRANT
A target which has the characteristics of a vibrant color which is light in luminance.
|
static Target |
MUTED
A target which has the characteristics of a muted color which is neither light or dark.
|
static Target |
VIBRANT
A target which has the characteristics of a vibrant color which is neither light or dark.
|
Modifier and Type | Method and Description |
---|---|
float |
getLightnessWeight()
Returns the weight of importance that this target places on a color's lightness within
the image.
|
float |
getMaximumLightness()
The maximum lightness value for this target.
|
float |
getMaximumSaturation()
The maximum saturation value for this target.
|
float |
getMinimumLightness()
The minimum lightness value for this target.
|
float |
getMinimumSaturation()
The minimum saturation value for this target.
|
float |
getPopulationWeight()
Returns the weight of importance that this target places on a color's population within
the image.
|
float |
getSaturationWeight()
Returns the weight of importance that this target places on a color's saturation within
the image.
|
float |
getTargetLightness()
The target lightness value for this target.
|
float |
getTargetSaturation()
The target saturation value for this target.
|
boolean |
isExclusive()
Returns whether any color selected for this target is exclusive for this target only.
|
public static final Target LIGHT_VIBRANT
public static final Target VIBRANT
public static final Target DARK_VIBRANT
public static final Target LIGHT_MUTED
public static final Target MUTED
public static final Target DARK_MUTED
public float getMinimumSaturation()
public float getTargetSaturation()
public float getMaximumSaturation()
public float getMinimumLightness()
public float getTargetLightness()
public float getMaximumLightness()
public float getSaturationWeight()
The larger the weight, relative to the other weights, the more important that a color being close to the target value has on selection.
getTargetSaturation()
public float getLightnessWeight()
The larger the weight, relative to the other weights, the more important that a color being close to the target value has on selection.
getTargetLightness()
public float getPopulationWeight()
The larger the weight, relative to the other weights, the more important that a color's population being close to the most populous has on selection.
public boolean isExclusive()
If false, then the color can be selected for other targets.