Home
last modified time | relevance | path

Searched refs:hsl (Results 1 – 10 of 10) sorted by relevance

/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/
DTonalTest.java105 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/
DNotificationCustomViewWrapper.java57 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()
DNotificationViewWrapper.java145 float[] hsl = new float[] {0f, 0f, 0f}; in needsInversion() local
146 ColorUtils.colorToHSL(background, hsl); in needsInversion()
149 if (hsl[1] != 0) { in needsInversion()
154 boolean isLightGrayOrWhite = hsl[1] == 0 && hsl[2] > 0.5; in needsInversion()
/frameworks/base/core/java/com/android/internal/colorextraction/types/
DTonal.java129 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/
DVariationalKMeansQuantizer.java78 final float[] hsl = {0, 0, 0}; in quantize() local
81 ColorUtils.colorToHSL(pixels[i], hsl); in quantize()
83 hslPixels[i][0] = hsl[0] / 360f; in quantize()
84 hslPixels[i][1] = hsl[1]; in quantize()
85 hslPixels[i][2] = hsl[2]; in quantize()
DPalette.java472 boolean isAllowed(int rgb, float[] hsl);
484 public boolean isAllowed(int rgb, float[] hsl) {
485 return !isWhite(hsl) && !isBlack(hsl) && !isNearRedILine(hsl);
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
DMediaNotificationProcessor.java114 private static boolean isWhiteOrBlack(float[] hsl) { in isWhiteOrBlack() argument
115 return isBlack(hsl) || isWhite(hsl); in isWhiteOrBlack()
/frameworks/base/core/java/com/android/internal/util/
DContrastColorUtil.java378 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()
960 public static int HSLToColor(@NonNull float[] hsl) { in HSLToColor() argument
961 final float h = hsl[0]; in HSLToColor()
962 final float s = hsl[1]; in HSLToColor()
963 final float l = hsl[2]; in HSLToColor()
/frameworks/base/core/java/com/android/internal/graphics/
DColorUtils.java283 public static int HSLToColor(@NonNull float[] hsl) { in HSLToColor() argument
284 final float h = hsl[0]; in HSLToColor()
285 final float s = hsl[1]; in HSLToColor()
286 final float l = hsl[2]; in HSLToColor()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DStatusBarIconView.java740 float[] hsl = new float[3]; in updateContrastedStaticColor() local
741 ColorUtils.colorToHSL(mDrawableColor, hsl); in updateContrastedStaticColor()
744 if (hsl[1] < 0.2f) { in updateContrastedStaticColor()