Theming the hosted page
The hosted page carries your branding: display name, logo, colours, corner radius, button style, font family and some of the wording. The field-by-field list is in the theme schema.
Where a theme comes from
Section titled “Where a theme comes from”Three layers merge, later ones winning field by field. Palettes and copy merge one level deeper, so a workflow can change one colour without repeating the rest.
- The rightful default (below).
- Your app’s theme:
PUT /v1/theme. - The workflow’s
ui.theme, for one workflow that needs to look different.
POST /v1/workflows/validate returns the effective_theme after merging.
What you cannot change
Section titled “What you cannot change”- The logo must be a base64
data:URI (PNG, JPEG, WebP or SVG) of at most 200 KB. The page loads nothing from other hosts, so a logo URL is not accepted. - Colours are
#RRGGBB. - Copy is plain text, 1 to 300 characters, with no
<or>, for these keys only:eyebrow,title,intro,done_title,done_help,continue_label. It is given per locale:{"en": {"title": "…"}, "fr": {"title": "…"}}. A page in a language your copy doesn’t cover uses rightful’s own wording in that language, never your English, so give each key in every language your workflow allows (ui.locales). support_emailis accepted and stored, but the hosted page does not show it yet.
Colour modes
Section titled “Colour modes”mode is light, dark or auto (follow the person’s device). Give a light and a dark palette; each has eight colours: primary, primary_text, background, surface, text, muted, border and header. Anything you leave out comes from the default.
The default theme:
| Colour | Light | Dark |
|---|---|---|
primary |
#0B1F3A |
#34D399 |
primary_text |
#FFFFFF |
#052019 |
background |
#F6F8FA |
#0A1424 |
surface |
#FFFFFF |
#101C30 |
text |
#0B1F3A |
#E8EEF6 |
muted |
#5B6576 |
#8A97AA |
border |
#E3E8EF |
#24324A |
header |
#FFFFFF |
#0A1424 |
The default also sets mode: "light", font: "manrope", radius: 8 and button_style: "solid".
primary colours the main button and, once you set it, every accent on the page: the step bar, the focus ring, ticks and icons. While primary is the default, those accents use rightful’s green. Status colours (done, needs attention) are the same for every app.
manrope (the default) is served by the hosted page itself, from the same origin as the page; nothing is fetched from a font host. Arabic and Amharic text uses the device’s own font. The other choices use a family that is already on the person’s device: system is the platform UI font, inter uses Inter only if it is installed locally, then falls back to the system font. The others are serif, rounded and mono.
radius (0 to 28) sets the corners of buttons and fields; cards use radius + 4. button_style is solid, outline or pill and applies to every primary button on the page.
Examples
Section titled “Examples”A small theme that only sets the brand colour in both modes:
{"display_name": "Pendah", "mode": "auto", "font": "system", "radius": 12, "button_style": "solid", "light": {"primary": "#0F7B4F", "primary_text": "#FFFFFF"}, "dark": {"primary": "#3DDC97", "primary_text": "#04140D"}}A full light palette, with wording in English and French:
{"display_name": "examina.io", "mode": "light", "font": "inter", "radius": 10, "button_style": "solid", "light": {"primary": "#007F82", "primary_text": "#FFFFFF", "background": "#F3F7F9", "surface": "#FFFFFF", "text": "#162838", "muted": "#596B7A", "border": "#DBE4EB", "header": "#FFFFFF"}, "copy": {"en": {"eyebrow": "examina.io identity check"}, "fr": {"eyebrow": "Vérification d’identité examina.io"}}}A dark-only theme with rounded type, pill buttons and its own end-of-check wording:
{"display_name": "Introcall", "mode": "dark", "font": "rounded", "radius": 18, "button_style": "pill", "dark": {"primary": "#8B7CFF", "primary_text": "#0D0B1F", "background": "#0D0B1F", "surface": "#17142E", "text": "#F1EEFF", "muted": "#A9A3C9", "border": "#2B2650", "header": "#120F27"}, "copy": {"en": {"title": "Quick check before your interview", "done_title": "You're all set", "done_help": "Head back to Introcall to start your interview."}, "fr": {"title": "Petite vérification avant votre entretien", "done_title": "Tout est prêt", "done_help": "Retournez sur Introcall pour commencer votre entretien."}}}Set it with:
curl -X PUT https://api.rightful.id/v1/theme \ -H "Authorization: Bearer $RIGHTFUL_KEY" -H 'Content-Type: application/json' \ -d @theme.json