ColorPalette

interface ColorPalette
androidx.ui.material.ColorPalette

Collection of colors in the Material color specification.

Summary

Properties

abstract Color

The background color appears behind scrollable content.

abstract Color

The error color is used to indicate error within components, such as text fields.

abstract Color

Color used for text and icons displayed on top of the background color.

abstract Color

Color used for text and icons displayed on top of the error color.

abstract Color

Color used for text and icons displayed on top of the primary color.

abstract Color

Color used for text and icons displayed on top of the secondary color.

abstract Color

Color used for text and icons displayed on top of the surface color.

abstract Color

The primary color is the color displayed most frequently across your app’s screens and components.

abstract Color

The primary variant color is used to distinguish two elements of the app using the primary color, such as the top app bar and the system bar.

abstract Color

The secondary color provides more ways to accent and distinguish your product.

abstract Color

The secondary variant color is used to distinguish two elements of the app using the secondary color.

abstract Color

The surface color is used on surfaces of components, such as cards, sheets and menus.

Properties

background

abstract val background: Color

The background color appears behind scrollable content.

error

abstract val error: Color

The error color is used to indicate error within components, such as text fields.

onBackground

abstract val onBackground: Color

Color used for text and icons displayed on top of the background color.

onError

abstract val onError: Color

Color used for text and icons displayed on top of the error color.

onPrimary

abstract val onPrimary: Color

Color used for text and icons displayed on top of the primary color.

onSecondary

abstract val onSecondary: Color

Color used for text and icons displayed on top of the secondary color.

onSurface

abstract val onSurface: Color

Color used for text and icons displayed on top of the surface color.

primary

abstract val primary: Color

The primary color is the color displayed most frequently across your app’s screens and components.

primaryVariant

abstract val primaryVariant: Color

The primary variant color is used to distinguish two elements of the app using the primary color, such as the top app bar and the system bar.

secondary

abstract val secondary: Color

The secondary color provides more ways to accent and distinguish your product. Secondary colors are best for:

  • Floating action buttons
  • Selection controls, like sliders and switches
  • Highlighting selected text
  • Progress bars
  • Links and headlines

secondaryVariant

abstract val secondaryVariant: Color

The secondary variant color is used to distinguish two elements of the app using the secondary color.

surface

abstract val surface: Color

The surface color is used on surfaces of components, such as cards, sheets and menus.