ColorOverrides lets you override individual color tokens used across the checkout UI. You pass one instance to PrimerCheckoutTheme as colors for light mode and, optionally, another as darkColors for dark mode.
Every property is an optional Color?. Any token you leave nil keeps the SDK’s default for that appearance. colors applies only in light mode and darkColors only in dark mode. A token you set in colors does not carry over to dark mode: anything you leave nil in darkColors uses Primer’s dark default.
The tables list the light and dark defaults as #RRGGBBAA hex values.
Override
primerColorBrand to recolor buttons, focus borders, loaders and selected states in one change. It applies to light mode through colors and to dark mode through darkColors. Override a more specific token only when one element must differ from the token it follows.Brand and primary
Background and text
Border colors (outlined)
Borders of inputs, payment method rows, saved cards and outlined buttons, per state.Border colors (transparent)
Reserved for elements with a transparent border. No component reads these tokens.Icon colors
Utility
Overriding colors
Pass aColorOverrides instance as colors for light mode and another as darkColors for dark mode. Tokens you omit keep the SDK default for that appearance.
colors or darkColors):
primerColorBrandalso movesprimerColorFocus,primerColorLoader,primerColorBorderOutlinedSelected,primerColorBorderOutlinedFocusandprimerColorBorderTransparentFocus.primerColorFocusmovesprimerColorBorderOutlinedFocusandprimerColorBorderTransparentFocus.primerColorBackgroundPrimarymovesprimerColorBackgroundOutlinedDefault.primerColorTextPrimarymovesprimerColorTextOutlinedDefault.- A
nilprimerColorOnBrandusesprimerColorBackgroundPrimary.
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.