ColorProviders

Class

Android
public sealed class ColorProviders

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

Secondary Constructors

protected constructor(
    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,
) {
    this.primary = primary
    this.onPrimary = onPrimary
    this.primaryContainer = primaryContainer
    this.onPrimaryContainer = onPrimaryContainer
    this.secondary = secondary
    this.onSecondary = onSecondary
    this.secondaryContainer = secondaryContainer
    this.onSecondaryContainer = onSecondaryContainer
    this.tertiary = tertiary
    this.onTertiary = onTertiary
    this.tertiaryContainer = tertiaryContainer
    this.onTertiaryContainer = onTertiaryContainer
    this.error = error
    this.errorContainer = errorContainer
    this.onError = onError
    this.onErrorContainer = onErrorContainer
    this.background = background
    this.onBackground = onBackground
    this.surface = surface
    this.onSurface = onSurface
    this.surfaceVariant = surfaceVariant
    this.onSurfaceVariant = onSurfaceVariant
    this.outline = outline
    this.inverseOnSurface = inverseOnSurface
    this.inverseSurface = inverseSurface
    this.inversePrimary = inversePrimary
    this.widgetBackground = widgetBackground
}
protected constructor(
    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,
) {
    this.primary = primary
    this.onPrimary = onPrimary
    this.primaryContainer = primaryContainer
    this.onPrimaryContainer = onPrimaryContainer
    this.secondary = secondary
    this.onSecondary = onSecondary
    this.secondaryContainer = secondaryContainer
    this.onSecondaryContainer = onSecondaryContainer
    this.tertiary = tertiary
    this.onTertiary = onTertiary
    this.tertiaryContainer = tertiaryContainer
    this.onTertiaryContainer = onTertiaryContainer
    this.error = error
    this.errorContainer = errorContainer
    this.onError = onError
    this.onErrorContainer = onErrorContainer
    this.background = background
    this.onBackground = onBackground
    this.surface = surface
    this.onSurface = onSurface
    this.surfaceVariant = surfaceVariant
    this.onSurfaceVariant = onSurfaceVariant
    this.outline = outline
    this.inverseOnSurface = inverseOnSurface
    this.inverseSurface = inverseSurface
    this.inversePrimary = inversePrimary
    this.widgetBackground = ColorProvider(Color.Unspecified)
}