feat: expose systemPreferences.getSystemColor() (#16248)

This commit is contained in:
Shelley Vohr 2019-01-03 14:30:38 -08:00 committed by GitHub
parent 439ba5116f
commit 03892153de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 81 additions and 1 deletions

View file

@ -291,6 +291,21 @@ See the [Windows docs][windows-colors] for more details.
[windows-colors]:https://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx
### `systemPreferences.getSystemColor(color)` _macOS_
* `color` String - One of the following values:
* `blue`
* `brown`
* `gray`
* `green`
* `orange`
* `pink`
* `purple`
* `red`
* `yellow`
Returns one of several standard system colors that automatically adapt to vibrancy and changes in accessibility settings like 'Increase contrast' and 'Reduce transparency'. See [Apple Documentation](https://developer.apple.com/design/human-interface-guidelines/macos/visual-design/color#system-colors) for more details.
### `systemPreferences.isInvertedColorScheme()` _Windows_
Returns `Boolean` - `true` if an inverted color scheme (a high contrast color scheme with light text and dark backgrounds) is active, `false` otherwise.