Is macOS using Dark appearance, see demo page.
// via githack
<script src="https://rawcdn.githack.com/jojoee/is-darkmode/v1.0.0/index.js"></script>
// via Bower
bower install jojoee/is-darkmode --save
<script src="./bower_components/is-darkmode/index.js"></script>
// via CommonJS
npm install @jojoee/is-darkmode --save
const { isDarkMode, onDarkModeChange } = require('@jojoee/is-darkmode')
// via ES6
import { isDarkMode, onDarkModeChange } from "@jojoee/is-darkmode"
isDarkMode() // returns Boolean
onDarkModeChange(function (isDark) {
console.log('isDark', isDark)
})