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

radix-palette

v0.1.4

Published

Radix Palette is a TailwindCSS utility that enhances Radix Colors by solving key integration challenges.

Readme

npm package Downloads Build Status Issues Code Coverage Commitizen Friendly Semantic Release

Radix Palette

Radix Palette is a TailwindCSS utility that enhances Radix Colors by solving key integration challenges. It provides a seamless, flexible color management solution for web developers, supporting alpha value injection, P3 color display, and unified light/dark mode color systems. The project simplifies color design by offering a more intuitive and technically robust approach to color implementation in modern web development.

Implementation Progress

  • [x] Opacity Modifier
    Supports opacity adjustments directly in classes, allowing for convenient transparency control (e.g., bg-gray-4/50, text-blue-12/80).

  • [x] Composability
    Enables light and dark mode configurations in a single declaration, streamlining the setup for dynamic theming.

  • [ ] P3 Display Support
    Working towards P3 color display compatibility. Current challenges exist with Tailwind’s flexibility, particularly around retaining alpha value adjustments across different contexts.

Usage

Install

npm install radix-palette
# Or with Yarn
yarn add radix-palette
# Or with PNPM
pnpm add radix-palette

Import in CSS

/*
 * CSS Color Import Best Practices
 *
 * Selective Color Importing: Optimizing Your Stylesheet
 *
 * Instead of importing entire color libraries or palettes,
 * import only the specific colors you need to:
 * 1. Reduce stylesheet file size
 * 2. Improve performance
 * 3. Keep your design clean and intentional
 *
 */

/* slate */
@import "radix-palette/dist/slate.css";
@import "radix-palette/dist/slate-alpha.css";
@import "radix-palette/dist/slate-dark.css";
@import "radix-palette/dist/slate-dark-alpha.css";

/* Purple - only light colors for branding */
@import "radix-palette/dist/purple.css";
/* @import "radix-palette/dist/purple-alpha.css"; */
/* @import "radix-palette/dist/purple-dark.css"; */
/* @import "radix-palette/dist/purple-dark-alpha.css"; */

/* Red - full color palette required */
@import "radix-palette/dist/red.css";
@import "radix-palette/dist/red-alpha.css";
@import "radix-palette/dist/red-dark.css";
@import "radix-palette/dist/red-dark-alpha.css";

/* Orange - no need alpha */
@import "radix-palette/dist/orange.css";
/* @import "radix-palette/dist/orange-alpha.css"; */
@import "radix-palette/dist/orange-dark.css";
/* @import "radix-palette/dist/orange-dark-alpha.css"; */

Import in Tailwind CSS Config

const { radixPaletteToTailwind } = require("radix-palette/utils");

/** @type {import('tailwindcss').Config} */
module.exports = {
  // ...
  theme: {
    extend: {
      // ...
      colors: {
        brand: {
          // If a specific color number is provided,
          // return the transformed single color
          light: radixPaletteToTailwind({ palette: "purple", number: 8 }),
          DEFAULT: radixPaletteToTailwind({ palette: "purple", number: 10 }),
          dark: radixPaletteToTailwind({ palette: "purple", number: 12 }),
        },

        // If no number is provided, return all colors in the family
        // (optionally with alpha and additional colors)

        // slate with alpha and additional colors
        slate: radixPaletteToTailwind({ palette: "slate" }),
        // red with alpha colors
        red: radixPaletteToTailwind({ palette: "red", includeAlpha: true, includeAdditionalColors: false }),
        // orange with additional colors only
        orange: radixPaletteToTailwind({ palette: "orange", includeAlpha: false, includeAdditionalColors: true }),
        // ...
      },
      // ...
    },
  },
  // ...
};

Reference

  • Tailwind configuration: https://tailwindcss.com/docs/configuration
  • Original radix palette: https://github.com/radix-ui/colors