{"id":13798436,"url":"https://github.com/danhp/electron-osx-appearance","last_synced_at":"2026-03-04T22:31:54.269Z","repository":{"id":57221797,"uuid":"57164561","full_name":"danhp/electron-osx-appearance","owner":"danhp","description":":apple: APIs for accessing OS X's Appearance Settings.","archived":false,"fork":false,"pushed_at":"2016-09-21T19:04:17.000Z","size":6,"stargazers_count":167,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T22:05:35.703Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danhp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-26T21:57:27.000Z","updated_at":"2024-03-25T19:46:14.000Z","dependencies_parsed_at":"2022-08-29T04:01:53.943Z","dependency_job_id":null,"html_url":"https://github.com/danhp/electron-osx-appearance","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danhp%2Felectron-osx-appearance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danhp%2Felectron-osx-appearance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danhp%2Felectron-osx-appearance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danhp%2Felectron-osx-appearance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danhp","download_url":"https://codeload.github.com/danhp/electron-osx-appearance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253883123,"owners_count":21978611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T00:00:43.857Z","updated_at":"2026-03-04T22:31:54.209Z","avatar_url":"https://github.com/danhp.png","language":"JavaScript","funding_links":[],"categories":["Library","Tools"],"sub_categories":["Uncategorized","For Electron"],"readme":"# electron-osx-appearance\n\n\u003e APIs for accessing the OS X Appearance Settings.\n\nRequires:\n* **Electron \u003e=0.37.8**\n\n## Why?\n\n* Simple function calls instead of having to remember the name and types of each setting you need to access.\n\n## Install\n\n```\n$ npm install --save electron-osx-appearance\n```\n\n## Usage\n\n```js\nconst osxPrefs = require('electron-osx-appearance');\n\n\nif (process.platform === 'darwin') {\n\tosxPrefs.isDarkMode();\n\n\tosxPrefs.onDarkModeChanged(() =\u003e {\n\t\t// Handle the event\n\t});\n}\n\n// ...\n```\n\n**Note**: This module is a wrapper around **OS X specific** methods from Electron's `systemPreferences` module.\n\n## Methods\n\n### `unsubscribe(id)`\n\n* `id` Integer\n\nRemove subscriber with `id`.\n\n### `isDarkMode()`\n\nReturns `true` if the system is in Dark Mode, and `false` otherwise.\n\n### `onDarkModeChanged(callback)`\n\n* `callback` Function\n\nSubscribe to the Dark Mode changed event. Runs `callback` when event is fired.\n\nReturns the `id` with which you can then unsubscribe.\n\n### `isTintBlue()`\n\nThis method return `true` if the system is using the blue tint, `false` otherwise.\n\n### `getTint()`\n\nReturn a `String` with the system's current Tint.\n\nPossible values are `'blue'` or `'graphite'`.\n\n### `onTintChanged(callback)`\n\n* `callback` Function\n\nSubscribe to the Tint changed event. Runs `callback` when event is fired.\n\nReturns the `id` with which you can then unsubscribe with.\n\n### `getHighlightColour()`\n\nReturns an RGB `array` of the system's current Highlight Colour.\n\nIf none is found, returns `[9, 92, 220]` as default.\n\n### `onHighlightColourChanged(callback)`\n\n* `callback` Function\n\nSubscribe to the Highlight Colour changed event. Runs `callback` when event is fired.\n\nReturns the `id` with which you can then unsubscribe with.\n\n### `getSidebarIconSize()`\n\nReturns `String` with the system's current Sidebar Icon Size.\n\nPossible values are `small`, `medium` or `large`.\n\n### `onSidebarIconSizeChanged(callback)`\n\n* `callback` Function\n\nSubscribe to the Sidebar Icon Size changed event. Runs `callback` when event is fired.\n\nReturns the `id` with which you can then unsubscribe with.\n\n### `getScrollbarVisibility()`\n\nReturns a `String` with the system's current Scrollbar Visibility.\n\nPossible values are `automatic`, `whenscrolling` or `always`.\n\n### `onScrollbarVisibilityChanged(callback)`\n\n* `callback` Function\n\nSubscribe to the Scrollbar Visibility changed event. Runs `callback` when event is fired.\n\nReturns the `id` with which you can then unsubscribe with.\n\n### `isScrollbarPaging()`\n\nReturns `true` if the system is using Scrollbar Paging, `false` otherwise.\n\n### `onScrollbarPagingChanged(callback)`\n\n* `callback` Function\n\nSubscribe to the Scrollbar Paging changed event. Runs `callback` when event is fired.\n\nReturns the `id` with which you can then unsubscribe with.\n\n## License\n\nMIT © Daniel Pham\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanhp%2Felectron-osx-appearance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanhp%2Felectron-osx-appearance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanhp%2Felectron-osx-appearance/lists"}