Target.Builder

public static final class Target.Builder
extends Object

java.lang.Object
   ↳ androidx.palette.graphics.Target.Builder


Builder class for generating custom Target instances.

Summary

Public constructors

Builder()

Create a new Target builder from scratch.

Builder(Target target)

Create a new builder based on an existing Target.

Public methods

Target build()

Builds and returns the resulting Target.

Target.Builder setExclusive(boolean exclusive)

Set whether any color selected for this target is exclusive to this target only.

Target.Builder setLightnessWeight(float weight)

Set the weight of importance that this target will place on lightness values.

Target.Builder setMaximumLightness(float value)

Set the maximum lightness value for this target.

Target.Builder setMaximumSaturation(float value)

Set the maximum saturation value for this target.

Target.Builder setMinimumLightness(float value)

Set the minimum lightness value for this target.

Target.Builder setMinimumSaturation(float value)

Set the minimum saturation value for this target.

Target.Builder setPopulationWeight(float weight)

Set the weight of importance that this target will place on a color's population within the image.

Target.Builder setSaturationWeight(float weight)

Set the weight of importance that this target will place on saturation values.

Target.Builder setTargetLightness(float value)

Set the target/ideal lightness value for this target.

Target.Builder setTargetSaturatio