Skip to content

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.

LevelWhere you type itApplies to
ThemeThe theme’s Global Mobile Override field, in Administration › Interfaces › ThemesThe whole mobile app, for people using that theme
View: list Since 1.10View › Web settings › Mobile theme override (JSON) › Listing theme (JSON)The view’s list of records
View: form Since 1.10Same place, Create/edit theme (JSON)The view’s create and edit forms
View: details Since 1.10Same place, Details theme (JSON)One record’s details screen
Page Since 1.10The 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.

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, secondary and tertiary also recalculate the lighter and darker tones the app derives from them. At view and page level, only the colours you name change.

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 #RRGGBBAA puts transparency last.
  • Sizes (border_radius, elevation) are plain numbers, zero or more, such as 8. 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.

These keys set the app’s main colours. They follow Material Design colour roles.

KeyWhat it colours
primaryMain brand colour. It also colours the top bar and the status bar.
on_primaryText and icons on primary
secondarySecond brand colour
on_secondaryText and icons on secondary
tertiaryAccent colour
on_tertiaryText and icons on tertiary
errorErrors
on_errorText and icons on error
surfaceScreen background
on_surfaceNormal text and icons
on_surface_variantMuted text and icons
surface_container_lowest to surface_container_highestBackground tones for raised areas: surface_container_lowest, surface_container_low, surface_container, surface_container_high, surface_container_highest
outlineBorders
outline_variantSubtle borders and dividers
shadowShadows
scrimThe 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”
ComponentKeys
inputborder_color, focused_border_color, fill_color, border_radius
button.textforeground, background, border_radius
button.elevatedforeground, background, border_radius
button.filledforeground, background, border_radius
button.outlinedforeground, border_color, border_radius
app_barbackground, foreground, elevation
dialogborder_radius
cardbackground, border_radius, elevation
snack_barbackground

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.

ExtensionKeys
colorssuccess, warning, warning_container
sheetbackground_color
data_table_extrasticky_header_background

extensions.colors is a different object from the top-level colors. It accepts only the three keys above.

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"
}
}
}

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" }
}
}
}

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"
}
}
}
  1. Save the theme, view or page.
  2. Open the screen in the mobile app, in light mode and in dark mode.
  3. If nothing changed, check the troubleshooting table below.
ProblemWhat 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.

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