Searched refs:minContrastRatio (Results 1 – 2 of 2) sorted by relevance
/aosp12/packages/apps/Car/Notification/src/com/android/car/notification/ |
H A D | NotificationUtils.java | 198 @ColorInt int foregroundColor, @ColorInt int backgroundColor, double minContrastRatio) { in findContrastColorAgainstLightBackground() argument 199 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) >= minContrastRatio) { in findContrastColorAgainstLightBackground() 213 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) > minContrastRatio) { in findContrastColorAgainstLightBackground() 233 @ColorInt int foregroundColor, @ColorInt int backgroundColor, double minContrastRatio) { in findContrastColorAgainstDarkBackground() argument 234 if (ColorUtils.calculateContrast(foregroundColor, backgroundColor) >= minContrastRatio) { in findContrastColorAgainstDarkBackground() 248 > minContrastRatio) { in findContrastColorAgainstDarkBackground() 266 @ColorInt int foregroundColor, @ColorInt int backgroundColor, double minContrastRatio) { in getContrastedForegroundColor() argument 271 foregroundColor, backgroundColor, minContrastRatio) in getContrastedForegroundColor() 273 foregroundColor, backgroundColor, minContrastRatio); in getContrastedForegroundColor()
|
/aosp12/frameworks/base/core/java/com/android/internal/graphics/ |
H A D | ColorUtils.java | 121 @ColorInt int background, float minContrastRatio) { in calculateMinimumBackgroundAlpha() argument 126 return binaryAlphaSearch(foreground, background, minContrastRatio, (fg, bg, alpha) -> { in calculateMinimumBackgroundAlpha() 146 float minContrastRatio) { in calculateMinimumAlpha() argument 159 if (testRatio < minContrastRatio) { in calculateMinimumAlpha() 164 return binaryAlphaSearch(foreground, background, minContrastRatio, contrastCalculator); in calculateMinimumAlpha() 178 float minContrastRatio, ContrastCalculator calculator) { in binaryAlphaSearch() argument 190 if (testRatio < minContrastRatio) { in binaryAlphaSearch()
|