Package-level declarations

Functions

Link copied to clipboard
fun rememberDynamicScheme(palette: PaletteState<*>, fallback: Color, isDark: Boolean, primary: Color? = null, secondary: Color? = null, tertiary: Color? = null, neutral: Color? = null, neutralVariant: Color? = null, error: Color? = null, style: PaletteStyle = PaletteStyle.TonalSpot, contrastLevel: Double = Contrast.Default.value, specVersion: ColorSpec.SpecVersion = ColorSpec.SpecVersion.Default, platform: DynamicScheme.Platform = DynamicScheme.Platform.Default): DynamicScheme

Create and remember a DynamicScheme seeded by the image palette generated from.

Link copied to clipboard
fun rememberPainterThemeColor(painter: Painter, fallback: Color, filter: Boolean = true, cacheSize: Int = DEFAULT_CACHE_SIZE, coroutineContext: CoroutineContext = Dispatchers.Default, builder: Palette.Builder.() -> Unit = {}): Color

Create and remember the most suitable color for a UI theme in what painter draws.

Link copied to clipboard
fun <T : Any> rememberThemeColor(loader: ImageBitmapLoader<T>, input: T, fallback: Color, filter: Boolean = true, cacheSize: Int = DEFAULT_CACHE_SIZE, coroutineContext: CoroutineContext = Dispatchers.Default, builder: Palette.Builder.() -> Unit = {}): Color

Create and remember the most suitable color for a UI theme in the image loader loads for input.

Link copied to clipboard
fun <T : Any> rememberThemeColors(loader: ImageBitmapLoader<T>, input: T, fallback: Color, desired: Int = DEFAULT_DESIRED_COLORS, filter: Boolean = true, cacheSize: Int = DEFAULT_CACHE_SIZE, coroutineContext: CoroutineContext = Dispatchers.Default, builder: Palette.Builder.() -> Unit = {}): List<Color>

Create and remember the colors of the image loader loads for input, ranked by how well they would seed a UI theme.

Link copied to clipboard
fun Palette.seedColorOrNull(): Color?

The vibrant swatch of this Palette when there is one, otherwise the dominant one.

Link copied to clipboard
fun PaletteState<*>.themeColor(fallback: Color, filter: Boolean = true): Color

The scored seed color of the last successful generation of this PaletteState, or fallback.

fun Palette.themeColor(fallback: Color, filter: Boolean = true): Color

Determine the most suitable swatch of this Palette for a UI theme.

Link copied to clipboard
fun DominantColorState<*>.themeColorOrNull(filter: Boolean = true): Color?

The scored seed color of the last successful update of this DominantColorState.

fun PaletteState<*>.themeColorOrNull(filter: Boolean = true): Color?

The scored seed color of the last successful generation of this PaletteState.

fun Palette.themeColorOrNull(filter: Boolean = true): Color?

Determine the most suitable swatch of this Palette for a UI theme, or null.

Link copied to clipboard
fun Palette.themeColors(fallback: Color, desired: Int = DEFAULT_DESIRED_COLORS, filter: Boolean = true): List<Color>

Rank the swatches of this Palette by how well they would seed a UI theme, using the same scoring Android applies to wallpapers.

Link copied to clipboard
fun Palette.Swatch.toHct(): Hct

Convert this Palette.Swatch to its Hct representation.