diff --git a/src/panels/custom/ha-panel-custom.ts b/src/panels/custom/ha-panel-custom.ts
index c9be5a5c15..fc4d302073 100644
--- a/src/panels/custom/ha-panel-custom.ts
+++ b/src/panels/custom/ha-panel-custom.ts
@@ -129,6 +129,7 @@ export class HaPanelCustom extends UpdatingElement {
width: 100%;
height: 100%;
display: block;
+ background-color: var(--primary-background-color);
}
diff --git a/src/panels/iframe/ha-panel-iframe.js b/src/panels/iframe/ha-panel-iframe.js
index f8de869342..c6321414ac 100644
--- a/src/panels/iframe/ha-panel-iframe.js
+++ b/src/panels/iframe/ha-panel-iframe.js
@@ -13,6 +13,7 @@ class HaPanelIframe extends PolymerElement {
border: 0;
width: 100%;
height: calc(100% - 64px);
+ background-color: var(--primary-background-color);
}