Searched defs:swatch (Results 1 - 3 of 3) sorted by relevance

/frameworks/support/v7/palette/src/androidTest/java/android/support/v7/graphics/
H A DSwatchTests.java49 for (Palette.Swatch swatch : p.getSwatches()) {
50 testSwatchTextColorContrasts(swatch);
57 for (Palette.Swatch swatch : p.getSwatches()) {
58 assertNotNull(swatch.getHsl());
65 for (Palette.Swatch swatch : p.getSwatches()) {
66 assertEquals(HSLToColor(swatch.getHsl()), swatch.getRgb());
70 private void testSwatchTextColorContrasts(Palette.Swatch swatch) { argument
71 final int bodyTextColor = swatch.getBodyTextColor();
72 assertTrue(calculateContrast(bodyTextColor, swatch
[all...]
/frameworks/opt/colorpicker/src/com/android/colorpicker/
H A DColorPickerPalette.java130 * Appends a swatch to the end of the row for even-numbered rows (starting with row 0),
133 private static void addSwatchToRow(TableRow row, View swatch, int rowNumber) { argument
135 row.addView(swatch);
137 row.addView(swatch, 0);
142 * Add a content description to the specified swatch view. Because the colors get added in a
148 View swatch, String[] contentDescriptions) {
169 swatch.setContentDescription(description);
184 * Creates a color swatch.
147 setSwatchDescription(int rowNumber, int index, int rowElements, boolean selected, View swatch, String[] contentDescriptions) argument
/frameworks/support/v7/palette/src/main/java/android/support/v7/graphics/
H A DDefaultGenerator.java149 for (Swatch swatch : mSwatches) {
150 population = Math.max(population, swatch.getPopulation());
160 for (Swatch swatch : mSwatches) {
161 final float sat = swatch.getHsl()[1];
162 final float luma = swatch.getHsl()[2];
166 !isAlreadySelected(swatch)) {
168 swatch.getPopulation(), mHighestPopulation);
170 max = swatch;
180 * @return true if we have already selected {@code swatch}
182 private boolean isAlreadySelected(Swatch swatch) { argument
[all...]

Completed in 242 milliseconds