Skip to main content
Primer Checkout Android SDK is currently in beta (v3.0.0-beta). The API is subject to change before the stable release.
Two classes define all color tokens:
  • LightColorTokens — open class with 2 base tokens and 29 semantic tokens for light mode
  • DarkColorTokens — extends LightColorTokens and overrides the internal palette for dark mode. Semantic tokens resolve automatically through inheritance.
The raw palette behind the semantic tokens (primerColorGray*, primerColorRed*, primerColorBlue*, primerColorGreen*) is internal. To change a color, override the semantic token that uses it.

Base tokens (2)

Semantic tokens (29)

Resolve through base tokens and the internal palette. Override the ones you want to change.

Background

Text colors

Border colors (outlined)

Border colors (transparent)

Icon colors

Utility

Customization

Override tokens by extending LightColorTokens or DarkColorTokens:
Changing a base token affects all semantic tokens that reference it. Use PrimerTheme.appearanceMode to choose whether the light or dark set is used.