Skip to content
PluginStats

tailwindcss-css-variables-color-palette-plugin weekly downloads statistics

By niqingyang · npm · Tailwind plugins

Color Palette plugin using CSS variables for TailwindCSS; forked from tailwindcss-css-variables-palette-plugin

View on npm Fresh · Dec 6, 2026

tailwindcss-css-variables-color-palette-plugin has 24 recorded weekly downloads on npm, an increase of 60.0% over the past 30 days, ranking #2952 of 3,247 tracked listings.

Weekly downloads
24
Official API · Dec 5, 2026
7-day growth
+118%
+13 weekly downloads
30-day growth
+60.0%
+9 weekly downloads
90-day growth
+700%
+21 weekly downloads
Rank
#2952
▼ 12 in 7 days

About tailwindcss-css-variables-color-palette-plugin

Palette plugin using CSS variables for TailwindCSS

基于 https://github.com/Thisisjuke/tailwindcss-css-variables-palette-plugin 和 https://github.com/hd996/color-generate 两个库整合了一下,支持生成 antd3 的色彩

Adds a color palette (from 50 to 900) for each color of your tailwind configuration while using CSS variable for each.

This package has been designed to create library components where the theme (colors) are easily modifiable in the application, using CSS variables.

Installation

Using yarn :

yarn add -D tailwindcss-css-variables-color-palette-plugin

Using pnpm :

pnpm add -D tailwindcss-css-variables-color-palette-plugin

Using npm :

npm install --save-dev tailwindcss-css-variables-color-palette-plugin

Then set up your tailwind.config.js this way :

const {paletteCssVariablesPlugin} = require('tailwindcss-css-variables-color-palette-plugin');

const THEME_COLORS = {
  primary: '#0d6efd',
  secondary: '#6b7280'
};

module.exports = {
  /...
  theme: {
    colors: THEME_COLORS,
    extend: {},
  },
  plugins: [
    paletteCssVariablesPlugin({
      colors: THEME_COLORS,
      // 默认为 `default`,使用 `antd` 则依据 https://github.com/hd996/color-generate 的算法进行生成
      // algo: 'default'
    }),
    /...
  ],
};

The plugin then create the following configuration for you :

{
  primary: {
    '50': 'var(--color-primary-100, #e7f1ff)',
    '100': 'var(--color-primary-100, #cfe2ff)',
    '200': 'var(--color-primary-200, #9ec5fe)',
    '300': 'var(--color-primary-300, #6ea8fe)',
    '400': 'var(--color-primary-400, #3d8bfd)',
    '500': 'var(--color-primary-500, #0d6efd)',
    '600': 'var(--color-primary-600, #0a58ca)',
    '700': 'var(--color-primary-700, #084298)',
    '800': 'var(--color-primary-800, #052c65)',
    '900': 'var(--color-primary-900, #132229)',
    DEFAULT: 'var(--color-primary, #0d6efd)'
  },
  secondary: {
    '50': 'var(--color-secondary-100, #f0f1f2)',
    '100': 'var(--color-secondary-100, #e1e3e6)',
    '200': 'var(--color-secondary-200, #c4c7cc)',
    '300': 'var(--color-secondary-300, #a6aab3)',
    '400': 'var(--color-secondary-400, #898e99)',
    '500': 'var(--color-secondary-500, #6b7280)',
    '600': 'var(--color-secondary-600, #565b66)',
    '700': 'var(--color-secondary-700, #40444d)',
    '800': 'var(--color-secondary-800, #2b2e33)',
    '900': 'var(--color-secondary-900, #15171a)',
    DEFAULT: 'var(--color-secondary, #6b7280)'
  },
}

The plugin is also adding the always needed following classes by default (same naming as default TailwindCSS properties) :

{
  inherit: 'inherit',
  current: 'currentColor',
  transparent: 'transparent',
  black: '#000',
  white: '#fff',
}

Simple Usage

Now in your application, you can use classes like bg-primary-500 or bg-primary-800 as usual.

DEFAULT is the variable used to generate bg-primary without suffix.

<span class="bg-primary text-secondary-400">
    Hello !
</span>

NOTE : primary and primary-500 have the same color attributed. It's a better idea to use it without suffix in your code (ex: bg-primary) if the goal is to replace the color globally using its CSS variable.

CSS Variables usage

Addition in the DOM

This plugin uses the addBase utility from tailwindcss/plugin package.

So in your DOM, under the :root attribute, you can now find all the css variables generated by the plugin :

css-variables.png

See more at : https://developer.mozilla.org/en-US/docs/Web/CSS/:root

Change scoped color in your component

Now, if you need to modify one of the color of a property, you can do it globally or component scoped, using the default Css Variables API.

:root {
  --color-primary: #D36060;
}

.my-custom-card {
  --color-primary-300: #C2714F;
  --color-secondary: #E0607E;
}

Documentation : https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties

Compatibility

This plugin is based on CSS Custom Properties, which are not compatible with IE11. You can have partial support for the browsers that do not support them by using a PostCSS plugin that add a fallback for CSS variables, such as postcss-css-variables or postcss-custom-properties.

License

This project is licensed under the MIT License.

Description from the npm listing.

  • tailwind
  • tailwindcss
  • palette
  • color-palette
  • css-variable
  • tailwind-plugin
  • tailwindcss-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

tailwindcss-css-variables-color-palette-plugin weekly downloads on npm, last 90 days: 24 weekly downloads as of Dec 5, 2026, +700% over 90 days.tailwindcss-css-variables-color-palett…Weekly downloads on npm · Last 90 days24downloads / week+700% over 90 days0510152025Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
tailwindcss-css-variables-color-palette-plugin weekly downloads on npm, last 90 days: 24 weekly downloads as of Dec 5, 2026, +700% over 90 days.

7/30/90-day growth

tailwindcss-css-variables-color-palette-plugin weekly downloads growth on npm: +118% over 7 days, +60.0% over 30 days, +700% over 90 days.tailwindcss-css-variables-color-palett…Weekly downloads growth on npm24downloads / week now7-day growth+13 weekly downloads+118%30-day growth+9 weekly downloads+60.0%90-day growth+21 weekly downloads+700%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
tailwindcss-css-variables-color-palette-plugin weekly downloads growth on npm: +118% over 7 days, +60.0% over 30 days, +700% over 90 days.

Ranking history

tailwindcss-css-variables-color-palette-plugin npm ranking history: currently #2952 (by weekly downloads).tailwindcss-css-variables-color-palett…npm ranking · by weekly downloads · Last 90 days#2952current rank#2000#2200#2400#2600#2800#3000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
tailwindcss-css-variables-color-palette-plugin npm ranking history: currently #2952 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 148, #14 (overall #2,954)
All npm: every listing in weekly downloads order

Listing placement

Tailwind plugins292 listings · 15 pages · page 9, #11 (overall #171)
Tailwind plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (170)
Recent weekly downloads observations for tailwindcss-css-variables-color-palette-plugin
Date (UTC)Weekly downloadsChange vs. previous
24-1
25+3
22+4
18+10
8+2
6-1
7-4
11+1
10-3
13-10
23+2
21-1
22+1
21—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/tailwindcss-css-variables-color-palette-plugin. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.