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 🙏

© 2026 – Pkg Stats / Ryan Hefner

browser-color-scheme

v1.1.0

Published

🌙Toggle Browser Color Scheme☀️

Readme

Browser Color Scheme🌙Toggle Browser Color Scheme☀️ InstallationjsDelivr CDNhttps://cdn.jsdelivr.net/npm/browser-color-scheme/index.jsunpkg CDNhttps://unpkg.com/browser-color-scheme/index.jsNPM$ npm i browser-color-schemeYarn$ yarn add browser-color-schemeJavaScriptimport bcs from "browser-color-scheme"window.BROWSER_COLOR_SCHEME_LIST ⇒ Array: ["dark", "light"]Browser color scheme names list.window.BROWSER_COLOR_SCHEME_VALUE ⇒ String: window.BROWSER_COLOR_SCHEME_LIST(localStorage["theme"] || ${prefers-color-scheme}.matches)[0] || window.BROWSER_COLOR_SCHEME_LIST[0]Browser color scheme name.window.BROWSER_COLOR_SCHEME_VARIANT ⇒ String: undefinedValue of the variant to add to the browser color scheme.BROWSER_COLOR_SCHEME(VALUE) ⇒ BooleanMethod to toggle browser color scheme.ParamTypeDescriptionVALUEstringA color defined in window.BROWSER_COLOR_SCHEME_LIST.Example<!DOCTYPE html> <html>     <head>         <meta charset="utf-8" />         <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />         <style>             :root {                 --bg-color: #1A1A1A;                 --color: #E5E5E5;                 --title: #E5E5E5;             }             [data-theme="dark_green"] {                 --bg-color: #1A1A1A;                 --color: #E5E5E5;                 --title: #61FA99;             }             [data-theme="light"] {                 --bg-color: #E5E5E5;                 --color: #1A1A1A;                 --title: #1A1A1A;             }             [data-theme="light_green"] {                 --bg-color: #E5E5E5;                 --color: #1A1A1A;                 --title: #00BF66;             }             html {                 background-color: var(--bg-color);                 color: var(--color);             }             h1 {                 color: var(--title);             }         </style>     </head>     <body>         <h1>TESTA!</h1>         <input id="input_variant" name="variant" type="checkbox" style="margin-left: 0;margin-bottom: 10px;margin-right: 7.5px;">         <label id="label_variant" for="variant" style="cursor: pointer;">Add the color green as a variant.</label>         <script type="text/javascript">             document.addEventListener("DOMContentLoaded", function () {                 const input = document.getElementById("input_variant");                 const label = document.getElementById("label_variant");                 if (input && label) {                     function checkbox_variant(checked) {                         if (checked == true) {                             window.BROWSER_COLOR_SCHEME_VARIANT = "green";                             BROWSER_COLOR_SCHEME();                             label.innerText = "Remove variant.";                         } else {                             window.BROWSER_COLOR_SCHEME_VARIANT = undefined;                             BROWSER_COLOR_SCHEME();                             label.innerText = "Add the color green as a variant.";                         };                     };                     input.addEventListener("change", function (element) {                         return checkbox_variant(element.target.checked);                     });                     label.addEventListener("click", function () {                         return input.click();                     });                 };             });         </script>         <script src="./index.js"></script>     </body> </html>CL 2022 Browser Color Scheme</> with ❤ by Alex Animate Mp4 and contributors.