{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

DynamicTonalPaletteKt

public final class DynamicTonalPaletteKt


Summary

Public methods

static final @NonNull ColorScheme

Creates a dark dynamic color scheme.

static final @NonNull ColorScheme

Creates a light dynamic color scheme.

Public methods

dynamicDarkColorScheme

@RequiresApi
public static final @NonNull ColorScheme dynamicDarkColorScheme(@NonNull Context context)

Creates a dark dynamic color scheme.

Use this function to create a color scheme based off the system wallpaper. If the developer changes the wallpaper this color scheme will change accordingly. This dynamic scheme is a dark theme variant.

Parameters
@NonNull Context context

The context required to get system resource data.

dynamicLightColorScheme

@RequiresApi
public static final @NonNull ColorScheme dynamicLightColorScheme(@NonNull Context context)

Creates a light dynamic color scheme.

Use this function to create a color scheme based off the system wallpaper. If the developer changes the wallpaper this color scheme will change accordingly. This dynamic scheme is a light theme variant.

Parameters
@NonNull Context context

The context required to get system resource data.