Lines Matching refs:colors

33  * colors rather than representation colors.
37 * requested number of colors. An average color is then generated from each cube.
41 * This means that the color space is divided into distinct colors, rather than representative
42 * colors.
68 * @param maxColors The maximum number of colors that should be in the result palette.
88 // Now let's count the number of distinct colors
102 mTimingLogger.addSplit("Filtered colors and distinct colors counted");
105 // Now lets go through create an array consisting of only distinct colors
106 final int[] colors = mColors = new int[distinctColorCount];
110 colors[distinctColorIndex++] = color;
115 mTimingLogger.addSplit("Distinct colors copied into array");
119 // The image has fewer colors than the maximum requested, so just return the colors
121 for (int color : colors) {
126 mTimingLogger.addSplit("Too few colors present. Copied to Swatches");
130 // We need use quantization to reduce the number of colors
134 mTimingLogger.addSplit("Quantized colors computed");
141 * @return the list of quantized colors
152 // To start, offer a box which contains all of the colors
159 // Finally, return the average colors of the color boxes
196 ArrayList<Swatch> colors = new ArrayList<>(vboxes.size());
200 // As we're averaging a color box, we can still get colors which we do not want, so
202 colors.add(swatch);
205 return colors;
215 // Population of colors within this box
242 * Recomputes the boundaries of this box to tightly fit the colors within the box.
245 final int[] colors = mColors;
256 final int color = colors[i];
334 * sub-array based on that dimension value in each color. The colors are then iterated over
337 * @return the index of the colors array to split from
341 final int[] colors = mColors;
344 // We need to sort the colors in this box based on the longest color dimension.
347 modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex);
350 Arrays.sort(colors, mLowerIndex, mUpperIndex + 1);
352 // Now revert all of the colors so that they are packed as RGB again
353 modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex);
357 count += hist[colors[i]];
370 final int[] colors = mColors;
378 final int color = colors[i];