androidx.glance.color

Classes

ColorProviders

Holds a set of Glance specific ColorProvider that can be used to represent a Material 3 color scheme.

Top-level functions summary

ColorProvider
ColorProvider(day: Color, night: Color)

Returns a ColorProvider that provides day when night mode is off, and night when night mode is on.

ColorProviders
colorProviders(
    primary: ColorProvider,
    onPrimary: ColorProvider,
    primaryContainer: ColorProvider,
    onPrimaryContainer: ColorProvider,
    secondary: ColorProvider,
    onSecondary: ColorProvider,
    secondaryContainer: ColorProvider,
    onSecondaryContainer: ColorProvider,
    tertiary: ColorProvider,
    onTertiary: ColorProvider,
    tertiaryContainer: ColorProvider,
    onTertiaryContainer: ColorProvider,
    error: ColorProvider,
    errorContainer: ColorProvider,
    onError: ColorProvider,
    onErrorContainer: ColorProvider,
    background: ColorProvider,
    onBackground: ColorProvider,
    surface: ColorProvider,
    onSurface: ColorProvider,
    surfaceVariant: ColorProvider,
    onSurfaceVariant: ColorProvider,
    outline: ColorProvider,
    inverseOnSurface: ColorProvider,
    inverseSurface: ColorProvider,
    inversePrimary: ColorProvider
)
ColorProviders
colorProviders(
    primary: ColorProvider,
    onPrimary: ColorProvider,
    primaryContainer: ColorProvider,
    onPrimaryContainer: ColorProvider,
    secondary: ColorProvider,
    onSecondary: ColorProvider,
    secondaryContainer: ColorProvider,
    onSecondaryContainer: ColorProvider,
    tertiary: ColorProvider,
    onTertiary: ColorProvider,
    tertiaryContainer: ColorProvider,
    onTertiaryContainer: ColorProvider,
    error: ColorProvider,
    errorContainer: ColorProvider,
    onError: ColorProvider,
    onErrorContainer: ColorProvider,
    background: ColorProvider,
    onBackground: ColorProvider,
    surface: ColorProvider,
    onSurface: ColorProvider,
    surfaceVariant: ColorProvider,
    onSurfaceVariant: ColorProvider,
    outline: ColorProvider,
    inverseOnSurface: ColorProvider,
    inverseSurface: ColorProvider,
    inversePrimary: ColorProvider,
    widgetBackground: ColorProvider
)

Top-level functions

ColorProvider

fun ColorProvider(day: Color, night: Color): ColorProvider

Returns a ColorProvider that provides day when night mode is off, and night when night mode is on.

colorProviders

fun colorProviders(
    primary: ColorProvider,
    onPrimary: ColorProvider,
    primaryContainer: ColorProvider,
    onPrimaryContainer: ColorProvider,
    secondary: ColorProvider,
    onSecondary: ColorProvider,
    secondaryContainer: ColorProvider,
    onSecondaryContainer: ColorProvider,
    tertiary: ColorProvider,
    onTertiary: ColorProvider,
    tertiaryContainer: ColorProvider,
    onTertiaryContainer: ColorProvider,
    error: ColorProvider,
    errorContainer: ColorProvider,
    onError: ColorProvider,
    onErrorContainer: ColorProvider,
    background: ColorProvider,
    onBackground: ColorProvider,
    surface: ColorProvider,
    onSurface: ColorProvider,
    surfaceVariant: ColorProvider,
    onSurfaceVariant: ColorProvider,
    outline: ColorProvider,
    inverseOnSurface: ColorProvider,
    inverseSurface: ColorProvider,
    inversePrimary: ColorProvider
): ColorProviders

colorProviders

fun colorProviders(
    primary: ColorProvider,
    onPrimary: ColorProvider,
    primaryContainer: ColorProvider,
    onPrimaryContainer: ColorProvider,
    secondary: ColorProvider,
    onSecondary: ColorProvider,
    secondaryContainer: ColorProvider,
    onSecondaryContainer: ColorProvider,
    tertiary: ColorProvider,
    onTertiary: ColorProvider,
    tertiaryContainer: ColorProvider,
    onTertiaryContainer: ColorProvider,
    error: ColorProvider,
    errorContainer: ColorProvider,
    onError: ColorProvider,
    onErrorContainer: ColorProvider,
    background: ColorProvider,
    onBackground: ColorProvider,
    surface: ColorProvider,
    onSurface: ColorProvider,
    surfaceVariant: ColorProvider,
    onSurfaceVariant: ColorProvider,
    outline: ColorProvider,
    inverseOnSurface: ColorProvider,
    inverseSurface: ColorProvider,
    inversePrimary: ColorProvider,
    widgetBackground: ColorProvider
): ColorProviders