ThemePalettePicker

fun ThemePalettePicker(preferences: ThemePreferencesState, seasonalThemesUnlocked: Boolean, onDynamicPaletteSelected: (variant: Int) -> Unit, onStaticPaletteSelected: (id: String, seasonal: Boolean) -> Unit, modifier: Modifier = Modifier, onPaletteTabSelected: (page: Int) -> Unit = {}, supportsDynamicColors: Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.S, horizontalPadding: Dp = SizeConstants.LargeSize)(source)

The color palette choice that the theme settings page and the onboarding theme page both show. With wallpaper colors (supportsDynamicColors, Android 12 and later) it is two tabs over a pager, the wallpaper color variants and the static palettes; without them, the static palettes alone.

Swatches follow the theme the app is drawn in, which can differ from the system's. A holiday palette shows in its season with a badge, all year once seasonalThemesUnlocked, and always while it is the one selected. Each row opens scrolled to its selection.

Parameters

onStaticPaletteSelected

Called with the palette id and whether it is a holiday palette in its season.

onPaletteTabSelected

Called with the page a tab opens, WALLPAPER_PALETTE_PAGE or OTHER_PALETTE_PAGE, for a caller that logs it.

horizontalPadding

Inset of the tabs and of the rows' first and last swatch.