@catppuccin/palette

中文文档
1.8.0发布于 2026/03/22MITTypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 6.9万

Soothing pastel themes for the high-spirited!

原始使用文档
文档目录6 节
  1. Catppuccin Palettes
  2. Usage
  3. Node
  4. Deno
  5. Other available formats
  6. Graphics editors

Logo
Catppuccin Palettes

Usage

Node

The library is available on npm:

npm install @catppuccin/palette
import { flavors, flavorEntries, version } from "@catppuccin/palette";
import chalk from "chalk";

// a string containing the version of the library
console.log(version);

// an object containing all catppuccin flavors
console.log(flavors);

// typed helper when iterating flavors
flavorEntries.map(([_, flavor]) => {
  console.log(`${flavor.name} is a ${flavor.dark ? "dark" : "light"} theme.`);
  console.log(`It has ${flavor.colorEntries.length} colors:`);

  // same for the colors
  flavor.colorEntries.map(([colorName, { hex, rgb, accent }]) => {
    console.log(
      chalk.bgRgb(rgb.r, rgb.b, rgb.g)(` ${hex} `),
      colorName,
      accent
    );
  });
  console.log("\n");

  // same for the ansi colors
  flavor.ansiColorEntries.map(([colorName, ansi]) => {
    console.log(
      chalk.hex(ansi.normal.hex)(`[${ansi.normal.code}] Normal ${colorName}`)
    );
    console.log(
      chalk.hex(ansi.bright.hex)(`[${ansi.bright.code}] Bright ${colorName}`)
    );
  });
});

Deno

The library is available through JSR and deno.land/x/catppuccin:

import {
  flavors,
  flavorEntries,
  version,
} from "https://deno.land/x/catppuccin/mod.ts";
import { bgRgb24 } from "https://deno.land/std/fmt/colors.ts";

// a string containing the version of the library
console.log(version);

// an object containing all catppuccin flavors
console.log(flavors);

// typed helper when iterating flavors
flavorEntries.map(([_, flavor]) => {
  console.log(`${flavor.name} is a ${flavor.dark ? "dark" : "light"} theme.`);
  console.log(`It has ${flavor.colorEntries.length} colors:`);

  // same for the colors
  flavor.colorEntries.map(([colorName, { hex, rgb, accent }]) => {
    console.log(bgRgb24(`  ${hex}  `, { ...rgb }), colorName, accent);
  });
  console.log("\n");
});

Other available formats

Graphics editors

Please use the respective files in the latest GitHub Release:

ProgramsDirectory
Adobe Suite, Affinity Suite, Sipase/
Aseprite, Gimp, Inkscape, Kritagimp/
Procreateprocreate/
Apple Color List (.clr)clr/

 

Copyright © 2021-present Catppuccin Org

版本与发布记录

@catppuccin/palette 共发布 25 个版本,首次发布于 2022/05/16;过去 12 个月发布了 1 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.8.0latest2026/03/227 个月前
2.0.0-beta.1beta2025/04/201.6 年前
1.7.12024/11/032 年前
1.7.02024/11/022 年前
1.6.02024/11/022 年前
1.5.02024/10/272 年前

关于 @catppuccin/palette 的常见问题

@catppuccin/palette 是什么?

Soothing pastel themes for the high-spirited!

如何安装 @catppuccin/palette?

在项目目录运行 npm install @catppuccin/palette,或使用 pnpm add / yarn add / bun add。

@catppuccin/palette 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@catppuccin/palette 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@catppuccin/palette 可以商用吗?

@catppuccin/palette 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@catppuccin/palette 的下载量有多少?

根据 npm 官方下载统计,@catppuccin/palette 在 2026/10/09 – 2026/11/07 这 30 天内被下载 68,740 次,日均约 2,291 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@catppuccin/palette 还在维护吗?

最新版本 1.8.0 发布于 2026/03/22(7 个月前);至今共发布 25 个版本,其中过去 12 个月发布了 1 个;首次发布于 2022/05/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。