Web App Manifest: theme_color / background_color
Published Updated
Web App Manifest: theme_color / background_color — The theme_color member sets
the color an installed PWA’s surrounding UI (such as the title bar or task switcher)
uses, and the background_color member sets the background color shown behind the
page while it loads. Per the specification, the browser fetches and processes the
manifest on every page load, and when processing succeeds it MAY apply the updated
color to the current and future application contexts associated with the app — these
members are not fixed once at install time.
Browser & ecosystem support
Section titled “Browser & ecosystem support”Support is not uniform across the two members on every engine. Per MDN’s
browser-compat-data, Chrome, Edge, and Firefox for Android support both members, desktop
Firefox supports neither, and Safari supports theme_color (macOS Safari 17, iOS Safari
15) but does not implement background_color at all.
- Legend
- Yes
- Partial
- Flag
- No
- Unknown
| Browser / Platform | Support | Versions | Confidence | Source | Notes |
|---|---|---|---|---|---|
| Chrome (Desktop) | Yes | 46 | high | source | 1 |
| Chrome (Android) | Yes | 46 | high | source | 23 |
| Edge (Desktop) | Yes | 79 | high | source | 45 |
| Firefox (Desktop) | No | — | high | source | 67 |
| Firefox (Android) | Yes | 79 | high | source | 8 |
| Safari (macOS) | Yes | 17 | high | source | 9 |
| Safari (iOS) | Yes | 15 | high | source | 10 |
| Samsung Internet | Yes | 5.0 | high | source | 1112 |
| WebView (Android) | Yes | 46 | high | source | 1314 |
| Chrome (Desktop) | Yes | 46 | high | source | 15 |
| Chrome (Android) | Yes | 46 | high | source | 1617 |
| Edge (Desktop) | Yes | 79 | high | source | 1819 |
| Firefox (Desktop) | No | — | high | source | 2021 |
| Firefox (Android) | Yes | 79 | high | source | 22 |
| Safari (macOS) | No | — | high | source | 2324 |
| Safari (iOS) | No | — | high | source | 252627 |
| Samsung Internet | Yes | 5.0 | high | source | 2829 |
| WebView (Android) | Yes | 46 | high | source | 3031 |
- Covers the `theme_color` entry.
- Covers the `theme_color` entry.
- Derived by browser-compat-data mirroring from Chrome.
- Covers the `theme_color` entry.
- Derived by browser-compat-data mirroring from Chrome.
- Covers the `theme_color` entry.
- No Firefox support is recorded in browser-compat-data.
- Covers the `theme_color` entry.
- Covers the `theme_color` entry.
- Covers the `theme_color` entry.
- Covers the `theme_color` entry.
- Derived by browser-compat-data mirroring from Chrome Android.
- Covers the `theme_color` entry.
- Derived by browser-compat-data mirroring from Chrome Android.
- Covers the `background_color` entry.
- Covers the `background_color` entry.
- Derived by browser-compat-data mirroring from Chrome.
- Covers the `background_color` entry.
- Derived by browser-compat-data mirroring from Chrome.
- Covers the `background_color` entry.
- No Firefox support is recorded in browser-compat-data.
- Covers the `background_color` entry.
- Covers the `background_color` entry.
- No Safari support is recorded in browser-compat-data.
- Covers the `background_color` entry.
- No Safari on iOS support is recorded in browser-compat-data.
- Derived by browser-compat-data mirroring from Safari.
- Covers the `background_color` entry.
- Derived by browser-compat-data mirroring from Chrome Android.
- Covers the `background_color` entry.
- Derived by browser-compat-data mirroring from Chrome Android.
How to use it
Section titled “How to use it”{ "name": "Example PWA", "theme_color": "#317EFB", "background_color": "#ffffff"}Declaring theme_color as progressive enhancement, not feature detection
Section titled “Declaring theme_color as progressive enhancement, not feature detection”The specification and MDN document theme_color and background_color as
manifest declarations. For theme_color, MDN documents a <meta name="theme-color">
element as a separate, per-document way to set the same UI color. Declaring
both the manifest member and the meta tag is a progressive-enhancement
pairing: it doesn’t detect anything, but it gives engines that don’t read
theme_color from the manifest another way to pick up the same value if
they support the meta tag.
The specification and MDN state that a user agent may override the manifest’s
background_color to support prefers-color-scheme.
Engines that don’t implement it fall back to their own user-agent-defined
behavior for the loading/splash background rather than any behavior defined
by the manifest spec.
function ensureThemeColorMeta(color) { const existing = document.querySelector('meta[name="theme-color"]'); if (existing?.content) { // A meta tag is already present — leave it as the source of truth. return; } // Declare the meta tag as a progressive-enhancement pairing with the // manifest's theme_color member. This does not confirm any engine will // apply either one — see the compatibility table above for per-engine // support. const meta = document.createElement('meta'); meta.name = 'theme-color'; meta.content = color; document.head.appendChild(meta);}Practical checklist
Section titled “Practical checklist”- Per MDN, a
<meta name="theme-color">element (optionally combined with aprefers-color-schememedia query) overrides the manifest’stheme_colorfor that document — the manifest value is only the default. - Per MDN,
background_coloris a temporary color shown before the page’s stylesheet loads (and for some splash screens); once the stylesheet loads, its background takes over. - Per the manifest spec, both members must be a CSS
<color>value that parses and resolves to a color convertible to sRGB — this permitslab(),color(display-p3 …), and other predefined color spaces, not only legacy hex/RGB/named colors. CSS custom properties and gradients are not<color>values and are not valid here. - Per MDN,
theme_color’s alpha channel may be ignored by the browser, so don’t rely on a semi-transparenttheme_coloractually rendering as transparent; MDN does not document the same alpha restriction forbackground_color. - Safari does not implement
background_colorat all, so do not rely on it there even thoughtheme_coloris supported.
Where to go next
Section titled “Where to go next”← Back to the Compatibility explorer.