Material You: A Guide to Changing Your Theme and Dynamic Color Palette

Last update: September 29, 2025
  • Master seed color extraction and expansion to 65 attributes with AOSP and CAM16 for a consistent palette.
  • Integrate Material 3 into apps and systems: roles, tokens, overlays, and DynamicColors with light/dark support.
  • Configure Android 13 and 12: system_palette, theme_style, ThemePicker, and APK stub for basic colors.

How to use Material You to customize the color palette on Android

Material You has redefined customization on Android since Android 12, taking system color and theme to a much more expressive and cohesive level. This practical and detailed guide teaches you how to change the dynamic theme and palette, how color extraction works, and how to integrate it correctly at both the system and app levels.

In addition to delving into dynamic colors, motion, and widgets , you'll see how to prepare your app for Material Design 3, how to use Material Theme Builder for Figma, and what changes to apply in Android 12 and 13. You'll also find answers to frequently asked questions, recommendations for OEMs, and key notes for developers.

What is Material You and why does it matter?

Material You (Material Design 3) is a design language that prioritizes expression, fluidity, and ecosystem-wide consistency. It maintains a minimalist approach (fewer shadows, cleaner typography, softer shapes) and provides each user with a unique experience tailored to their context and preferences.

This approach isn't limited to Pixel phones; it extends to Samsung, OnePlus, OPPO, Vivo, Realme, Xiaomi phones , tablets, watches, and other devices. Its goal is to combine deep customization with accessibility, visual consistency, and a modern motion system.

HyperOS Xiaomi customization start
Related articles:
How to customize HyperOS startup and features on Xiaomi

Dynamic color: the centerpiece

Dynamic color is at the heart of Material You: it extracts a source color from the wallpaper or a chosen color , expands it into 5 tonal palettes with 13 shades each (65 colors in total) and applies it harmoniously throughout the system and apps.

To ensure consistency, it is recommended to use the unmodified AOSP extraction logic and maintain alignment with the 65 color attributes. This way, users and developers find a stable and powerful customization story on any Android device.

How Dynamic Color Flow Works

The complete flow consists of four very clear steps, with color extraction and propagation at the center of the process:

  1. The user changes the wallpaper or selects a theme from the OEM's theme selector. That trigger activates the palette recomputation.
  2. The user chooses between different options: device theme (Android automatically selects a valid seed color) or new wallpaper and theme (AOSP extracts the seed color from the wallpaper).
  3. AOSP takes the single seed color and expands it into 5 tonal palettes (A1, A2, A3, N1, N2), each with 13 levels, thus propagating the 65 color attributes by the system.
  4. The system UI and apps apply those 65 attributes consistently. Recommendation: Use the same palette in both SysUI and OEM apps for a cohesive experience.

Algorithm details: tones, chromas and consistency

Material You uses CAM16-based transformations to ensure harmony and contrast. The seed color must have a minimum chroma of 5 in CAM16 (to prevent very dark tones from ruining the tonal expansion). You can read/write CAM16 using utilities like Cam#fromInt or Cam#getInt.

Specific chroma and tone rules apply to each tonal palette: accent1 (chroma 40 in 0, 10, 50 and 100; 48 in the rest, tone equal to that of the seed), accent2 (chroma 16, same tone), accent3 (chroma 32, tone rotated +60 degrees), neutral1 (chroma 4) and neutral2 (chroma 8), with tone equal to that of the seed.

Compatibility, Testing, and AOSP

Android 12L and later versions include dynamic color by default . Android 12 integrates the necessary patches for end-to-end logic (extraction and propagation to the 65 APIs). The CTS validates luminance and hue; you can run it with `test SystemPalette`.

If your device does not support wallpaper extraction, you can disable flag_monet and offer a theme selector with predefined palettes, ensuring customization without dynamic color.

AOSP ThemePicker: Custom Colors and APK Stub

If you use the AOSP ThemePicker, the color section appears if `flag_monet` is enabled and a system APK stub is declared in the `themes_stub_package` value. The stub only contains the resources for the basic colors and their names.

The stub structure includes an XML file in res/xml containing the array of color bundles (e.g., color1, color2, etc.) and the strings bundle_name_colorX . Additionally, you must define the values ​​for each basic color as primary/secondary pairs (e.g., color_primary_color1 and color_secondary_color1), and both must be the same color.

Recommended integration steps

Step 1: User Theme Experience

It offers a theme or wallpaper selector to match your product. With the wallpaper selector, extraction is enabled by default , but you can add more options for the user if desired.

Step 2: Seed color extraction

In Android 12, the activation path in SysUI is ThemeOverlayController (mOnColorsChangedListener) via WallpaperManager#onWallpaperColorsChanged. Use ColorScheme#getSeedColors to expose multiple seeds in the selector, not just the most frequent one.

