npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

windows-accent-colors

v1.0.1

Published

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

Downloads

151

Readme

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" }
}