Home
last modified time | relevance | path

Searched refs:ContrastColorUtil (Results 1 – 25 of 32) sorted by relevance

12

/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DContrastColorUtilTest.java56 int blueContrastColor = ContrastColorUtil.ensureTextContrast(Color.BLUE, darkBg, true); in testEnsureTextContrastAgainstDark()
59 int redContrastColor = ContrastColorUtil.ensureTextContrast(Color.RED, darkBg, true); in testEnsureTextContrastAgainstDark()
63 int greenContrastColor = ContrastColorUtil.ensureTextContrast(darkGreen, darkBg, true); in testEnsureTextContrastAgainstDark()
66 int grayContrastColor = ContrastColorUtil.ensureTextContrast(Color.DKGRAY, darkBg, true); in testEnsureTextContrastAgainstDark()
69 int selfContrastColor = ContrastColorUtil.ensureTextContrast(darkBg, darkBg, true); in testEnsureTextContrastAgainstDark()
78 int blueContrastColor = ContrastColorUtil.ensureTextContrast(lightBlue, lightBg, false); in testEnsureTextContrastAgainstLight()
81 int redContrastColor = ContrastColorUtil.ensureTextContrast(Color.RED, lightBg, false); in testEnsureTextContrastAgainstLight()
84 int greenContrastColor = ContrastColorUtil.ensureTextContrast(Color.GREEN, lightBg, false); in testEnsureTextContrastAgainstLight()
87 int grayContrastColor = ContrastColorUtil.ensureTextContrast(Color.LTGRAY, lightBg, false); in testEnsureTextContrastAgainstLight()
90 int selfContrastColor = ContrastColorUtil.ensureTextContrast(lightBg, lightBg, false); in testEnsureTextContrastAgainstLight()
[all …]
/aosp14/frameworks/base/core/java/com/android/internal/widget/
H A DColoredIconHelper.java26 import com.android.internal.util.ContrastColorUtil;
50 int grey = ContrastColorUtil.resolveColor(ctx, Notification.COLOR_DEFAULT, inNightMode); in applyGrayTint()
H A DPeopleHelper.java37 import com.android.internal.util.ContrastColorUtil;
133 double luminance = ContrastColorUtil.calculateLuminance(layoutColor); in findColor()
139 return ContrastColorUtil.getShiftedColor(layoutColor, in findColor()
H A DMessagingLayout.java49 import com.android.internal.util.ContrastColorUtil;
365 double luminance = ContrastColorUtil.calculateLuminance(layoutColor); in findColor()
371 return ContrastColorUtil.getShiftedColor(layoutColor, in findColor()
/aosp14/frameworks/base/core/java/com/android/internal/util/
H A DContrastColorUtil.java53 public class ContrastColorUtil { class
59 private static ContrastColorUtil sInstance;
67 public static ContrastColorUtil getInstance(Context context) { in getInstance()
70 sInstance = new ContrastColorUtil(context); in getInstance()
76 private ContrastColorUtil(Context context) { in ContrastColorUtil() method in ContrastColorUtil
322 newColors[i] = ContrastColorUtil.ensureLargeTextContrast( in ensureColorSpanContrast()
342 foregroundColor = ContrastColorUtil.ensureLargeTextContrast( in ensureColorSpanContrast()
565 return ContrastColorUtil.resolveContrastColor(context, notificationColor, in resolveContrastColor()
584 color = ContrastColorUtil.ensureTextContrast(color, backgroundColor, isDark); in resolveContrastColor()
592 ContrastColorUtil.contrastChange(resolvedColor, color, backgroundColor), in resolveContrastColor()
[all …]
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/
H A DNotificationUtils.java25 import com.android.internal.util.ContrastColorUtil;
40 public static boolean isGrayscale(ImageView v, ContrastColorUtil colorUtil) { in isGrayscale()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
H A DLetterboxAppearanceCalculator.kt27 import com.android.internal.util.ContrastColorUtil
175 ContrastColorUtil.calculateContrast(
178 ContrastColorUtil.calculateContrast(
H A DLegacyNotificationIconAreaControllerImpl.java35 import com.android.internal.util.ContrastColorUtil;
86 private final ContrastColorUtil mContrastColorUtil;
145 mContrastColorUtil = ContrastColorUtil.getInstance(context); in LegacyNotificationIconAreaControllerImpl()
H A DScrimController.java45 import com.android.internal.util.ContrastColorUtil;
1498 final boolean isBackgroundLight = !ContrastColorUtil.isColorDark(background); in updateThemeColors()
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/
H A DStackEducationView.kt28 import com.android.internal.util.ContrastColorUtil
109 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true)
H A DBubbleOverflowContainerView.java46 import com.android.internal.util.ContrastColorUtil;
227 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, isNightMode); in updateTheme()
317 textColor = ContrastColorUtil.ensureTextContrast(textColor, bgColor, true); in onCreateViewHolder()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DSmartReplyView.java34 import com.android.internal.util.ContrastColorUtil;
117 mMinStrokeContrast = ContrastColorUtil.calculateContrast(mDefaultStrokeColor, in SmartReplyView()
729 final boolean dark = ContrastColorUtil.isColorDark(backgroundColor); in setBackgroundTintColor()
731 mCurrentTextColor = ContrastColorUtil.ensureTextContrast( in setBackgroundTintColor()
734 mCurrentStrokeColor = colorized ? mCurrentTextColor : ContrastColorUtil.ensureContrast( in setBackgroundTintColor()
H A DRemoteInputView.java82 import com.android.internal.util.ContrastColorUtil;
225 final boolean dark = ContrastColorUtil.isColorDark(backgroundColor); in setBackgroundTintColor()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
H A DLightBarControllerTest.java43 import com.android.internal.util.ContrastColorUtil;
91 colors.setSupportsDarkText(!ContrastColorUtil.isColorDark(bgColor)); in makeColors()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/
H A DNotificationViewWrapper.java39 import com.android.internal.util.ContrastColorUtil;
174 backgroundColor = ContrastColorUtil.compositeColors(backgroundColor, parentBackground); in childrenNeedInversion()
H A DNotificationTemplateViewWrapper.java39 import com.android.internal.util.ContrastColorUtil;
230 return ContrastColorUtil.compositeColors(Color.argb((int) (alpha * 255), in blendColorWithBackground()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
H A DStatusBarIconViewTest.java54 import com.android.internal.util.ContrastColorUtil;
127 ContrastColorUtil.satisfiesTextContrast(Color.WHITE, color)); in testGetContrastedStaticDrawableColor()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/icon/ui/viewbinder/
H A DNotificationIconAreaControllerViewBinderWrapperImpl.kt31 import com.android.internal.util.ContrastColorUtil
104 private val contrastColorUtil: ContrastColorUtil = ContrastColorUtil.getInstance(context)
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
H A DStatusBarIconView.java59 import com.android.internal.util.ContrastColorUtil;
811 if (!ContrastColorUtil.satisfiesTextContrast(mCachedContrastBackgroundColor, in updateContrastedStaticColor()
820 boolean isDark = !ContrastColorUtil.isColorLight(mCachedContrastBackgroundColor); in updateContrastedStaticColor()
821 contrastedColor = ContrastColorUtil.resolveContrastColor(mContext, in updateContrastedStaticColor()
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/startingsurface/
H A DSplashscreenWindowCreator.java59 import com.android.internal.util.ContrastColorUtil;
218 ContrastColorUtil.isColorLight( in addSplashScreenStartingWindow()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/
H A DHybridNotificationView.java31 import com.android.internal.util.ContrastColorUtil;
/aosp14/frameworks/base/core/java/android/app/
H A DNotification.java107 import com.android.internal.util.ContrastColorUtil;
3918 private ContrastColorUtil mColorUtil;
4026 private ContrastColorUtil getColorUtil() { in getColorUtil()
4028 mColorUtil = ContrastColorUtil.getInstance(mContext); in getColorUtil()
6297 ContrastColorUtil.resolveSecondaryColor( in generateActionButton()
6302 title = ContrastColorUtil.clearColorSpans(title); in generateActionButton()
6320 ContrastColorUtil.resolveSecondaryColor( in generateActionButton()
12785 mPrimaryTextColor = ContrastColorUtil.findAlphaToMeetContrast( in resolvePalette()
12826 mPrimaryTextColor = ContrastColorUtil.resolvePrimaryColor( in resolvePalette()
12844 ContrastColorUtil.resolvePrimaryColor( in resolvePalette()
[all …]
H A DWallpaperColors.java41 import com.android.internal.util.ContrastColorUtil;
583 final boolean satisfiesTextContrast = ContrastColorUtil in calculateDarkHints()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/
H A DNotificationEntry.java60 import com.android.internal.util.ContrastColorUtil;
522 final int contrasted = ContrastColorUtil.resolveContrastColor(context, rawColor, in getContrastedColor()
/aosp14/frameworks/base/core/tests/coretests/src/android/app/
H A DNotificationTest.java97 import com.android.internal.util.ContrastColorUtil;
499 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsDarker()
500 .isLessThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsDarker()
509 assertThat(ContrastColorUtil.calculateLuminance(result)) in testBuilder_ensureButtonFillContrast_adjustsLighter()
510 .isGreaterThan(ContrastColorUtil.calculateLuminance(background)); in testBuilder_ensureButtonFillContrast_adjustsLighter()

12