Skip to main content
Primer Checkout iOS SDK is currently in beta (v3.0.0-beta.1). The API is subject to change before the stable release.
ColorOverrides lets you override individual color tokens used across the checkout UI. You pass an instance to PrimerCheckoutTheme via its colors parameter. Every property is an optional Color?. Any token you leave nil keeps the SDK’s internal default value. Light and dark appearances are resolved automatically by the SDK’s built-in design tokens, so a single override applies in both color schemes.
Override base tokens such as primerColorBrand to recolor the whole UI in one change. Override semantic tokens (text, border, icon) only when you need a specific element to differ from what its base token resolves to.

Brand and primary

Grays

Foundational neutral palette. Most semantic tokens (text, borders, icons) resolve from these.

Semantic accents

Background and text

Border colors (outlined)

Applied to outlined inputs such as the card form fields, per interaction state.

Border colors (transparent)

Used by elements with a transparent border surface, per interaction state.

Icon colors

Utility

Overriding colors

Pass a ColorOverrides instance into PrimerCheckoutTheme. Tokens you omit keep their SDK defaults.
Because light and dark values resolve through the SDK’s internal tokens, supply a dynamic Color (for example one backed by an asset catalog color set, or a UIColor with a dynamic provider) when you want different values per appearance.
Overriding a base token such as primerColorBrand cascades to every semantic token that resolves from it (focus ring, loader, selected borders), so you can recolor the checkout with a single change.

See also

PrimerTheme

The container that bundles color, shape, spacing, and typography overrides.

Shape Tokens

Override corner radius and border width tokens.

Typography Tokens

Override font, size, weight, and line height per text style.

Spacing Tokens

Override spacing and size scale tokens.