# @catppuccin/palette 中文文档

规范地址：https://npmcn.com/package/%40catppuccin/palette/

版本：1\.8\.0
npm 元数据更新时间：2026-03-21T22:20:06.189Z
中文译文更新时间：2026-11-09T04:51:19.007Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40catppuccin/palette
原文对照：https://npmcn.com/package/%40catppuccin/palette/?lang=original
项目主页：https://github.com/catppuccin/palette#readme
源码仓库：https://github.com/catppuccin/palette

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：802 kB，25 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- 首次发布：2022-05-16T00:44:01.170Z
- 最新版本发布：2026-03-21T22:20:05.881Z
- 近 30 天下载量：68740（2026-10-09 至 2026-11-07，npm 官方下载统计）
- 已发布版本数：25（近 12 个月 1 个）

## 中文简介

给高气压的贴心题材!

## 安装

```sh
npm install @catppuccin/palette
```

也可以使用：`pnpm add @catppuccin/palette`、`yarn add @catppuccin/palette`、`bun add @catppuccin/palette`

## README

### ![Logo](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png)  
![](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png) 卡通调色板 ![](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png)

[![](https://img.shields.io/github/stars/catppuccin/palette?colorA=363a4f&colorB=b7bdf8&style=for-the-badge)](https://github.com/catppuccin/palette/stargazers) [![](https://img.shields.io/github/issues/catppuccin/palette?colorA=363a4f&colorB=f5a97f&style=for-the-badge)](https://github.com/catppuccin/palette/issues) [![](https://img.shields.io/github/contributors/catppuccin/palette?colorA=363a4f&colorB=a6da95&style=for-the-badge)](https://github.com/catppuccin/palette/contributors)

## 使用量

### 节点

该图书馆可上网查阅 [无](https://www.npmjs.org/package/@catppuccin/palette)数字 :

```console
npm install @catppuccin/palette
```

```ts
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}`)
    );
  });
});
```

### 德诺

该图书馆可通过下列途径提供: [日 尔](https://jsr.io/@catppuccin/palette) 财务报告和审定财务报表 [`deno.land/x/catppuccin`](https://deno.land/x/catppuccin)数字 :

```ts
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");
});
```

## 其他可用格式

-   网络开发
    -   [支助科](https://npmcn.com/package/%40catppuccin/palette/docs/css.md)
    -   [萨斯](https://npmcn.com/package/%40catppuccin/palette/docs/sass.md)
-   此库的端口
    -   [埃利克斯尔](https://github.com/catppuccin/elixir)
    -   [小蝶头](https://github.com/catppuccin/flutter)
    -   [欢乐](https://github.com/catppuccin/gleam)
    -   [走开](https://github.com/catppuccin/go)
    -   [爪哇语](https://github.com/catppuccin/java)
    -   [卢亚](https://github.com/catppuccin/lua)
    -   [纳姆](https://github.com/catppuccin/nim)
    -   [蟒](https://github.com/catppuccin/python)
    -   [鲁比](https://github.com/catppuccin/ruby)
    -   [锈](https://github.com/catppuccin/rust)
    -   [尾风 CSS](https://github.com/catppuccin/tailwindcss)
    -   [五、结 论](https://github.com/catppuccin/v)

## 图形编辑器

请使用相应的文件 [最新的 GitHub 发布](https://github.com/catppuccin/palette/releases/latest)数字 :

| 程序 | 目录 |
| --- | --- |
| 阿多比套房 无限套房 口水 | `ase/` |
| 活字、 Gimp、 Inkscape、 Krita | `gimp/` |
| 创建 | `procreate/` |
| 苹果颜色列表 (. clr) | `clr/` |

![](https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true)

版权: 2021年至今 [猫头鹰](https://github.com/catppuccin)

[![](https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8)](https://github.com/catppuccin/catppuccin/blob/main/LICENSE)

## 常见问题

### @catppuccin/palette 是什么？

给高气压的贴心题材\!

### 如何安装 @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 和提交记录判断。

