From 2656812deae41bec38c5724a3469e8e99ce260f3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 11 Oct 2016 09:32:03 -0700 Subject: [PATCH] Doc systemPreferences.getColor --- docs/api/system-preferences.md | 53 ++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/docs/api/system-preferences.md b/docs/api/system-preferences.md index 790e78c149..250d065d4b 100644 --- a/docs/api/system-preferences.md +++ b/docs/api/system-preferences.md @@ -147,8 +147,8 @@ if (browserOptions.transparent) { ### `systemPreferences.getAccentColor()` _Windows_ -Returns the users current system wide color preference in the form of an RGBA -hexadecimal string. +Returns `String` - The users current system wide accent color preference in RGBA +hexadecimal form. ```js const color = systemPreferences.getAccentColor() // `"aabbccdd"` @@ -158,7 +158,56 @@ const blue = color.substr(4, 2) // "cc" const alpha = color.substr(6, 2) // "dd" ``` +### `systemPreferences.getColor(color)` _Windows_ + +* `color` String - One of the following values: + * `3d-dark-shadow` - Dark shadow for three-dimensional display elements. + * `3d-face` - Face color for three-dimensional display elements and for dialog + box backgrounds. + * `3d-highlight` - Highlight color for three-dimensional display elements. + * `3d-light` - Light color for three-dimensional display elements. + * `3d-shadow` - Shadow color for three-dimensional display elements. + * `active-border` - Active window border. + * `active-caption` - Active window title bar. Specifies the left side color in + the color gradient of an active window's title bar if the gradient effect is + enabled. + * `active-caption-gradient` - Right side color in the color gradient of an + active window's title bar. + * `app-workspace` - Background color of multiple document interface (MDI) + applications. + * `button-text` - Text on push buttons. + * `caption-text` - Text in caption, size box, and scroll bar arrow box. + * `desktop` - Desktop background color. + * `disabled-text` - Grayed (disabled) text. + * `highlight` - Item(s) selected in a control. + * `highlight-text` - Text of item(s) selected in a control. + * `hotlight` - Color for a hyperlink or hot-tracked item. + * `inactive-border` - Inactive window border. + * `inactive-caption` - Inactive window caption. Specifies the left side color + in the color gradient of an inactive window's title bar if the gradient + effect is enabled. + * `inactive-caption-gradient` - Right side color in the color gradient of an + inactive window's title bar. + * `inactive-caption-text` - Color of text in an inactive caption. + * `info-background` - Background color for tooltip controls. + * `info-text` - Text color for tooltip controls. + * `menu` - Menu background. + * `menu-highlight` - The color used to highlight menu items when the menu + appears as a flat menu. + * `menubar` - The background color for the menu bar when menus appear as flat + menus. + * `menu-text` - Text in menus. + * `scrollbar` - Scroll bar gray area. + * `window` - Window background. + * `window-frame` - Window frame. + * `window-text` - Text in windows. + +Returns `String` - The system color setting in RGB hexadecimal form (`#ABCDEF`). +See the [Windows docs][windows-colors] for more details. + ### `systemPreferences.isInvertedColorScheme()` _Windows_ Returns `Boolean` - `true` if an inverted color scheme, such as a high contrast theme, is active, `false` otherwise. + +[windows-colors]:https://msdn.microsoft.com/en-us/library/windows/desktop/ms724371(v=vs.85).aspx