Home
last modified time | relevance | path

Searched refs:ColorUtils (Results 1 – 25 of 59) sorted by relevance

123

/aosp14/frameworks/base/tests/Internal/src/com/android/internal/graphics/
H A DColorUtilsTest.java33 int alpha = ColorUtils.calculateMinimumBackgroundAlpha(Color.WHITE, Color.BLACK, 4.5f); in calculateMinimumBackgroundAlpha_satisfiestContrast()
36 int worstCase = ColorUtils.blendARGB(Color.WHITE, Color.BLACK, alpha/255f); in calculateMinimumBackgroundAlpha_satisfiestContrast()
37 worstCase = ColorUtils.setAlphaComponent(worstCase, 255); in calculateMinimumBackgroundAlpha_satisfiestContrast()
38 double contrast = ColorUtils.calculateContrast(Color.WHITE, worstCase); in calculateMinimumBackgroundAlpha_satisfiestContrast()
/aosp14/frameworks/base/packages/SystemUI/monet/src/com/android/systemui/monet/
H A DShades.java22 import com.android.internal.graphics.ColorUtils;
58 shades[0] = ColorUtils.CAMToColor(hue, Math.min(40f, chroma), 99); in of()
59 shades[1] = ColorUtils.CAMToColor(hue, Math.min(40f, chroma), 95); in of()
62 shades[i] = ColorUtils.CAMToColor(hue, chroma, lStar); in of()
H A DColorScheme.kt22 import com.android.internal.graphics.ColorUtils
221 return ColorUtils.CAMToColor(hue.toFloat(), chroma.toFloat(), (1000f - tone) / 10f)
343 baseColor = ColorUtils.CAMToColor(h, c, CamUtils.lstarFromInt(seedColor))
426 get() = ColorUtils.setAlphaComponent(if (darkTheme) neutral1.s700 else neutral1.s10, 0xFF)
429 get() = ColorUtils.setAlphaComponent(if (darkTheme) accent1.s100 else accent1.s500, 0xFF)
/aosp14/frameworks/base/tests/HandwritingIme/src/com/google/android/test/handwritingime/
H A DBoundsInfoDrawHelper.java34 import com.android.internal.graphics.ColorUtils;
41 ColorUtils.setAlphaComponent(Color.DKGRAY, 128);
43 ColorUtils.setAlphaComponent(Color.BLUE, 128);
45 ColorUtils.setAlphaComponent(Color.MAGENTA, 128);
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/wrapper/
H A DNotificationCustomViewWrapper.java23 import com.android.internal.graphics.ColorUtils;
59 ColorUtils.colorToHSL(mBackgroundColor, hsl); in onContentUpdated()
62 mBackgroundColor = ColorUtils.HSLToColor(hsl); in onContentUpdated()
H A DNotificationViewWrapper.java38 import com.android.internal.graphics.ColorUtils;
145 ColorUtils.colorToHSL(background, hsl); in needsInversion()
175 backgroundColor = ColorUtils.setAlphaComponent(backgroundColor, 255); in childrenNeedInversion()
181 if (ColorUtils.calculateContrast(foreground, backgroundColor) < 3) { in childrenNeedInversion()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/wallet/ui/
H A DDotIndicatorDecoration.java27 import androidx.core.graphics.ColorUtils;
119 ColorUtils.blendARGB(mSelectedColor, mUnselectedColor, progress / 2))); in drawSelectedDot()
128 ColorUtils.blendARGB( in drawFadingUnselectedDot()
144 return ColorUtils.setAlphaComponent(color, transitionAlphaOverride); in getTransitionAdjustedColor()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/media/controls/ui/
H A DIlluminationDrawable.kt38 import com.android.internal.graphics.ColorUtils
39 import com.android.internal.graphics.ColorUtils.blendARGB
167 ColorUtils.colorToHSL(backgroundColor, tmpHsl)
182 val finalHighlight = ColorUtils.HSLToColor(tmpHsl)
H A DSquigglyProgress.kt35 import com.android.internal.graphics.ColorUtils
250 wavePaint.color = ColorUtils.setAlphaComponent(tintColor, alpha)
252 ColorUtils.setAlphaComponent(tintColor, (DISABLED_ALPHA * (alpha / 255f)).toInt())
/aosp14/frameworks/base/core/java/com/android/internal/graphics/palette/
H A DVariationalKMeansQuantizer.java21 import com.android.internal.graphics.ColorUtils;
81 ColorUtils.colorToHSL(pixels[i], hsl); in quantize()
123 int color = ColorUtils.HSLToColor(mHsl); in quantize()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
H A DAuthRippleView.kt30 import com.android.internal.graphics.ColorUtils
139 dwellShader.color = ColorUtils.setAlphaComponent(
178 dwellShader.color = ColorUtils.setAlphaComponent(
294 rippleShader.color = ColorUtils.setAlphaComponent(
310 dwellShader.color = ColorUtils.setAlphaComponent(
/aosp14/frameworks/base/core/java/com/android/internal/colorextraction/types/
H A DTonal.java32 import com.android.internal.graphics.ColorUtils;
130 ColorUtils.RGBToHSL(Color.red(colorValue), Color.green(colorValue), Color.blue(colorValue), in runTonalExtraction()
177 ColorUtils.colorToHSL(mainColor, mTmpHSL); in runTonalExtraction()
179 ColorUtils.colorToHSL(MAIN_COLOR_LIGHT, mTmpHSL); in runTonalExtraction()
184 ColorUtils.colorToHSL(MAIN_COLOR_DARK, mTmpHSL); in runTonalExtraction()
269 ColorUtils.colorToHSL(color, hsl); in applyFallback()
281 return ColorUtils.HSLToColor(mTmpHSL); in getColorInt()
/aosp14/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/ripple/
H A DRippleAnimation.kt23 import androidx.core.graphics.ColorUtils
73 color = ColorUtils.setAlphaComponent(config.color, config.opacity)
H A DRippleView.kt28 import androidx.core.graphics.ColorUtils
213 rippleShader.color = ColorUtils.setAlphaComponent(color, alpha)
/aosp14/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/back/
H A DBackAnimationBackground.java29 import com.android.internal.graphics.ColorUtils;
65 mBackgroundIsDark = ColorUtils.calculateLuminance(color) < 0.5f; in ensureBackground()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
H A DKeyguardUserDetailItemView.java25 import androidx.core.graphics.ColorUtils;
148 final int blendedTextColor = ColorUtils.blendARGB(mTextColor, Color.WHITE, mDarkAmount); in updateDark()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/surfaceeffects/ripple/
H A DRippleAnimationTest.kt21 import androidx.core.graphics.ColorUtils
75 assertThat(color).isEqualTo(ColorUtils.setAlphaComponent(config.color, config.opacity))
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
H A DMediaArtworkProcessor.kt30 import com.android.internal.graphics.ColorUtils
84 canvas.drawColor(ColorUtils.setAlphaComponent(swatch.rgb, COLOR_ALPHA))
/aosp14/frameworks/base/core/java/android/app/
H A DWallpaperColors.java36 import com.android.internal.graphics.ColorUtils;
272 ColorUtils.colorToHSL(primaryColor.toArgb(), tmpHsl); in WallpaperColors()
564 int blackTransparent = ColorUtils.setAlphaComponent(Color.BLACK, dimmingLayerAlpha); in calculateDarkHints()
571 ColorUtils.colorToHSL(pixelColor, tmpHsl); in calculateDarkHints()
576 int compositeColors = ColorUtils.compositeColors(blackTransparent, pixelColor); in calculateDarkHints()
579 double adjustedLuminance = ColorUtils.calculateLuminance(compositeColors); in calculateDarkHints()
/aosp14/frameworks/base/packages/SystemUI/src/com/android/keyguard/
H A DLockIconView.java37 import com.android.internal.graphics.ColorUtils;
86 mLockIconColor = ColorUtils.blendARGB( in updateColorAndBackgroundVisibility()
96 mLockIconColor = ColorUtils.blendARGB( in updateColorAndBackgroundVisibility()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/controls/ui/
H A DSquigglyProgressTest.kt27 import com.android.internal.graphics.ColorUtils
126 assertThat(linePaint.color).isEqualTo(ColorUtils.setAlphaComponent(tint, DISABLED_ALPHA))
/aosp14/frameworks/base/core/java/com/android/internal/graphics/cam/
H A DCamUtils.java23 import com.android.internal.graphics.ColorUtils;
216 return ColorUtils.XYZToColor(xT * CamUtils.WHITE_POINT_D65[0], in intFromLstar()
/aosp14/frameworks/base/packages/SystemUI/animation/src/com/android/systemui/surfaceeffects/turbulencenoise/
H A DTurbulenceNoiseView.kt27 import androidx.core.graphics.ColorUtils
65 turbulenceNoiseShader.setColor(ColorUtils.setAlphaComponent(color, it.opacity))
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/controls/ui/
H A DControlViewHolder.kt51 import com.android.internal.graphics.ColorUtils
338 ColorUtils.blendARGB(bg, newClipColor, toggleBackgroundIntensity)
373 val updatedClipColor = ColorUtils.blendARGB(oldClipColor, newClipColor,
375 val updatedBaseColor = ColorUtils.blendARGB(oldBaseColor, newBaseColor,
/aosp14/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
H A DLockIcon.java35 import com.android.internal.graphics.ColorUtils;
162 int color = ColorUtils.blendARGB(mIconColor, Color.WHITE, mDozeAmount); in updateDarkTint()

123