/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/ |
D | TonalTest.java | 105 float[] hsl = new float[] {25, 0, 0}; in colorRange_containsColor() local 106 assertTrue("Range " + colorRange + " doesn't contain " + Arrays.toString(hsl), in colorRange_containsColor() 107 colorRange.containsColor(hsl[0], hsl[1], hsl[2])); in colorRange_containsColor() 114 float[] hsl = new float[] {100, 0, 0}; in colorRange_doesntContainColor() local 115 assertFalse("Range " + colorRange + " shouldn't contain " + Arrays.toString(hsl), in colorRange_doesntContainColor() 116 colorRange.containsColor(hsl[0], hsl[1], hsl[2])); in colorRange_doesntContainColor() 117 hsl = new float[] {0, 0.6f, 0}; in colorRange_doesntContainColor() 118 assertFalse("Range " + colorRange + " shouldn't contain " + Arrays.toString(hsl), in colorRange_doesntContainColor() 119 colorRange.containsColor(hsl[0], hsl[1], hsl[2])); in colorRange_doesntContainColor() 120 hsl = new float[] {0, 0, 0.6f}; in colorRange_doesntContainColor() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/ |
D | NotificationCustomViewWrapper.java | 57 float[] hsl = new float[] {0f, 0f, 0f}; in onContentUpdated() local 58 ColorUtils.colorToHSL(mBackgroundColor, hsl); in onContentUpdated() 59 if (mBackgroundColor != Color.TRANSPARENT && hsl[2] > 0.5) { in onContentUpdated() 60 hsl[2] = 1f - hsl[2]; in onContentUpdated() 61 mBackgroundColor = ColorUtils.HSLToColor(hsl); in onContentUpdated()
|
D | NotificationViewWrapper.java | 127 float[] hsl = new float[] {0f, 0f, 0f}; in needsInversion() local 128 ColorUtils.colorToHSL(background, hsl); in needsInversion() 131 if (hsl[1] != 0) { in needsInversion() 136 boolean isLightGrayOrWhite = hsl[1] == 0 && hsl[2] > 0.5; in needsInversion()
|
/frameworks/base/core/java/com/android/internal/colorextraction/types/ |
D | Tonal.java | 129 final float[] hsl = new float[3]; in runTonalExtraction() local 131 hsl); in runTonalExtraction() local 135 hsl[0] /= 360f; in runTonalExtraction() 138 TonalPalette palette = findTonalPalette(hsl[0], hsl[1]); in runTonalExtraction() 145 int fitIndex = bestFit(palette, hsl[0], hsl[1], hsl[2]); in runTonalExtraction() 152 float[] h = fit(palette.h, hsl[0], fitIndex, in runTonalExtraction() 154 float[] s = fit(palette.s, hsl[1], fitIndex, 0.0f, 1.0f); in runTonalExtraction() 155 float[] l = fit(palette.l, hsl[2], fitIndex, 0.0f, 1.0f); in runTonalExtraction() 268 final float[] hsl = new float[3]; in applyFallback() local 269 ColorUtils.colorToHSL(color, hsl); in applyFallback() [all …]
|
/frameworks/base/core/java/com/android/internal/graphics/palette/ |
D | VariationalKMeansQuantizer.java | 79 final float[] hsl = {0, 0, 0}; in quantize() local 82 ColorUtils.colorToHSL(pixels[i], hsl); in quantize() 84 hslPixels[i][0] = hsl[0] / 360f; in quantize() 85 hslPixels[i][1] = hsl[1]; in quantize() 86 hslPixels[i][2] = hsl[2]; in quantize()
|
D | Palette.java | 392 final float hsl[] = swatch.getHsl(); in shouldBeScoredForTarget() local 393 return hsl[1] >= target.getMinimumSaturation() && hsl[1] <= target.getMaximumSaturation() in shouldBeScoredForTarget() 394 && hsl[2] >= target.getMinimumLightness() && hsl[2] <= target.getMaximumLightness() in shouldBeScoredForTarget() 399 final float[] hsl = swatch.getHsl(); in generateScore() local 409 * (1f - Math.abs(hsl[1] - target.getTargetSaturation())); in generateScore() 413 * (1f - Math.abs(hsl[2] - target.getTargetLightness())); in generateScore() 473 Swatch(float[] hsl, int population) { in Swatch() argument 474 this(ColorUtils.HSLToColor(hsl), population); in Swatch() 475 mHsl = hsl; in Swatch() 969 boolean isAllowed(int rgb, float[] hsl); [all …]
|
D | ColorCutQuantizer.java | 460 private boolean shouldIgnoreColor(int rgb, float[] hsl) { in shouldIgnoreColor() argument 463 if (!mFilters[i].isAllowed(rgb, hsl)) { in shouldIgnoreColor()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | MediaNotificationProcessor.java | 72 private final Palette.Filter mBlackWhiteFilter = (rgb, hsl) -> !isWhiteOrBlack(hsl); 135 paletteBuilder.addFilter((rgb, hsl) -> { in processNotification() argument 137 float diff = Math.abs(hsl[0] - backgroundHue); in processNotification() 313 private static boolean isWhiteOrBlack(float[] hsl) { in isWhiteOrBlack() argument 314 return isBlack(hsl) || isWhite(hsl); in isWhiteOrBlack()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ContrastColorUtil.java | 378 float[] hsl = new float[3]; in findContrastColorAgainstDark() local 379 ColorUtilsFromCompat.colorToHSL(findFg ? fg : bg, hsl); in findContrastColorAgainstDark() 381 float low = hsl[2], high = 1; in findContrastColorAgainstDark() 384 hsl[2] = l; in findContrastColorAgainstDark() 386 fg = ColorUtilsFromCompat.HSLToColor(hsl); in findContrastColorAgainstDark() 388 bg = ColorUtilsFromCompat.HSLToColor(hsl); in findContrastColorAgainstDark() 957 public static int HSLToColor(@NonNull float[] hsl) { in HSLToColor() argument 958 final float h = hsl[0]; in HSLToColor() 959 final float s = hsl[1]; in HSLToColor() 960 final float l = hsl[2]; in HSLToColor()
|
/frameworks/base/core/java/com/android/internal/graphics/ |
D | ColorUtils.java | 281 public static int HSLToColor(@NonNull float[] hsl) { in HSLToColor() argument 282 final float h = hsl[0]; in HSLToColor() 283 final float s = hsl[1]; in HSLToColor() 284 final float l = hsl[2]; in HSLToColor()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | StatusBarIconView.java | 699 float[] hsl = new float[3]; in updateContrastedStaticColor() local 700 ColorUtils.colorToHSL(mDrawableColor, hsl); in updateContrastedStaticColor() 703 if (hsl[1] < 0.2f) { in updateContrastedStaticColor()
|