Socket
Book a DemoInstallSign in
Socket

windows-accent-colors

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

windows-accent-colors

Get user accent colors, including the derivative colors used by the Windows UI. (Windows 10+ only.)

1.0.1
latest
Source
npmnpm
Version published
Weekly downloads
4
-50%
Maintainers
1
Weekly downloads
 
Created
Source

windows-accent-colors

Node.js module for accessing the accent colors in Windows (via WinRT). This is intended as a supplement to Electron's own accent color detection. While Electron's accent color is the correct, user-selected color, it is not always the color used throughout Windows. This module provides Node.js/Electron developers with the derivative accent colors used throughout the Windows 10/11 UI. These colors are identical to the ones available via WinRT (see Microsoft's documentation).

Installation

npm i windows-accent-colors

Usage

Import the module and use getAccentColors(). For example:

const AccentColors = require("windows-accent-colors");
const colors = AccentColors.getAccentColors();
console.log(`The color of sliders in Windows 11 is: ${colors.accentLight2.hex}`);

The function getAccentColors() will return an object of all derivative accent colors in RGB and Hex format. For example:

{
  "accent": { "r": 232, "g": 17, "b": 35, "hex": "#e81123" },
  "accentDark1": { "r": 210, "g": 14, "b": 30, "hex": "#d20e1e" },
  "accentDark2": { "r": 158, "g": 9, "b": 18, "hex": "#9e0912" },
  "accentDark3": { "r": 111, "g": 3, "b": 6, "hex": "#6f0306" },
  "accentLight1": { "r": 239, "g": 39, "b": 51, "hex": "#ef2733" },
  "accentLight2": { "r": 244, "g": 103, "b": 98, "hex": "#f46762" },
  "accentLight3": { "r": 251, "g": 157, "b": 139, "hex": "#fb9d8b" },
  "background": { "r": 0, "g": 0, "b": 0, "hex": "#000000" },
  "foreground": { "r": 255, "g": 255, "b": 255, "hex": "#ffffff" }
}

Keywords

windows

FAQs

Package last updated on 15 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.