Skip to main content
Frames adopt your brand at runtime. Pass a brand color and, optionally, a theme object encoded in the URL. The entire palette, border radii, and color scheme derive from these params at request time. WCAG AA contrast is guaranteed when you pass only the brand color. Some theme overrides can lower the contrast ratio below AA, see Palette overrides. Your application code does not change. You only append params to the frame URL.

Quick start

That’s it. The frame renders with your brand applied. For more control, pass a customTheme alongside brandColor (see Custom theme).

Initialization parameters

Brand color formats

The simplest form is a six-digit hex with or without the #:
All forms above produce the same theme. Three-digit shorthand (#F60), rgba(), hsl(), and oklch() are also accepted. If the value cannot be parsed as a color, the param is ignored and the frame falls back to the default theme. No error is surfaced.

Custom theme

Pass a JSON object describing the overrides you want and append it to the URL as customTheme. Build the query string with URLSearchParams or wrap the JSON in encodeURIComponent so the frame receives a valid URL-encoded payload.

Building the URL

The frame parses the param, validates each field, applies what it understands, and ignores the rest. If the value doesn’t parse as JSON, the param is dropped and the frame falls back to the brand-color-only behavior.

Theme shape

Any field you omit keeps its default. Unknown fields are silently ignored, so the shape can grow over time without breaking existing integrations.

Border radius

borderRadius accepts a named scale. Each value maps to the full set of radii the frame uses. full makes interactive elements fully rounded while keeping larger surfaces visually bounded.

Color scheme

colorScheme controls which mode the frame renders in. Use light or dark if your app only ships one mode and you want the embedded frame to match.

Palette overrides

Optional. Use these only if you need finer control than brandColor alone provides. Example:

What gets themed

The brand color and theme overrides seed every color and radius the frame uses. The table below shows the role each part of the UI plays.

Dark mode

Dark mode is automatic. The frame respects the user’s OS prefers-color-scheme setting unless you set colorScheme to light or dark in your customTheme. Both light and dark themes are derived from the single brand color you pass, so you do not need to supply a separate dark color.

Accessibility

Every derived text and background pair meets WCAG AA contrast (4.5:1 for normal text) by default. Raise to AAA (7:1) by setting palette.minContrastRatio to "AAA" in your customTheme. If your brand color is extreme enough that the target ratio would be impossible for some role, the frame adjusts that role within a perceptually uniform color space to maintain accessibility. Your brand color itself is preserved as the accent.

Examples

OTP authentication, brand color only

Add card, rounded shape, locked to light

Identity passback, AAA contrast

Reset, fully rounded, custom status colors

Troubleshooting

The frame renders in default MoonPay colors despite passing brandColor. Check that the value parses as a color. The simplest form is a bare six-digit hex, for example brandColor=FF6B00. If you include the #, URL-encode it as %23 (brandColor=%23FF6B00). My customTheme does not apply. Verify the value parses as JSON once URL-decoded. Build the query string with URLSearchParams or wrap the JSON in encodeURIComponent so characters like {, }, ", and : are escaped. If the JSON is malformed or the field values are out of range, the entire customTheme is dropped and the frame falls back to the brand-color-only behavior. Can I pass different colors for light and dark? Not yet. Both light and dark themes are derived from the single brandColor you provide. Per-mode overrides are on the roadmap. How can I confirm theming is applied? Open browser devtools and inspect the frame’s <head>. Look for <style data-partner-theme>.... Its presence means the partner theme is active.

What’s next

Per-mode brand overrides are on the roadmap, with a separate brandColor for light and dark. The contract is additive, so you will be able to adopt it without changing existing integrations. A specific timeline will be published when it lands.