title: Edit "prefers-color-scheme" value to force Dark Mode
body: <p>I've been looking for hours for a solution (online and in the Chrome console) but without success.</p>
  <p>The &quot;right&quot; way to implement dark mode is to use media queries with the &quot;prefers-color-scheme&quot; parameter:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
      color:#fff;
  }
  
  @media (prefers-color-scheme: dark) {
      body {
          color:#fff;
          background:#333333
      }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>If you can read this text Dark Mode is Working</code></pre>
  </div>
  </div>
  </p>
  <p>Some browsers (IE, Firefox Mobile, etc) or an app made with Xamarin are not able to pass this parameter in the correct way, so I'm looking for a way to change it manually.
  Possibly something like this:</p>
  <pre><code>screen.prefers-color-scheme = &quot;dark&quot;; //or
  window.prefers-color-scheme = &quot;dark&quot;; //or
  navigator.prefers-color-scheme = &quot;dark&quot;; 
  </code></pre>
  <p>I hoped it was a variable readable from the console but I wasted a lot of time looking for it with no success, I also read many posts about a meta named &quot;color-scheme&quot; but there's nothing like that in my projects (and the dark mode is working correctly)</p>
  <p>This parameter is read in realtime on Windows and Mac osx, if you switch theme with the browser opened the dark mode will toggle.</p>
  <p>Could this be saved in the session maybe? I'm losing my mind </p>