diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php
index a5336b1585a0ca4bf33d48bc8cff3f7e157aec55..43d692c036412bc8ddd65b4fad2bf6fb4d6ab3f9 100644
--- a/core/templates/layout.base.php
+++ b/core/templates/layout.base.php
@@ -9,6 +9,7 @@
 		</title>
 		<meta http-equiv="X-UA-Compatible" content="IE=edge">
 		<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
+		<meta name="theme-color" content="<?php p($theme->getMailHeaderColor()); ?>">
 		<link rel="shortcut icon" type="image/png" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>">
 		<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
 		<?php foreach ($_['cssfiles'] as $cssfile): ?>
diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php
index 0557e89ce710c3b283b3406a25e13eff28c62b3b..0fd7521271d1485ccfea4bfc9f9aad427695314a 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -10,6 +10,7 @@
 		<meta http-equiv="X-UA-Compatible" content="IE=edge">
 		<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0">
 		<meta name="apple-itunes-app" content="app-id=<?php p($theme->getiTunesAppId()); ?>">
+		<meta name="theme-color" content="<?php p($theme->getMailHeaderColor()); ?>">
 		<link rel="shortcut icon" type="image/png" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>">
 		<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path('', 'favicon-touch.png')); ?>">
 		<?php foreach($_['cssfiles'] as $cssfile): ?>
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index 61f164719d0cc959b21ec2c10e1d4f5d33caff83..2f93a30ba6a1336ebc65ef52e541111a8ebaba5e 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -21,6 +21,7 @@
 		<meta name="apple-mobile-web-app-status-bar-style" content="black">
 		<meta name="apple-mobile-web-app-title" content="<?php p((!empty($_['application']) && $_['appid']!='files')? $_['application']:'ownCloud'); ?>">
 		<meta name="mobile-web-app-capable" content="yes">
+		<meta name="theme-color" content="<?php p($theme->getMailHeaderColor()); ?>">
 		<link rel="shortcut icon" type="image/png" href="<?php print_unescaped(image_path($_['appid'], 'favicon.png')); ?>">
 		<link rel="apple-touch-icon-precomposed" href="<?php print_unescaped(image_path($_['appid'], 'favicon-touch.png')); ?>">
 		<?php foreach($_['cssfiles'] as $cssfile): ?>