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

@ohmyperf/design-tokens

v0.1.1

Published

Calibre OKLCH palette tokens shared by viewer + reporter-deck + website. Single source of truth interface; canonical source remains apps/website/app/globals.css.

Readme

@ohmyperf/design-tokens

Canonical TypeScript + CSS interface to the OhMyPerf Calibre OKLCH palette.

Canonical source

apps/website/app/globals.css remains the single source of truth for OKLCH values. This package reflects those values so non-Next.js consumers (the standalone HTML viewer at packages/viewer/ and the slide-deck reporter at packages/reporter-deck/) can stay in sync without importing Tailwind v4.

A CI gate (scripts/check-design-tokens.mjs) asserts that every OKLCH value in:

  • apps/website/app/globals.css
  • packages/design-tokens/dist/index.js
  • packages/viewer/dist/styles.js (after Commit 2)
  • packages/reporter-deck/dist/styles.js (after Commit 3)

is identical. The build fails on any drift.

Usage

import { PALETTE_CSS, CALIBRE_LIGHT } from "@ohmyperf/design-tokens";

// Embed the full palette (with hex fallbacks + dark mode) into a static HTML <style> tag:
const html = `<style>${PALETTE_CSS}</style>`;

// Or reference TypeScript constants when emitting inline SVG colour attrs:
const stroke = CALIBRE_LIGHT.accentSuccess;       // "oklch(0.55 0.17 145)"
const fallbackStroke = CALIBRE_LIGHT.hex.accentSuccess; // "#377f3d"

For slide decks (no dark mode), use the light-only variant:

import { PALETTE_CSS_LIGHT_ONLY } from "@ohmyperf/design-tokens";

Why hex fallbacks?

Every OKLCH declaration is preceded by a hex declaration:

--color-primary: #1855b8;
--color-primary: oklch(0.50 0.18 245);

Browsers ignore unknown values and keep the last valid one. Newer browsers see both, take OKLCH. Stale browsers (Safari < 15.4, archived viewers) see only hex.

Adding a new token

  1. Add the OKLCH value to apps/website/app/globals.css first (canonical source).
  2. Add matching OKLCH value to CALIBRE_LIGHT and CALIBRE_DARK in src/index.ts.
  3. Add matching hex fallback to both palettes' hex sub-object.
  4. Add the --color-* name to PROP_TO_CSS_VAR map in src/index.ts.
  5. Run node scripts/check-design-tokens.mjs — must exit 0.
  6. Run pnpm --filter @ohmyperf/design-tokens test — all tests pass.

License

Apache-2.0.