https://github.com/jojoee/is-darkmode
Is macOS using Dark appearance
https://github.com/jojoee/is-darkmode
appearance dark macos
Last synced: 3 months ago
JSON representation
Is macOS using Dark appearance
- Host: GitHub
- URL: https://github.com/jojoee/is-darkmode
- Owner: jojoee
- License: mit
- Created: 2020-05-16T03:36:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T12:57:15.000Z (almost 6 years ago)
- Last Synced: 2025-10-02T01:43:52.698Z (9 months ago)
- Topics: appearance, dark, macos
- Language: HTML
- Homepage: https://jojoee.github.io/is-darkmode/index.html
- Size: 13.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# is-darkmode
[](https://travis-ci.org/jojoee/is-darkmode)
[](https://github.com/jojoee/is-darkmode/issues)
[](https://github.com/jojoee/is-darkmode/blob/master/LICENSE)
[](https://github.com/jojoee/is-darkmode/releases)
[](https://github.com/semantic-release/semantic-release)
Is macOS using Dark appearance, see [demo page](https://jojoee.github.io/is-darkmode/index.html).

## Installation
```
// via githack
// via Bower
bower install jojoee/is-darkmode --save
// via CommonJS
npm install @jojoee/is-darkmode --save
const { isDarkMode, onDarkModeChange } = require('@jojoee/is-darkmode')
// via ES6
import { isDarkMode, onDarkModeChange } from "@jojoee/is-darkmode"
```
## Usage
```javascript
isDarkMode() // returns Boolean
onDarkModeChange(function (isDark) {
console.log('isDark', isDark)
})
```