Home
last modified time | relevance | path

Searched refs:calculateContrast (Results 1 – 11 of 11) sorted by relevance

/aosp12/packages/apps/Launcher3/src/com/android/launcher3/graphics/
H A DIconPalette.java101 ColorUtils.calculateContrast(colorOld, bg), in contrastChange()
102 ColorUtils.calculateContrast(colorNew, bg)); in contrastChange()
126 if (ColorUtils.calculateContrast(fg, bg) >= minRatio) { in findContrastColor()
142 if (ColorUtils.calculateContrast(fg, bg) > minRatio) { in findContrastColor()
/aosp12/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DContrastColorUtilTest.java19 import static androidx.core.graphics.ColorUtils.calculateContrast;
81 assertThat(calculateContrast(foreground, background)).isAtLeast(minContrast); in assertContrastIsAtLeast()
91 assertThat(calculateContrast(foreground, background)).isAtMost(maxContrast); in assertContrastIsAtMost()
/aosp12/packages/apps/Car/Notification/src/com/android/car/notification/
H A DNotificationUtils.java199 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) >= minContrastRatio) { in findContrastColorAgainstLightBackground()
213 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) > minContrastRatio) { in findContrastColorAgainstLightBackground()
234 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) >= minContrastRatio) { in findContrastColorAgainstDarkBackground()
247 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) in findContrastColorAgainstDarkBackground()
/aosp12/frameworks/base/core/java/com/android/internal/util/
H A DContrastColorUtil.java303 if (ColorUtilsFromCompat.calculateContrast(fg, bg) >= minRatio) { in findContrastColor()
319 if (ColorUtilsFromCompat.calculateContrast(fg, bg) > minRatio) { in findContrastColor()
339 if (ColorUtilsFromCompat.calculateContrast(fg, bg) >= minRatio) { in findAlphaToMeetContrast()
351 if (ColorUtilsFromCompat.calculateContrast(fg, bg) > minRatio) { in findAlphaToMeetContrast()
374 if (ColorUtilsFromCompat.calculateContrast(fg, bg) >= minRatio) { in findContrastColorAgainstDark()
390 if (ColorUtilsFromCompat.calculateContrast(fg, bg) > minRatio) { in findContrastColorAgainstDark()
451 ColorUtilsFromCompat.calculateContrast(colorOld, bg), in contrastChange()
452 ColorUtilsFromCompat.calculateContrast(colorNew, bg)); in contrastChange()
609 public static double calculateContrast(int foregroundColor, int backgroundColor) { in calculateContrast() method in ContrastColorUtil
610 return ColorUtilsFromCompat.calculateContrast(foregroundColor, backgroundColor); in calculateContrast()
[all …]
/aosp12/frameworks/base/core/java/com/android/internal/graphics/
H A DColorUtils.java93 public static double calculateContrast(@ColorInt int foreground, @ColorInt int background) { in calculateContrast() method in ColorUtils
131 return calculateContrast(fg, testBackground); in calculateMinimumBackgroundAlpha()
154 return calculateContrast(testForeground, bg); in calculateMinimumAlpha()
158 double testRatio = contrastCalculator.calculateContrast(foreground, background, 255); in calculateMinimumAlpha()
188 final double testRatio = calculator.calculateContrast(foreground, background, in binaryAlphaSearch()
693 double calculateContrast(int foreground, int background, int alpha); in calculateContrast() method
/aosp12/frameworks/base/tests/Internal/src/com/android/internal/graphics/
H A DColorUtilsTest.java38 double contrast = ColorUtils.calculateContrast(Color.WHITE, worstCase); in calculateMinimumBackgroundAlpha_satisfiestContrast()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/
H A DNotificationViewWrapper.java183 if (ColorUtils.calculateContrast(foreground, backgroundColor) < 3) { in childrenNeedInversion()
/aosp12/frameworks/base/core/java/android/app/
H A DWallpaperColors.java534 .calculateContrast(pixels[i], Color.BLACK) > DARK_PIXEL_CONTRAST; in calculateDarkHints()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DSmartReplyView.java117 mMinStrokeContrast = ContrastColorUtil.calculateContrast(mDefaultStrokeColor, in SmartReplyView()
/aosp12/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
H A DScrimController.java1221 ColorUtils.calculateContrast(mColors.getMainColor(), Color.WHITE) > 4.5); in updateThemeColors()
/aosp12/frameworks/base/boot/hiddenapi/
H A Dhiddenapi-max-target-o.txt88568 Lcom/android/internal/util/NotificationColorUtil$ColorUtilsFromCompat;->calculateContrast(II)D
88597 Lcom/android/internal/util/NotificationColorUtil;->calculateContrast(II)D