object ColorTokens


Class holding color scheme as defined by the Wear Material3 color specification.

Summary

Constants

const Int

Static color used behind scrollable content like text, cards and buttons, not to be confused with surface (which can change through color and elevation).

const Int
ERROR = 1

Indicates remove, delete, close or dismiss actions, such as Swipe to Reveal.

const Int

Indicates errors or emergency actions, such as safety alerts.

const Int

Used for text, cards, buttons and icons shown against the background color.

const Int

Used for text and icons on the error color.

const Int

Used for text and icons on the error color.

const Int

Text and icons shown against the primary color

const Int

Contrast-passing colour shown against the primary container

const Int

Text and icons shown against the secondary color

const Int

Contrast-passing color shown against the secondary container

const Int

Text and icons shown against the surface color

const Int

On-surface variant for text and icons shown against the surface color where 3:1 contrast ratio isn’t required, a disabled state, or non-interactive icon.

const Int

Text and icons shown against the tertiary color

const Int

Contrast-passing color shown against the tertiary container

const Int
OUTLINE = 14

Subtle color used for borders like outline buttons

const Int

Outline-variant is used to define the border of a component where 3:1 contrast ratio isn’t required, a container, or a divider.

const Int
PRIMARY = 16

Main color used across screens and components

const Int

Standout container color for key components

const Int

Less prominent color, for components and screens

const Int

Accent color used across screens and components

const Int

Less prominent container color, for components like tonal buttons

const Int

Less prominent accent color, for components and screens

const Int

Container colour for tonal buttons, cards, or any component sitting above the background.

const Int

Container colour for tonal buttons, cards, or any component sitting above the background.

const Int

Container colour for tonal buttons, cards, or any component sitting above the background.

const Int

Accent color used across screens and components

const Int

Contrasting container color, for components like selection toggles and buttons

const Int

Less prominent accent color, for components and screens

Constants

BACKGROUND

Added in 1.3.0-alpha02
const val BACKGROUND = 0: Int

Static color used behind scrollable content like text, cards and buttons, not to be confused with surface (which can change through color and elevation). For watch this is best for battery life and contrast of other colors.

ERROR

Added in 1.3.0-alpha02
const val ERROR = 1: Int

Indicates remove, delete, close or dismiss actions, such as Swipe to Reveal. Added as a container alternative that is slightly less alarming and urgent than the default error color.

ERROR_CONTAINER

Added in 1.3.0-alpha02
const val ERROR_CONTAINER = 2: Int

Indicates errors or emergency actions, such as safety alerts. This color is for use-cases that are more alarming and urgent than the default errorContainer color.

ON_BACKGROUND

Added in 1.3.0-alpha02
const val ON_BACKGROUND = 3: Int

Used for text, cards, buttons and icons shown against the background color.

ON_ERROR

Added in 1.3.0-alpha02
const val ON_ERROR = 4: Int

Used for text and icons on the error color.

ON_ERROR_CONTAINER

Added in 1.3.0-alpha02
const val ON_ERROR_CONTAINER = 5: Int

Used for text and icons on the error color.

ON_PRIMARY

Added in 1.3.0-alpha02
const val ON_PRIMARY = 6: Int

Text and icons shown against the primary color

ON_PRIMARY_CONTAINER

Added in 1.3.0-alpha02
const val ON_PRIMARY_CONTAINER = 7: Int

Contrast-passing colour shown against the primary container

ON_SECONDARY

Added in 1.3.0-alpha02
const val ON_SECONDARY = 8: Int

Text and icons shown against the secondary color

ON_SECONDARY_CONTAINER

Added in 1.3.0-alpha02
const val ON_SECONDARY_CONTAINER = 9: Int

Contrast-passing color shown against the secondary container

ON_SURFACE

Added in 1.3.0-alpha02
const val ON_SURFACE = 10: Int

Text and icons shown against the surface color

ON_SURFACE_VARIANT

Added in 1.3.0-alpha02
const val ON_SURFACE_VARIANT = 11: Int

On-surface variant for text and icons shown against the surface color where 3:1 contrast ratio isn’t required, a disabled state, or non-interactive icon.

ON_TERTIARY

Added in 1.3.0-alpha02
const val ON_TERTIARY = 12: Int

Text and icons shown against the tertiary color

ON_TERTIARY_CONTAINER

Added in 1.3.0-alpha02
const val ON_TERTIARY_CONTAINER = 13: Int

Contrast-passing color shown against the tertiary container

OUTLINE

Added in 1.3.0-alpha02
const val OUTLINE = 14: Int

Subtle color used for borders like outline buttons

OUTLINE_VARIANT

Added in 1.3.0-alpha02
const val OUTLINE_VARIANT = 15: Int

Outline-variant is used to define the border of a component where 3:1 contrast ratio isn’t required, a container, or a divider.

PRIMARY

Added in 1.3.0-alpha02
const val PRIMARY = 16: Int

Main color used across screens and components

PRIMARY_CONTAINER

Added in 1.3.0-alpha02
const val PRIMARY_CONTAINER = 17: Int

Standout container color for key components

PRIMARY_DIM

Added in 1.3.0-alpha02
const val PRIMARY_DIM = 18: Int

Less prominent color, for components and screens

SECONDARY

Added in 1.3.0-alpha02
const val SECONDARY = 19: Int

Accent color used across screens and components

SECONDARY_CONTAINER

Added in 1.3.0-alpha02
const val SECONDARY_CONTAINER = 20: Int

Less prominent container color, for components like tonal buttons

SECONDARY_DIM

Added in 1.3.0-alpha02
const val SECONDARY_DIM = 21: Int

Less prominent accent color, for components and screens

SURFACE_CONTAINER

Added in 1.3.0-alpha02
const val SURFACE_CONTAINER = 22: Int

Container colour for tonal buttons, cards, or any component sitting above the background.

SURFACE_CONTAINER_HIGH

Added in 1.3.0-alpha02
const val SURFACE_CONTAINER_HIGH = 23: Int

Container colour for tonal buttons, cards, or any component sitting above the background. Slightly higher contrast to the background than surface. Surface variant for surface colour containing text and icons where 3:1 contrast ratio isn’t required, a disabled state, or non-interactive icon.

SURFACE_CONTAINER_LOW

Added in 1.3.0-alpha02
const val SURFACE_CONTAINER_LOW = 24: Int

Container colour for tonal buttons, cards, or any component sitting above the background. Slightly lower contrast to the background than surface.

TERTIARY

Added in 1.3.0-alpha02
const val TERTIARY = 25: Int

Accent color used across screens and components

TERTIARY_CONTAINER

Added in 1.3.0-alpha02
const val TERTIARY_CONTAINER = 26: Int

Contrasting container color, for components like selection toggles and buttons

TERTIARY_DIM

Added in 1.3.0-alpha02
const val TERTIARY_DIM = 27: Int

Less prominent accent color, for components and screens