Lines Matching defs:Swatch

103      * Generate a {@link Palette} from the pre-generated list of {@link Palette.Swatch} swatches.
107 public static Palette from(List<Swatch> swatches) {
145 private final List<Swatch> mSwatches;
148 private final Map<Target, Swatch> mSelectedSwatches;
151 private final Swatch mDominantSwatch;
153 Palette(List<Swatch> swatches, List<Target> targets) {
167 public List<Swatch> getSwatches() {
185 public Swatch getVibrantSwatch() {
195 public Swatch getLightVibrantSwatch() {
205 public Swatch getDarkVibrantSwatch() {
215 public Swatch getMutedSwatch() {
225 public Swatch getLightMutedSwatch() {
235 public Swatch getDarkMutedSwatch() {
310 public Swatch getSwatchForTarget(@NonNull final Target target) {
321 Swatch swatch = getSwatchForTarget(target);
332 public Swatch getDominantSwatch() {
359 private Swatch generateScoredTarget(final Target target) {
360 final Swatch maxScoreSwatch = getMaxScoredSwatchForTarget(target);
368 private Swatch getMaxScoredSwatchForTarget(final Target target) {
370 Swatch maxScoreSwatch = null;
372 final Swatch swatch = mSwatches.get(i);
384 private boolean shouldBeScoredForTarget(final Swatch swatch, final Target target) {
393 private float generateScore(Swatch swatch, Target target) {
418 private Swatch findDominantSwatch() {
420 Swatch maxSwatch = null;
422 Swatch swatch = mSwatches.get(i);
431 private static float[] copyHslValues(Swatch color) {
441 public static final class Swatch {
452 public Swatch(@ColorInt int color, int population) {
460 Swatch(int red, int green, int blue, int population) {
468 Swatch(float[] hsl, int population) {
504 * {@link Swatch}'s color. This color is guaranteed to have sufficient contrast.
514 * {@link Swatch}'s color. This color is guaranteed to have sufficient contrast.
584 Swatch swatch = (Swatch) o;
598 private final List<Swatch> mSwatches;
631 * Construct a new {@link Builder} using a list of {@link Swatch} instances.
634 public Builder(List<Swatch> swatches) {
788 List<Swatch> swatches;