/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/ |
D | ColorUtils.h | 32 struct ColorUtils { struct 185 inline static const char *asString(android::ColorUtils::ColorStandard i, const char *def = "??") { 188 case ColorUtils::kColorStandardUnspecified: return "Unspecified"; 189 case ColorUtils::kColorStandardBT709: return "BT709"; 190 case ColorUtils::kColorStandardBT601_625: return "BT601_625"; 191 case ColorUtils::kColorStandardBT601_625_Unadjusted: return "BT601_625_Unadjusted"; 192 case ColorUtils::kColorStandardBT601_525: return "BT601_525"; 193 case ColorUtils::kColorStandardBT601_525_Unadjusted: return "BT601_525_Unadjusted"; 194 case ColorUtils::kColorStandardBT2020: return "BT2020"; 195 case ColorUtils::kColorStandardBT2020Constant: return "BT2020Constant"; [all …]
|
/frameworks/support/compat/src/androidTest/java/androidx/core/graphics/ |
D | ColorUtilsTest.java | 96 ColorUtils.compositeColors(rgb, lab); in addColorsDifferentModels() 105 Color result = ColorUtils.compositeColors(Color.valueOf(0x7f007f00), in addColorsSameColorSpace() 119 Color mixed = ColorUtils.compositeColors(green, red); in addColorsDifferentColorSpace() 130 assertEquals(0, ColorUtils.compositeColors(Color.valueOf(0x00007f00), in addColorsZeroAlpha() 134 Color result = ColorUtils.compositeColors(Color.valueOf(0.0f, 1.0f, 0.0f, 0.0001f), in addColorsZeroAlpha() 161 ColorUtils.colorToHSL(entry.rgb, hsl); in testColorToHslLimits() 208 ColorUtils.calculateMinimumAlpha(Color.BLACK, entry.rgb, 3.0f)); in testMinAlphas() 210 ColorUtils.calculateMinimumAlpha(Color.BLACK, entry.rgb, 4.5f)); in testMinAlphas() 212 ColorUtils.calculateMinimumAlpha(Color.WHITE, entry.rgb, 3.0f)); in testMinAlphas() 214 ColorUtils.calculateMinimumAlpha(Color.WHITE, entry.rgb, 4.5f)); in testMinAlphas() [all …]
|
/frameworks/base/tests/Internal/src/com/android/internal/graphics/ |
D | ColorUtilsTest.java | 32 int alpha = ColorUtils.calculateMinimumBackgroundAlpha(Color.WHITE, Color.BLACK, 4.5f); in calculateMinimumBackgroundAlpha_satisfiestContrast() 35 int worstCase = ColorUtils.blendARGB(Color.WHITE, Color.BLACK, alpha/255f); in calculateMinimumBackgroundAlpha_satisfiestContrast() 36 worstCase = ColorUtils.setAlphaComponent(worstCase, 255); in calculateMinimumBackgroundAlpha_satisfiestContrast() 37 double contrast = ColorUtils.calculateContrast(Color.WHITE, worstCase); in calculateMinimumBackgroundAlpha_satisfiestContrast()
|
/frameworks/support/palette/src/main/java/androidx/palette/graphics/ |
D | Palette.java | 32 import androidx.core.graphics.ColorUtils; 471 this(ColorUtils.HSLToColor(hsl), population); in Swatch() 494 ColorUtils.RGBToHSL(mRed, mGreen, mBlue, mHsl); in getHsl() 528 final int lightBodyAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 530 final int lightTitleAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 535 mBodyTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightBodyAlpha); in ensureTextColorsGenerated() 536 mTitleTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightTitleAlpha); in ensureTextColorsGenerated() 541 final int darkBodyAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 543 final int darkTitleAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 548 mBodyTextColor = ColorUtils.setAlphaComponent(Color.BLACK, darkBodyAlpha); in ensureTextColorsGenerated() [all …]
|
/frameworks/av/media/libstagefright/foundation/ |
D | ColorUtils.cpp | 31 typedef ColorUtils CU; 96 int32_t ColorUtils::wrapColorAspectsIntoColorStandard( in wrapColorAspectsIntoColorStandard() 115 status_t ColorUtils::unwrapColorAspectsFromColorStandard( in unwrapColorAspectsFromColorStandard() 153 int32_t ColorUtils::wrapColorAspectsIntoColorRange(ColorAspects::Range range) { in wrapColorAspectsIntoColorRange() 167 status_t ColorUtils::unwrapColorAspectsFromColorRange( in unwrapColorAspectsFromColorRange() 193 int32_t ColorUtils::wrapColorAspectsIntoColorTransfer( in wrapColorAspectsIntoColorTransfer() 209 status_t ColorUtils::unwrapColorAspectsFromColorTransfer( in unwrapColorAspectsFromColorTransfer() 230 status_t ColorUtils::convertPlatformColorAspectsToCodecAspects( in convertPlatformColorAspectsToCodecAspects() 240 status_t ColorUtils::convertCodecColorAspectsToPlatformAspects( in convertCodecColorAspectsToPlatformAspects() 311 void ColorUtils::convertCodecColorAspectsToIsoAspects( in convertCodecColorAspectsToIsoAspects() [all …]
|
D | Android.bp | 66 "ColorUtils.cpp",
|
/frameworks/base/core/java/com/android/internal/graphics/palette/ |
D | Palette.java | 31 import com.android.internal.graphics.ColorUtils; 474 this(ColorUtils.HSLToColor(hsl), population); in Swatch() 496 ColorUtils.RGBToHSL(mRed, mGreen, mBlue, mHsl); in getHsl() 530 final int lightBodyAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 532 final int lightTitleAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 537 mBodyTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightBodyAlpha); in ensureTextColorsGenerated() 538 mTitleTextColor = ColorUtils.setAlphaComponent(Color.WHITE, lightTitleAlpha); in ensureTextColorsGenerated() 543 final int darkBodyAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 545 final int darkTitleAlpha = ColorUtils.calculateMinimumAlpha( in ensureTextColorsGenerated() 550 mBodyTextColor = ColorUtils.setAlphaComponent(Color.BLACK, darkBodyAlpha); in ensureTextColorsGenerated() [all …]
|
D | VariationalKMeansQuantizer.java | 21 import com.android.internal.graphics.ColorUtils; 82 ColorUtils.colorToHSL(pixels[i], hsl); in quantize()
|
D | ColorCutQuantizer.java | 45 import com.android.internal.graphics.ColorUtils; 452 ColorUtils.colorToHSL(rgb, mTempHsl); in shouldIgnoreColor()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | TintedKeyButtonDrawable.java | 23 import com.android.internal.graphics.ColorUtils; 57 final int intermediateColor = ColorUtils.compositeColors( in setDarkIntensity() 70 return ColorUtils.setAlphaComponent(color, alphaInt); in blendAlpha()
|
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/widget/ |
D | AppCompatBaseImageViewTest.java | 39 import androidx.core.graphics.ColorUtils; 202 ColorUtils.compositeColors(emeraldDefault, sourceColor), in testImageTintingAcrossModeChange() 209 view, ColorUtils.compositeColors(emeraldDisabled, sourceColor), in testImageTintingAcrossModeChange() 317 view, ColorUtils.compositeColors(emeraldDefault, colorGreen), in testImageTranslucentTintingAcrossImageChange() 324 view, ColorUtils.compositeColors(emeraldDisabled, colorGreen), in testImageTranslucentTintingAcrossImageChange() 331 view, ColorUtils.compositeColors(emeraldDefault, colorGreen), in testImageTranslucentTintingAcrossImageChange() 340 view, ColorUtils.compositeColors(emeraldDefault, colorRed), in testImageTranslucentTintingAcrossImageChange() 347 view, ColorUtils.compositeColors(emeraldDisabled, colorRed), in testImageTranslucentTintingAcrossImageChange() 354 view, ColorUtils.compositeColors(emeraldDefault, colorRed), in testImageTranslucentTintingAcrossImageChange()
|
D | AppCompatBaseViewTest.java | 50 import androidx.core.graphics.ColorUtils; 408 ColorUtils.compositeColors(emeraldDefault, backgroundColor), in testBackgroundTintingAcrossModeChange() 415 view, ColorUtils.compositeColors(emeraldDisabled, backgroundColor), in testBackgroundTintingAcrossModeChange() 477 ColorUtils.compositeColors(emeraldDefault, backgroundColor), in testBackgroundTintingViewCompatAcrossModeChange() 484 view, ColorUtils.compositeColors(emeraldDisabled, backgroundColor), in testBackgroundTintingViewCompatAcrossModeChange() 595 view, ColorUtils.compositeColors(emeraldDefault, backgroundColorGreen), in testBackgroundTranslucentTintingAcrossBackgroundChange() 602 view, ColorUtils.compositeColors(emeraldDisabled, backgroundColorGreen), in testBackgroundTranslucentTintingAcrossBackgroundChange() 609 view, ColorUtils.compositeColors(emeraldDefault, backgroundColorGreen), in testBackgroundTranslucentTintingAcrossBackgroundChange() 618 view, ColorUtils.compositeColors(emeraldDefault, backgroundColorRed), in testBackgroundTranslucentTintingAcrossBackgroundChange() 625 view, ColorUtils.compositeColors(emeraldDisabled, backgroundColorRed), in testBackgroundTranslucentTintingAcrossBackgroundChange() [all …]
|
/frameworks/support/mediarouter/src/main/java/androidx/mediarouter/app/ |
D | MediaRouterThemeHelper.java | 27 import androidx.core.graphics.ColorUtils; 118 if (ColorUtils.calculateContrast(COLOR_WHITE_ON_DARK_BACKGROUND, primaryColor) in getControllerColor() 130 if (ColorUtils.calculateContrast(primaryColor, backgroundColor) < MIN_CONTRAST) { in getButtonTextColor() 164 controllerColor = ColorUtils.compositeColors(controllerColor, backgroundColor); in setVolumeSliderColor()
|
/frameworks/av/packages/MediaComponents/src/com/android/support/mediarouter/app/ |
D | MediaRouterThemeHelper.java | 23 import android.support.v4.graphics.ColorUtils; 122 if (ColorUtils.calculateContrast(COLOR_WHITE_ON_DARK_BACKGROUND, primaryColor) in getControllerColor() 133 if (ColorUtils.calculateContrast(primaryColor, backgroundColor) < MIN_CONTRAST) { in getButtonTextColor() 165 controllerColor = ColorUtils.compositeColors(controllerColor, backgroundColor); in setVolumeSliderColor()
|
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/res/content/ |
D | AppCompatResourcesTestCase.java | 33 import androidx.core.graphics.ColorUtils; 64 final int expectedDisabled = ColorUtils.setAlphaComponent(colorForegound, in testGetColorStateListWithThemedAttributes()
|
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/types/ |
D | TonalTest.java | 29 import com.android.internal.graphics.ColorUtils; 123 final int blacklistedColor = ColorUtils.HSLToColor(hsl); in tonal_blacklistTest() 141 final int blacklistedColor = ColorUtils.HSLToColor(hsl); in tonal_ignoreBlacklistTest()
|
/frameworks/base/core/java/com/android/internal/colorextraction/types/ |
D | Tonal.java | 31 import com.android.internal.graphics.ColorUtils; 132 ColorUtils.RGBToHSL(Color.red(colorValue), Color.green(colorValue), in runTonalExtraction() 152 ColorUtils.RGBToHSL(Color.red(colorValue), Color.green(colorValue), Color.blue(colorValue), in runTonalExtraction() 198 ColorUtils.colorToHSL(mainColor, mTmpHSL); in runTonalExtraction() 200 ColorUtils.colorToHSL(THRESHOLD_COLOR_LIGHT, mTmpHSL); in runTonalExtraction() 205 ColorUtils.colorToHSL(THRESHOLD_COLOR_DARK, mTmpHSL); in runTonalExtraction() 283 return ColorUtils.HSLToColor(mTmpHSL); in getColorInt()
|
/frameworks/base/core/java/com/android/internal/colorextraction/drawable/ |
D | GradientDrawable.java | 38 import com.android.internal.graphics.ColorUtils; 100 mMainColor = ColorUtils.blendARGB(mainFrom, mainColor, ratio); in setColors() 101 mSecondaryColor = ColorUtils.blendARGB(secFrom, secondaryColor, ratio); in setColors()
|
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/widget/ |
D | ThemeUtils.java | 24 import androidx.core.graphics.ColorUtils; 111 return ColorUtils.setAlphaComponent(color, Math.round(originalAlpha * alpha)); in getThemeAttrColor()
|
/frameworks/support/palette/src/androidTest/java/androidx/palette/graphics/ |
D | SwatchTests.java | 19 import static androidx.core.graphics.ColorUtils.HSLToColor; 20 import static androidx.core.graphics.ColorUtils.calculateContrast;
|
/frameworks/support/v7/appcompat/src/androidTest/java/androidx/appcompat/app/ |
D | AppCompatMenuItemIconTintingTest.java | 40 import androidx.core.graphics.ColorUtils; 251 secondItem.getIcon(), ColorUtils.compositeColors(emeraldDefault, iconColorBlack), in testIconTranslucentTintingAcrossIconChange() 259 secondItem.getIcon(), ColorUtils.compositeColors(emeraldDefault, iconColorRed), in testIconTranslucentTintingAcrossIconChange()
|
/frameworks/support/v7/appcompat/src/main/java/androidx/appcompat/content/res/ |
D | AppCompatColorStateListInflater.java | 30 import androidx.core.graphics.ColorUtils; 170 return ColorUtils.setAlphaComponent(color, Math.round(Color.alpha(color) * alphaMod)); in modulateColorAlpha()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/ |
D | ScrimView.java | 33 import android.support.v4.graphics.ColorUtils; 269 int mainTinted = ColorUtils.blendARGB(mColors.getMainColor(), mTintColor, in updateColorWithTint() 271 int secondaryTinted = ColorUtils.blendARGB(mColors.getSecondaryColor(), mTintColor, in updateColorWithTint()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/recents/views/ |
D | TaskViewHeader.java | 39 import android.support.v4.graphics.ColorUtils; 103 ColorUtils.colorToHSL(color, mTmpHSL); in setColorAndDim() 107 mHighlightPaint.setColor(ColorUtils.HSLToColor(mTmpHSL)); in setColorAndDim() 432 ColorUtils.colorToHSL(color, mTmpHSL); in updateBackgroundColor() 434 mOverlayBackground.setColorAndDim(ColorUtils.HSLToColor(mTmpHSL), dimAlpha); in updateBackgroundColor()
|
/frameworks/base/core/java/android/app/ |
D | WallpaperColors.java | 30 import com.android.internal.graphics.ColorUtils; 380 ColorUtils.colorToHSL(pixels[i], tmpHsl); in calculateDarkHints()
|