From af62b738d28efeabd1201e2f16af33bceb5ac974 Mon Sep 17 00:00:00 2001 From: GarboMuffin Date: Wed, 27 Jul 2022 13:22:03 -0500 Subject: [PATCH] Use dark fullscreen background in embeds by default if user prefers dark mode --- src/components/gui/gui.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/gui/gui.jsx b/src/components/gui/gui.jsx index 08f475f72..c43f1b88b 100644 --- a/src/components/gui/gui.jsx +++ b/src/components/gui/gui.jsx @@ -58,6 +58,9 @@ const getFullscreenBackgroundColor = () => { if (params.has('fullscreen-background')) { return params.get('fullscreen-background'); } + if (window.matchMedia('(prefers-color-scheme: dark)').matches) { + return '#111'; + } return 'white'; };