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

stranger-theme-palette

v1.1.0

Published

Stranger Theme colour palettes as JS, CSS custom properties, a Tailwind colour map and Shiki themes

Readme

stranger-theme-palette

The six Stranger Theme palettes (Upside Down, Starcourt, Hawkins, The Lab, Tigers, Dimension X) for web pages and theme ports: JS data with types, CSS custom properties, a Tailwind colour map and Shiki themes.

npm install stranger-theme-palette

Variant ids: upside-down, starcourt, hawkins, the-lab, tigers, dimension-x.

JavaScript and TypeScript

import { palettes, variants } from 'stranger-theme-palette';
// const { palettes, variants } = require('stranger-theme-palette');

palettes.hawkins.base.PINK;        // '#D4A574'
palettes.hawkins.derived.BGLight;  // raised surface
palettes.hawkins.ansi.BRIGHT_RED;  // terminal colour 9
variants;                          // ['upside-down', 'starcourt', ...]

Each variant has base (BG, FG, SELECTION, COMMENT, CYAN, GREEN, ORANGE, PINK, PURPLE, RED, YELLOW), derived (WHITE, BLACK, LineHighlight, NonText, BGLighter, BGLight, BGDark, BGDarker) and ansi (the 16 terminal colours in order). Types VariantId, BaseColorName, DerivedColorName, AnsiColorName and Variant are exported. The raw data is also available as stranger-theme-palette/palettes.json.

Slots are roles, not hue names: keywords use PINK, functions GREEN, types CYAN, strings YELLOW, numbers PURPLE. See the specification.

CSS custom properties

One variant on :root:

@import 'stranger-theme-palette/css/hawkins.css';

body { background: var(--stranger-bg); color: var(--stranger-fg); }
a { color: var(--stranger-cyan); }

All six, switched with an attribute:

@import 'stranger-theme-palette/css/all.css';
<html data-stranger-theme="starcourt">

Variables: --stranger-bg, --stranger-fg, --stranger-selection, --stranger-comment, --stranger-cyan, --stranger-green, --stranger-orange, --stranger-pink, --stranger-purple, --stranger-red, --stranger-yellow, --stranger-white, --stranger-black, --stranger-line-highlight, --stranger-non-text, --stranger-bg-lighter, --stranger-bg-light, --stranger-bg-dark, --stranger-bg-darker and --stranger-ansi-0 to --stranger-ansi-15.

Tailwind CSS

stranger-theme-palette/tailwind exports { colors: { stranger: { <variant>: { ... } } } } and does not import Tailwind:

// tailwind.config.js
const stranger = require('stranger-theme-palette/tailwind');

module.exports = {
  theme: { extend: { colors: stranger.colors } }
};
<div class="bg-stranger-hawkins-bg text-stranger-hawkins-pink">...</div>

Colour keys match the CSS variable names without the --stranger- prefix (bg, pink, line-highlight, ansi-0, ...). With Tailwind v4, import a CSS file above and reference the variables, for example bg-(--stranger-bg).

Shiki

stranger-theme-palette/shiki/<variant>.json is the VS Code theme and loads in Shiki as-is:

import { createHighlighter } from 'shiki';
import hawkins from 'stranger-theme-palette/shiki/hawkins.json' with { type: 'json' };

const highlighter = await createHighlighter({ themes: [hawkins], langs: ['ts'] });
const html = highlighter.codeToHtml('const x = 1', { lang: 'ts', theme: hawkins.name });

License

MIT