/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/ |
D | Palette.kt | 22 var colors : IntArray variable 40 val count = colors.size in randomize() 41 colors[0] = Color.HSVToColor(hsv) in randomize() 48 colors[i] = color in randomize() 50 val lum = lum(colors[i]) in randomize() 51 if (lum < lum(colors[darkest])) darkest = i in randomize() 52 if (lum > lum(colors[lightest])) lightest = i in randomize() 58 for (c in colors) { in toString() 66 colors = IntArray(count) 71 colors = IntArray(count) [all …]
|
D | PaintActivity.java | 56 private LinearLayout colors = null; field in PaintActivity 66 hideToolbar(colors); 72 toggleToolbar(colors); 149 colors = findViewById(R.id.colors); in setupViews() 198 colors.removeAllViews(); in setupViews() 199 showToolbar(colors); in setupViews() 255 if (colors.getChildCount() == 0) { in refreshBrushAndColor() 271 colors.setSelected(false); in refreshBrushAndColor() 272 hideToolbar(colors); in refreshBrushAndColor() 277 colors.addView(button, button_lp); in refreshBrushAndColor()
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | GradientStopsActivity.java | 45 int[] colors = new int[] { 0xffff0000, 0xff0000ff }; in onDraw() local 48 colors, positions, Shader.TileMode.CLAMP); in onDraw() 55 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 }; in onDraw() 58 colors, positions, Shader.TileMode.CLAMP); in onDraw() 65 colors = new int[] { 0xffff0000, 0xff0000ff, 0xff00ff00 }; in onDraw() 68 colors, positions, Shader.TileMode.CLAMP); in onDraw() 75 colors = new int[] { 0xff000000, 0xffffffff }; in onDraw() 77 colors, null, Shader.TileMode.CLAMP); in onDraw() 85 colors, null, Shader.TileMode.REPEAT); in onDraw() 93 colors, null, Shader.TileMode.MIRROR); in onDraw() [all …]
|
/frameworks/base/tests/Internal/src/android/app/ |
D | WallpaperColorsTest.java | 40 WallpaperColors colors = new WallpaperColors(color, null, null, 0); in supportsDarkTextOverrideTest() local 42 (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0); in supportsDarkTextOverrideTest() 45 colors = new WallpaperColors(color, null, null, WallpaperColors.HINT_SUPPORTS_DARK_TEXT); in supportsDarkTextOverrideTest() 47 (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_TEXT) == 0); in supportsDarkTextOverrideTest() 85 WallpaperColors colors = new WallpaperColors(Color.valueOf(Color.GREEN), null, null); in colorHintsTest() local 86 fromBitmap = (colors.getColorHints() & WallpaperColors.HINT_FROM_BITMAP) != 0; in colorHintsTest() 94 WallpaperColors colors = new WallpaperColors(color, null, null); in darkMainColorSupportsDarkTheme() local 96 (colors.getColorHints() & WallpaperColors.HINT_SUPPORTS_DARK_THEME) != 0); in darkMainColorSupportsDarkTheme() 117 WallpaperColors colors = WallpaperColors.fromBitmap(image); in testParcelUnparcel() local 119 colors.writeToParcel(parcel, 0); in testParcelUnparcel() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | Shader.java | 213 protected static @ColorLong long[] convertColors(@NonNull @ColorInt int[] colors) { in convertColors() argument 214 if (colors.length < 2) { in convertColors() 218 long[] colorLongs = new long[colors.length]; in convertColors() 219 for (int i = 0; i < colors.length; ++i) { in convertColors() 220 colorLongs[i] = Color.pack(colors[i]); in convertColors() 234 protected static ColorSpace detectColorSpace(@NonNull @ColorLong long[] colors) { in detectColorSpace() argument 235 if (colors.length < 2) { in detectColorSpace() 238 final ColorSpace colorSpace = Color.colorSpace(colors[0]); in detectColorSpace() 239 for (int i = 1; i < colors.length; ++i) { in detectColorSpace() 240 if (Color.colorSpace(colors[i]) != colorSpace) { in detectColorSpace()
|
D | RadialGradient.java | 71 @NonNull @ColorInt int[] colors, @Nullable float[] stops, in RadialGradient() argument 73 this(centerX, centerY, 0f, centerX, centerY, radius, convertColors(colors), in RadialGradient() 95 @NonNull @ColorLong long[] colors, @Nullable float[] stops, in RadialGradient() argument 97 this(centerX, centerY, 0f, centerX, centerY, radius, colors.clone(), stops, in RadialGradient() 98 tileMode, detectColorSpace(colors)); in RadialGradient() 140 @NonNull @ColorLong long[] colors, @Nullable float[] stops, in RadialGradient() argument 142 this(startX, startY, startRadius, endX, endY, endRadius, colors.clone(), stops, tileMode, in RadialGradient() 143 detectColorSpace(colors)); in RadialGradient() 151 float endRadius, @NonNull @ColorLong long[] colors, @Nullable float[] stops, in RadialGradient() argument 165 if (stops != null && colors.length != stops.length) { in RadialGradient() [all …]
|
D | SweepGradient.java | 62 public SweepGradient(float cx, float cy, @NonNull @ColorInt int[] colors, in SweepGradient() argument 64 this(cx, cy, convertColors(colors), positions, ColorSpace.get(ColorSpace.Named.SRGB)); in SweepGradient() 84 public SweepGradient(float cx, float cy, @NonNull @ColorLong long[] colors, in SweepGradient() argument 86 this(cx, cy, colors.clone(), positions, detectColorSpace(colors)); in SweepGradient() 93 private SweepGradient(float cx, float cy, @NonNull @ColorLong long[] colors, in SweepGradient() argument 97 if (positions != null && colors.length != positions.length) { in SweepGradient() 103 mColorLongs = colors; in SweepGradient() 142 long[] colors, float[] positions, long colorSpaceHandle); in nativeCreate() argument
|
D | LinearGradient.java | 69 public LinearGradient(float x0, float y0, float x1, float y1, @NonNull @ColorInt int[] colors, in LinearGradient() argument 71 this(x0, y0, x1, y1, convertColors(colors), positions, tile, in LinearGradient() 92 public LinearGradient(float x0, float y0, float x1, float y1, @NonNull @ColorLong long[] colors, in LinearGradient() argument 94 this(x0, y0, x1, y1, colors.clone(), positions, tile, detectColorSpace(colors)); in LinearGradient() 102 @NonNull @ColorLong long[] colors, @Nullable float[] positions, @NonNull TileMode tile, in LinearGradient() argument 106 if (positions != null && colors.length != positions.length) { in LinearGradient() 113 mColorLongs = colors; in LinearGradient() 164 long[] colors, float[] positions, int tileMode, long colorSpaceHandle); in nativeCreate() argument
|
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/clock/ |
D | ClockPaletteTest.kt | 33 private lateinit var colors: IntArray variable in com.android.keyguard.clock.ClockPaletteTest 41 colors = IntArray(10) in setUp() 42 val step: Float = (0f - hsv[2]) / colors.size in setUp() 43 for (i in 0 until colors.size) { in setUp() 45 colors[i] = Color.HSVToColor(hsv) in setUp() 54 clockPalette.setColorPalette(false, colors) in testDark() 65 clockPalette.setColorPalette(true, colors) in testDarkText() 76 clockPalette.setColorPalette(false, colors) in testLightText()
|
/frameworks/base/packages/SystemUI/compose/core/src/com/android/compose/ |
D | PlatformButtons.kt | 41 colors = filledButtonColors(), in PlatformButton() 60 colors = outlineButtonColors(), in PlatformOutlinedButton() 88 val colors = LocalAndroidColorScheme.current in filledButtonColors() constant 90 containerColor = colors.colorAccentPrimary, in filledButtonColors() 91 contentColor = colors.textColorOnAccent, in filledButtonColors() 97 val colors = LocalAndroidColorScheme.current in outlineButtonColors() constant 99 contentColor = colors.textColorPrimary, in outlineButtonColors() 105 val colors = LocalAndroidColorScheme.current in outlineButtonBorder() constant 108 color = colors.colorAccentPrimaryVariant, in outlineButtonBorder()
|
/frameworks/libs/systemui/iconloaderlib/src/com/android/launcher3/icons/ |
D | ThemedIconDrawable.java | 121 int[] colors = getColors(context); in newDrawable() local 122 return new ThemedConstantState(info, colors[0], colors[1]).newDrawable(); in newDrawable() 130 int[] colors = new int[2]; in getColors() local 132 colors[0] = res.getColor(android.R.color.system_neutral1_800); in getColors() 133 colors[1] = res.getColor(android.R.color.system_accent1_100); in getColors() 135 colors[0] = res.getColor(android.R.color.system_accent1_100); in getColors() 136 colors[1] = res.getColor(android.R.color.system_neutral2_700); in getColors() 138 return colors; in getColors()
|
/frameworks/opt/colorpicker/src/com/android/colorpicker/ |
D | ColorPickerDialog.java | 64 public static ColorPickerDialog newInstance(int titleResId, int[] colors, int selectedColor, in newInstance() argument 67 ret.initialize(titleResId, colors, selectedColor, columns, size); in newInstance() 71 public void initialize(int titleResId, int[] colors, int selectedColor, int columns, int size) { in initialize() argument 73 setColors(colors, selectedColor); in initialize() 163 public void setColors(int[] colors, int selectedColor) { in setColors() argument 164 if (mColors != colors || mSelectedColor != selectedColor) { in setColors() 165 mColors = colors; in setColors() 171 public void setColors(int[] colors) { in setColors() argument 172 if (mColors != colors) { in setColors() 173 mColors = colors; in setColors()
|
D | ColorPickerPalette.java | 84 public void drawPalette(int[] colors, int selectedColor) { in drawPalette() argument 85 drawPalette(colors, selectedColor, null); in drawPalette() 91 public void drawPalette(int[] colors, int selectedColor, String[] colorContentDescriptions) { in drawPalette() argument 92 if (colors == null) { in drawPalette() 103 for (int color : colors) { in drawPalette()
|
/frameworks/base/libs/hwui/ |
D | NinePatchUtils.h | 57 int numFlags, const Res_png_9patch& chunk, SkColor* colors) { in SetLatticeFlags() argument 59 lattice->fColors = colors; in SetLatticeFlags() 61 sk_bzero(colors, numFlags * sizeof(SkColor)); in SetLatticeFlags() 70 colors += lattice->fXCount + 1; in SetLatticeFlags() 81 colors++; in SetLatticeFlags() 91 *colors = currentColor; in SetLatticeFlags() 96 colors++; in SetLatticeFlags()
|
/frameworks/base/core/java/com/android/internal/graphics/palette/ |
D | ColorCutQuantizer.java | 118 final int[] colors = mColors = new int[distinctColorCount]; in quantize() local 122 colors[distinctColorIndex++] = color; in quantize() 133 for (int color : colors) { in quantize() 208 ArrayList<Swatch> colors = new ArrayList<>(vboxes.size()); in generateAverageColors() local 211 colors.add(swatch); in generateAverageColors() 213 return colors; in generateAverageColors() 253 final int[] colors = mColors; in fitBox() local 264 final int color = colors[i]; in fitBox() 349 final int[] colors = mColors; in findSplitPoint() local 355 modifySignificantOctet(colors, longestDimension, mLowerIndex, mUpperIndex); in findSplitPoint() [all …]
|
/frameworks/base/core/tests/coretests/src/android/graphics/ |
D | BitmapTest.java | 87 int[] colors = new int[100]; in testGetPixelsWithAlpha() local 89 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i; in testGetPixelsWithAlpha() 92 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, in testGetPixelsWithAlpha() 104 assertEquals("getPixel", p, colors[i]); in testGetPixelsWithAlpha() 113 int[] colors = new int[100]; in testGetPixelsWithoutAlpha() local 115 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i; in testGetPixelsWithoutAlpha() 118 Bitmap bm = Bitmap.createBitmap(colors, 10, 10, Bitmap.Config.RGB_565); in testGetPixelsWithoutAlpha() 130 int[] colors = new int[100]; in testSetPixelsWithAlpha() local 132 colors[i] = (0xFF << 24) | (i << 16) | (i << 8) | i; in testSetPixelsWithAlpha() 136 Bitmap bm1 = Bitmap.createBitmap(colors, 10, 10, config); in testSetPixelsWithAlpha() [all …]
|
/frameworks/base/core/java/android/content/res/ |
D | ColorStateList.java | 174 public ColorStateList(int[][] states, @ColorInt int[] colors) { in ColorStateList() argument 176 mColors = colors; in ColorStateList() 309 final int[] colors = new int[mColors.length]; in withAlpha() local 310 final int len = colors.length; in withAlpha() 312 colors[i] = (mColors[i] & 0xFFFFFF) | (alpha << 24); in withAlpha() 315 return new ColorStateList(mStateSpecs, colors); in withAlpha() 327 final int[] colors = new int[mColors.length]; in withLStar() local 328 final int len = colors.length; in withLStar() 330 colors[i] = modulateColor(mColors[i], 1.0f /* alphaMod */, lStar); in withLStar() 333 return new ColorStateList(mStateSpecs, colors); in withLStar() [all …]
|
/frameworks/base/tests/Internal/src/com/android/internal/colorextraction/ |
D | ColorExtractorTest.java | 91 GradientColors colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM, in getColors_usesExtractedColors() local 93 assertEquals("Extracted colors not being used!", colors, colorsExpectedNormal); in getColors_usesExtractedColors() 94 colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM, ColorExtractor.TYPE_DARK); in getColors_usesExtractedColors() 95 assertEquals("Extracted colors not being used!", colors, colorsExpectedDark); in getColors_usesExtractedColors() 96 colors = extractor.getColors(WallpaperManager.FLAG_SYSTEM, ColorExtractor.TYPE_EXTRA_DARK); in getColors_usesExtractedColors() 97 assertEquals("Extracted colors not being used!", colors, colorsExpectedExtraDark); in getColors_usesExtractedColors()
|
/frameworks/base/core/java/com/android/internal/colorextraction/ |
D | ColorExtractor.java | 68 GradientColors[] colors = new GradientColors[sGradientTypes.length]; in ColorExtractor() local 69 mGradientColors.append(which, colors); in ColorExtractor() 71 colors[type] = new GradientColors(); in ColorExtractor() 172 public void onColorsChanged(WallpaperColors colors, int which) { in onColorsChanged() argument 174 Log.d(TAG, "New wallpaper colors for " + which + ": " + colors); in onColorsChanged() 178 mLockColors = colors; in onColorsChanged() 180 extractInto(colors, lockColors[TYPE_NORMAL], lockColors[TYPE_DARK], in onColorsChanged() 185 mSystemColors = colors; in onColorsChanged() 187 extractInto(colors, systemColors[TYPE_NORMAL], systemColors[TYPE_DARK], in onColorsChanged()
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | HwBitmapInCompositeShader.cpp | 59 SkColor colors[2]; in createContent() local 60 colors[0] = Color::Black; in createContent() 61 colors[1] = Color::White; in createContent() 63 center, 50, colors, nullptr, 2, SkTileMode::kRepeat); in createContent()
|
/frameworks/base/libs/hwui/jni/ |
D | Shader.cpp | 104 std::vector<SkColor4f> colors(count); in convertColorLongs() local 106 colors[i] = GraphicsJNI::convertColorLong(colorValues[i]); in convertColorLongs() 110 return colors; in convertColorLongs() 122 std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); in LinearGradient_create() local 124 AutoJavaFloatArray autoPos(env, posArray, colors.size()); in LinearGradient_create() 131 sk_sp<SkShader> shader(SkGradientShader::MakeLinear(pts, &colors[0], in LinearGradient_create() 132 GraphicsJNI::getNativeColorSpace(colorSpaceHandle), pos, colors.size(), in LinearGradient_create() 166 std::vector<SkColor4f> colors = convertColorLongs(env, colorArray); in RadialGradient_create() local 168 AutoJavaFloatArray autoPos(env, posArray, colors.size()); in RadialGradient_create() 178 endRadius, &colors[0], std::move(colorSpace), pos, colors.size(), skTileMode, in RadialGradient_create() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/scrim/ |
D | ScrimView.java | 149 public void setColors(@NonNull ColorExtractor.GradientColors colors) { in setColors() argument 150 setColors(colors, false); in setColors() 158 public void setColors(@NonNull ColorExtractor.GradientColors colors, boolean animated) { in setColors() argument 159 if (colors == null) { in setColors() 164 if (mColors.equals(colors)) { in setColors() 167 mColors.set(colors); in setColors()
|
/frameworks/base/startop/apps/ColorChanging/ |
D | README.md | 4 This app changes the colors of the screen that has traces to go along 5 with the colors.
|
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/presentation/ |
D | Cube.java | 44 int colors[] = { in Cube() local 78 ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); in Cube() 81 mColorBuffer.put(colors); in Cube()
|
/frameworks/base/core/java/android/service/wallpaper/ |
D | IWallpaperConnection.aidl | 31 void onWallpaperColorsChanged(in WallpaperColors colors, int displayId); in onWallpaperColorsChanged() argument 32 void onLocalWallpaperColorsChanged(in RectF area, in WallpaperColors colors, int displayId); in onLocalWallpaperColorsChanged() argument
|