Override mobile app colours per view and page
Section titled “Override mobile app colours per view and page”This how-to is for builders who want the mobile app to use different colours from the web. You can recolour the whole app for a theme, or only one view’s list, form or details screen, or only one page. All four use the same JSON format. This page lists every key the mobile app reads, the value each key takes, and which override wins when several apply.
You need:
- Access to Administration with the right to edit views and pages. For the theme level, the right to edit Administration › Interfaces › Themes.
- The mobile app, to check the result. You can also use Preview a page on a phone.
The web app ignores these overrides. To style the web app, see Style a view with custom CSS.
Where each override goes
Section titled “Where each override goes”| Level | Where you type it | Applies to |
|---|---|---|
| Theme | The theme’s Global Mobile Override field, in Administration › Interfaces › Themes | The whole mobile app, for people using that theme |
View: list Since 1.10 | View › Web settings › Mobile theme override (JSON) › Listing theme (JSON) | The view’s list of records |
View: form Since 1.10 | Same place, Create/edit theme (JSON) | The view’s create and edit forms |
View: details Since 1.10 | Same place, Details theme (JSON) | One record’s details screen |
Page Since 1.10 | The page’s settings, Mobile theme override (JSON) | That page |
To open a view’s settings, see Data Views & Faces. To open a page’s settings, see Pages & Widgets. For the theme, see Look and feel.
The view and page boxes check your JSON when you leave the box. If it is not valid JSON, the box shows JSON not valid. Leave a box empty to use no override.
How overrides combine
Section titled “How overrides combine”flowchart LR A["Built-in tenant colours"] --> B["Theme: Global Mobile Override"] B --> C["Page override"] B --> D["View override: list, form or details"]
- The theme override is applied first, on top of the app’s built-in colours.
- A view or page override is applied on top of the theme around it. It changes only the keys you write. Every other key keeps the theme’s value.
- So for any key, the most specific override wins: a view’s or page’s value beats the theme’s value.
- At the theme level,
primary,secondaryandtertiaryalso recalculate the lighter and darker tones the app derives from them. At view and page level, only the colours you name change.
The JSON format
Section titled “The JSON format”The JSON has one object for the light look and one for the dark look. The app
uses light in light mode and dark in dark mode. Leave one out to change
nothing in that mode.
{ "light": { "colors": { }, "components": { }, "extensions": { } }, "dark": { "colors": { }, "components": { }, "extensions": { } }}Every part is optional. Write only what you want to change.
Value formats:
- Colours are strings in the form
"#RRGGBB", or"#AARRGGBB"with the transparency first."#80000000"is black at 50 %. This is not the CSS order, where#RRGGBBAAputs transparency last. - Sizes (
border_radius,elevation) are plain numbers, zero or more, such as8. Do not put them in quotes and do not add units. - The app silently skips a colour it cannot read, a negative number, and any key it does not know. If the whole text is not valid JSON, the app ignores the override.
colors: the main colour roles
Section titled “colors: the main colour roles”These keys set the app’s main colours. They follow Material Design colour roles.
| Key | What it colours |
|---|---|
primary | Main brand colour. It also colours the top bar and the status bar. |
on_primary | Text and icons on primary |
secondary | Second brand colour |
on_secondary | Text and icons on secondary |
tertiary | Accent colour |
on_tertiary | Text and icons on tertiary |
error | Errors |
on_error | Text and icons on error |
surface | Screen background |
on_surface | Normal text and icons |
on_surface_variant | Muted text and icons |
surface_container_lowest to surface_container_highest | Background tones for raised areas: surface_container_lowest, surface_container_low, surface_container, surface_container_high, surface_container_highest |
outline | Borders |
outline_variant | Subtle borders and dividers |
shadow | Shadows |
scrim | The dark layer behind dialogs and sheets |
Two older names still work: accent means tertiary, and title_blue means
secondary. When both are given, the new name wins.
components: buttons, inputs, bars and cards
Section titled “components: buttons, inputs, bars and cards”| Component | Keys |
|---|---|
input | border_color, focused_border_color, fill_color, border_radius |
button.text | foreground, background, border_radius |
button.elevated | foreground, background, border_radius |
button.filled | foreground, background, border_radius |
button.outlined | foreground, border_color, border_radius |
app_bar | background, foreground, elevation |
dialog | border_radius |
card | background, border_radius, elevation |
snack_bar | background |
button holds the four button kinds as nested objects:
"button": { "elevated": { "background": "#1479FF" } }.
If you set both colors.primary and components.app_bar.background, the top
bar uses app_bar.background.
extensions: status colours and sheets
Section titled “extensions: status colours and sheets”| Extension | Keys |
|---|---|
colors | success, warning, warning_container |
sheet | background_color |
data_table_extra | sticky_header_background |
extensions.colors is a different object from the top-level colors. It
accepts only the three keys above.
Examples
Section titled “Examples”Theme level: brand colours for the whole app
Section titled “Theme level: brand colours for the whole app”Type this in the theme’s Global Mobile Override field:
{ "light": { "colors": { "primary": "#0B5394", "on_primary": "#FFFFFF", "secondary": "#6FA8DC", "tertiary": "#E69138" }, "components": { "button": { "elevated": { "border_radius": 8 }, "outlined": { "border_radius": 8 } }, "input": { "border_radius": 8 } }, "extensions": { "colors": { "success": "#2E7D32", "warning": "#F9A825" } } }, "dark": { "colors": { "primary": "#6FA8DC", "on_primary": "#0B2540", "secondary": "#9FC5E8", "tertiary": "#F6B26B" } }}View list: a calmer list screen
Section titled “View list: a calmer list screen”Type this in Listing theme (JSON):
{ "light": { "colors": { "surface": "#F7F9FC" }, "components": { "card": { "background": "#FFFFFF", "border_radius": 12, "elevation": 1 } } }, "dark": { "colors": { "surface": "#121417" }, "components": { "card": { "background": "#1E2126", "border_radius": 12, "elevation": 0 } } }}View form: make the inputs and the save button stand out
Section titled “View form: make the inputs and the save button stand out”Type this in Create/edit theme (JSON):
{ "light": { "components": { "input": { "border_color": "#B0BEC5", "focused_border_color": "#0B5394", "fill_color": "#FFFFFF", "border_radius": 10 }, "button": { "elevated": { "background": "#0B5394", "foreground": "#FFFFFF" } } } }, "dark": { "components": { "input": { "border_color": "#455A64", "focused_border_color": "#6FA8DC", "fill_color": "#1E2126" } } }}View details: a coloured top bar for one record type
Section titled “View details: a coloured top bar for one record type”Type this in Details theme (JSON):
{ "light": { "components": { "app_bar": { "background": "#7B1FA2", "foreground": "#FFFFFF", "elevation": 0 } }, "extensions": { "sheet": { "background_color": "#F3E5F5" } } }, "dark": { "components": { "app_bar": { "background": "#4A148C", "foreground": "#FFFFFF" } } }}Page: a campaign page in its own colours
Section titled “Page: a campaign page in its own colours”Type this in the page’s Mobile theme override (JSON):
{ "light": { "colors": { "primary": "#C62828", "on_primary": "#FFFFFF", "surface": "#FFF8F6" }, "components": { "card": { "border_radius": 16 }, "snack_bar": { "background": "#B71C1C" } } }, "dark": { "colors": { "primary": "#EF9A9A", "on_primary": "#3B0909", "surface": "#1A1212" } }}Check your result
Section titled “Check your result”- Save the theme, view or page.
- Open the screen in the mobile app, in light mode and in dark mode.
- If nothing changed, check the troubleshooting table below.
Troubleshooting
Section titled “Troubleshooting”| Problem | What to check |
|---|---|
| Nothing changes. | The JSON must start with light or dark. A bare {"colors": …} is ignored. |
| It works in light mode but not in dark mode. | Add a dark object. Each mode uses only its own object. |
| One colour is ignored. | Use #RRGGBB or #AARRGGBB. Names like red, short forms like #F00, and rgb() are skipped. |
| A colour is far too transparent or the wrong colour. | With 8 digits, transparency comes first: #AARRGGBB. |
| A size is ignored. | Write it as a number without quotes or units: 8, not "8px". |
| A button keeps its old colour. | Check the button kind: text, elevated, filled or outlined. An outlined button has no background key. |
| The page or view override hides the theme’s change. | That is expected. The more specific override wins for every key it sets. |
See also
Section titled “See also”- Style a view with custom CSS: the web side of a view’s look.
- Brand the platform
- Look and feel: themes, fonts and icons
- Pages & Widgets
- Tenant settings reference: themes
Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27