Detect dark mode

  1. 8 months ago
    Edited 8 months ago by admin

    It can be usefull if the web viewer detect system dark or light mode like browsers' css media : @media (prefers-color-scheme: dark) {}

    @msaroid We will discuss on any such possibility and will implement if possible.

  2. admin

    17 Dec 2021 Administrator Answer

    @msaroid We will discuss on any such possibility and will implement if possible.

  3. 7 months ago

    Hi.
    Try using Javascript as this is the correct function for any modern browser (HTML5):

    window.matchMedia('(prefers-color-scheme: dark)').matches

    Source and Example: https://flaviocopes.com/javascript-detect-dark-mode/

  4. DevWithCoffee Thanks for the explanation, I'll try to do it here! Thank you even now I understand the flaws.

 

or Sign Up to reply!