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

newtone

v0.1.3

Published

Accessible semantic color system generator from brand colors

Readme

newtone-api

Core engine, component library, and configurator widget for the newtone color system ecosystem.

What is newtone-api?

newtone-api is the foundational repository containing:

  1. Core Engine (newtone npm package) — Pure TypeScript color science engine

    • Color space conversions (sRGB, OKLAB, OKLCH)
    • WCAG contrast calculations
    • Gamut mapping
    • Dynamic range and desaturation curves
    • Hue grading
  2. Component Library (@newtonedev/components npm package) — Cross-platform UI components

    • Button, Card, TextInput, Select, Toggle, Slider, HueSlider
    • Theme provider with light/dark modes
    • Design token generation
  3. Configurator (@newtonedev/configurator npm package) — Visual palette builder widget

    • Embeddable color system editor
    • Real-time preview
    • Export to JSON, CSS, or NewtoneThemeConfig

Tech Stack

  • Language: TypeScript (zero external dependencies in core engine)
  • UI Framework: React + react-native-web (cross-platform components)
  • Package Manager: npm workspaces
  • Testing: Vitest + React Testing Library

Getting Started

# Install dependencies
npm install

# Run tests
npm test

# Build all packages
npm run build

Project Structure

src/
├── color-spaces/        # Color conversions (sRGB, OKLAB, OKLCH)
├── luminance/           # WCAG contrast calculations
├── gamut/               # Gamut mapping algorithms
├── engine/              # Core color generation pipeline
└── mcp/                 # Model Context Protocol server (planned)

packages/
├── components/          # @newtonedev/components
│   ├── src/
│   │   ├── theme/      # NewtoneProvider, theme context
│   │   ├── tokens/     # Design token computation
│   │   ├── Button/     # Component implementations
│   │   ├── Card/
│   │   └── ...
│   └── package.json
└── configurator/        # @newtonedev/configurator
    ├── src/
    │   ├── Configurator.tsx
    │   ├── panels/     # Global, palettes, canvas, preview, export
    │   └── state/      # useReducer state management
    └── package.json

Published Packages

All packages published to npm under the newtonedev organization:

npm install newtone                      # Core engine
npm install @newtonedev/components       # Component library
npm install @newtonedev/configurator     # Configurator widget

Current Version: 0.1.0

Documentation

Related Projects

Key Patterns

Zero Dependencies in Core Engine

The newtone package has zero external dependencies. All color space math is implemented from scratch in pure TypeScript.

Cross-Platform Components

Components use react-native-web for cross-platform compatibility:

  • Button uses onPress (not onClick)
  • TextInput uses onChangeText (not onChange)
  • All components work on web and React Native

Self-Affecting Pattern

When the configurator is wrapped in a NewtoneProvider whose config is controlled by the configurator itself, the configurator's own UI updates in real-time as palettes change. Used in newtone-web editor and newtone-admin theme editor.

Building & Testing

# Run all tests
npm test

# Build all packages
npm run build

# Publish to npm (requires npm login as joshuaallenmx)
cd packages/components && npm publish
cd packages/configurator && npm publish
cd ../.. && npm publish

License

Private — All rights reserved