Requires CAM16 chroma ≥ 5 for the seed color to be valid. If no valid seeds are available, use a backup seed that conforms to the guide and maintains consistency of tone and contrast.

Step 3: Expand to 65 APIs

Using the seed color, Android generates 5 palettes and 13 tonal steps per palette (0, 10, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000). It applies the Android 12 patch logic to expand correctly and comply with CTS and CDD.

Step 4: Use in apps and system UI

Integrate Material You into your own apps and SysUI. The Material guidelines explain how to map roles and tokens so that components adopt dynamic colors while maintaining accessibility and readability.

Step 5: Options in WallpaperPicker (Android 13+)

Since Android 13, accent_color has been discontinued and android.theme.customization.theme_style has been added, with styles such as TONAL_SPOT, VIBRANT, EXPRESSIVE, and SPRITZ. The JSON object in Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES sends at least 'android.theme.customization.system_palette'.

Example configuration: { 'android.theme.customization.system_palette':'B1611C', 'android.theme.customization.theme_style':'EXPRESSIVE' } . In Android 12 and earlier, 'system_palette' and 'accent_color' were used with the same seed color code.

Step 6: Add to the allowed list

Submit a ticket with your Build.MANUFACTURER so that Material Components-based apps can recognize the availability of dynamic palettes on your devices. This ensures a consistent experience for third parties.

System theme styles and tonal palettes

Android 13 adds variations of the algorithm for contrast and expression needs: TONAL_SPOT (default), VIBRANT (subtle high intensity), EXPRESSIVE (high intensity with unexpected accents), SPRITZ (low intensity, desaturated appearance), RAINBOW and FRUIT_SALAD (intended for static themes, not recommended with extraction from wallpaper).

WhatsApp new colors
Related articles:
WhatsApp adds a wider color palette to personalize chats

Dynamic tonal palettes are exposed as resources in R.color with names like system_accent1_10 up to 13 indices. The system generates the hue and chroma at runtime from the seed.

Mappings of roles and topic attributes

Material 3 defines a set of roles that are assigned to Android theme attributes, with variations for light and dark themes . Some key examples (summarized):

Role Attribute Clear Dark
Home colorPrimary system_accent1_600 system_accent1_200
On main colorOnPrimary system_accent1_0 system_accent1_800
Secondary colorSecondary system_accent2_600 system_accent2_200
On secondary colorOnSecondary system_accent2_0 system_accent2_800
Background android:colorBackground system_neutral1_10 system_neutral1_900
On background colorOnBackground system_neutral1_900 system_neutral1_100
In total area colorSurface system_neutral1_10 system_neutral1_900
On the surface colorOnSurface system_neutral1_900 system_neutral1_100

In addition, there are state attributes (e.g., colorPrimaryStateContent, colorOnSurfaceVariantStateLayer) that are derived from the same roles, ensuring consistency in pressed, focused, or disabled states.

Movement: displacement and wave

The smooth movement gives it a premium feel. Android 12 introduced a stretching overscroll feature that reacts when you try to scroll beyond the edge of a list.

Consistency guidelines: On devices with ActivityManager.isHighEndGfx() true, use non-linear stretching ; on more modest hardware, simplify to linear stretching to reduce load.

To support horizontal scrolling in custom views, update to the latest libraries: androidx.recyclerview:recyclerview 1.3.0-alpha01, androidx.core 1.7.0-alpha01 (NestedScrollView and EdgeEffectCompat), and androidx.viewpager 1.1-alpha01.

In designs using EdgeEffect, while stretching the viewport, you should not interact with the content ; capturing the animation and manipulating the stretch is done with EdgeEffectCompat.getDistance() and onPullDistance(). In nested scrolling, the stretch should first consume the gesture to avoid unwanted scrolling.

The touch ripple in Android 12 is smoother and more subtle. It doesn't require additional integration, but it's advisable to check for any device-specific regressions.

Widgets: APIs and Updates

Widgets are key in Android, and Android 12 expanded the APIs for size, layout, and parameters like corner radius . Your operating system must properly expose these APIs and allow you to resize and configure widgets.

In your own apps, take advantage of the new features to update or create widgets . Prioritizing them according to the platform guidelines improves consistency with Material You.

Design with Material Theme Builder and tokens

Material Theme Builder (Figma and web version) makes it easy to create accessible brand themes and combine them with dynamic color. It allows you to define key colors (primary, secondary, tertiary, neutrals) and generates light/dark color palettes, tokens, and code export.

Design tokens replace static values ​​with semantic names, creating a common language between design and development. You can extend the scheme with custom colors (e.g., Custom0) for specific semantics or products without breaking the system.

Color hierarchy matters: more saturated tones attract more attention , so reserve the primary color for calls to action, and use secondary/tertiary colors to balance and direct the gaze.

Figma Codelab: Essential Steps

