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

@uiid/themes

v0.0.2

Published

Theme schema, generation, validation, and presets for the UIID design system

Readme

@uiid/themes

Theme schema, generation, validation, and presets for the UIID design system.

Theme Input Format

Themes are defined as simple JSON with hex colors:

{
  "name": "My Theme",
  "white": "#fefefa",
  "black": "#0d0d0d",
  "primary": "#ff0000",
  "secondary": "#9036e1",
  "positive": "#00c565",
  "warning": "#e8b700",
  "critical": "#f9262a",
  "info": "#347eff"
}

Required: name, white, black, primary, secondary Optional: positive, warning, critical, info (fall back to defaults)

All colors must be 6-digit hex (#RRGGBB). The generation pipeline handles OKLCH conversion, shade scales, and tone variants automatically.

Generate a Theme

# Generate CSS from a theme JSON
npx tsx scripts/generate-theme.js --input my-theme.json --output my-theme.css

# Dry run (validate only)
npx tsx scripts/generate-theme.js --input my-theme.json --dry-run

VSCode Theme Import

Convert any VSCode color theme into a UIID theme input JSON.

CLI

# Output to stdout
npx tsx scripts/convert-vscode-theme.js --input path/to/vscode-theme.json

# Write to file
npx tsx scripts/convert-vscode-theme.js --input path/to/vscode-theme.json --output my-theme.json

# Override theme name
npx tsx scripts/convert-vscode-theme.js --input path/to/vscode-theme.json --name "My Custom Name"

Programmatic

import { convertVscodeTheme } from "@uiid/themes/vscode";

const vscodeThemeJson = fs.readFileSync("dracula.json", "utf-8");
const { theme, warnings } = convertVscodeTheme(vscodeThemeJson);

// theme is a valid UIID ThemeInput object
// warnings lists any mapping issues encountered

The converter accepts both JSON and JSONC (with comments/trailing commas), and handles:

  • Light and dark theme detection (from type field or background luminance)
  • 8-digit hex normalization (strips alpha channel)
  • Graceful fallbacks with warnings for missing color mappings

Color Mapping

| UIID Field | VSCode Keys (priority order) | | ------------- | ------------------------------------------------------------------------------- | | white | Light: editor.background / Dark: editor.foreground, foreground | | black | Light: editor.foreground / Dark: editor.background | | primary | focusBorder, button.background, activityBarBadge.background | | secondary | badge.background, activityBar.activeBorder, tab.activeBorder | | positive | terminal.ansiGreen, gitDecoration.addedResourceForeground | | warning | terminal.ansiYellow, list.warningForeground, editorWarning.foreground | | critical | terminal.ansiRed, errorForeground, editorError.foreground | | info | terminal.ansiBlue, editorInfo.foreground, notificationsInfoIcon.foreground|

Known Limitations

  • include not resolved. VSCode themes that extend a base theme via include will only convert the explicitly defined colors. Inherited colors are not available.
  • Neutral fidelity. For dark themes, white is derived from the foreground color, which is typically a muted gray rather than pure white. Manual adjustment may improve the shade scale range.
  • Semantic subset. VSCode themes define hundreds of color keys. The converter maps only the ~8 that correspond to UIID's theme schema. Fine-grained syntax highlighting colors are not transferred.

End-to-End: VSCode Theme → CSS

# Step 1: Convert VSCode theme to UIID theme JSON
npx tsx scripts/convert-vscode-theme.js --input dracula.json --output dracula-uiid.json

# Step 2: Generate UIID theme CSS
npx tsx scripts/generate-theme.js --input dracula-uiid.json --output dracula.theme.css

Presets

Built-in presets are in src/presets/:

| Preset | Description | | ------- | ----------------------- | | Default | UIID default palette | | Ocean | Cool blue tones | | Ember | Warm orange/red tones | | Ayu | Adapted from ayu-colors |

Build all presets: pnpm run build --filter=@uiid/themes