Log in or create an account on Figma, duplicate the lab file, and install the Material Theme Builder plugin . The document is organized into sections with sequential concepts and exercises; follow the order to understand the roles, tokens, and application of the theme.

Introduce your brand's primary color; the other colors will follow. Add secondary and tertiary colors for more color expression. Assign neutrals to surfaces and text. Switch themes in the plugin panel and apply styles to custom components if needed.

To expand beyond the core scheme, add custom colors (Custom#) from the plugin's modal. You can rename them in Figma's style panel and assign them to specific tags or components.

Update an Android app to Material 3

Before applying dynamic color, update dependencies (com.google.android.material to the latest version), and use compileSdkVersion/targetSdkVersion 31 or higher. Change the base theme from Theme.MaterialComponents.* to Theme.Material3.*.

Verify that the inherited attributes still make sense and migrate any custom styles that are now standard in M3. You can generate a complete theme with Material Theme Builder and copy values/colors.xml and values-night/themes.xml, adjusting the theme name accordingly.

If you're targeting Android 12, remember to explicitly declare android:exported in your main AndroidManifest activity to meet system requirements.

Apply dynamic color in the app

With the Material 3 theme in use, enable dynamic colors globally using ` DynamicColors.applyToActivitiesIfAvailable` in your Application class. This registers ActivityLifecycleCallbacks and applies the system-generated ThemeOverlay.

If you need to force brand nuances, define a theme overlay (ThemeOverlay.Material3.DynamicColors.Light/Dark/DayNight) assigning colorPrimary, onPrimary, primaryContainer and onPrimaryContainer to your tones, and pass it as the second parameter to applyToActivitiesIfAvailable.

For custom attributes (for example, a custom iconColor), reference system palettes like @android:color/system_accent2_600 in your overlay. Place resources in folders with -v31 if your minSdk is less than 31.

Seed color sources and accessibility

The seed color can come from the wallpaper (quantization), your app's content, or a user-selected color. The system manipulates hue and chroma to generate five key colors and their palettes. The goal is to maintain high contrast and readability, including compatibility with dark mode and various contrast levels.

If you already have well-defined brand colors, you can import them into Theme Builder to generate accessible and consistent color palettes for M3. There's also a visualizer to check results with different images.

Ecosystem compatibility and tools

Google confirmed the arrival of dynamic colors to skins like One UI, OxygenOS, ColorOS, OriginOS, and MIUI, offering a consistent experience across manufacturers. Even Gmail adapts its appearance on several representative models.

If you don't have a compatible device handy, try dynamic themes in your browser with Material Theme Builder; you can upload your own background to see the resulting palette.

Practical note: Some third-party theming tools may conflict with the system palette . If your custom theme disables or forces a palette option, check your OEM overlay priorities and settings.

FAQ

Does color extraction trigger automatically when the wallpaper changes? With Android 12 patches, yes: ThemeOverlayController#mOnColorsChangedListener via WallpaperManager handles the event automatically.

What happens with live or video backgrounds? Extraction is applied when setting the wallpaper or after a screen power-on cycle; the last WallpaperColors event is applied upon power-up.

Can I display multiple seeds in the selector? Yes, use ColorScheme#getSeedColors to list options in addition to the most frequent one.

And the themed icons? They weren't part of the stable Android 12 release. They weren't included in the patches mentioned for that version.

Can the Google Wallpapers app be used with color previews? Yes, by following the integration instructions. WallpaperPicker2 and Launcher3 render the preview; WallpaperSectionController manages the display, and GridCustomizationsProvider exposes data via ContentProvider.

Foldable Devices: Design Considerations

On foldable screens, ergonomics change: the top 25% can be difficult to reach when the screen is unfolded. Distribute content according to comfortable reach and relevance.

Avoid placing critical controls over the central hinge . It is suggested to reserve approximately 48 dp around that area to avoid hindering interaction.

In landscape mode, place the main navigation on the left and distribute content across two columns , adjusting the hinge spacing. In portrait mode, prioritize a wide column to maintain readability.

Implementation keys in Android 13 and 12

In Android 13, configure the system_palette in Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES and, optionally, the theme_style (TONAL_SPOT, VIBRANT, EXPRESSIVE, SPRITZ, or other static theme-oriented themes).

In Android 12 and earlier, if you use a custom theme selector, send the same JSON setting with the same system_palette and accent_color values ​​to skip the extraction in step 2 and expand directly to step 3.

View news on Google Discover
Related articles:
How to turn off Google Discover and customize your interests to the fullest

Material You allows for deep yet controlled customization : you can use automatic color extraction from the background or start with brand colors, always ensuring contrast, legibility, and consistency. When properly integrated (AOSP/CTS/overlays), dynamic color enhances the UX without compromising visual identity and opens the door to more personalized experiences across the entire Android ecosystem. Share this guide so more users can learn how to use Material You to personalize Android.