# @hanzo/brand 中文文档

规范地址：https://npmcn.com/package/%40hanzo/brand/

版本：1\.5\.0
npm 元数据更新时间：2026-10-23T03:07:53.067Z
中文译文更新时间：2026-11-17T08:10:16.647Z
软件包许可：MIT

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

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

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

- 包体积（解压后）：279 kB，45 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：1 个
- peer 依赖：react \>=19\.2\.8
- 首次发布：2024-06-16T18:26:12.971Z
- 最新版本发布：2026-10-23T03:07:52.867Z
- 近 30 天下载量：12501（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：56（近 12 个月 13 个）

## 中文简介

汉藏AI的官方品牌资产和设计系统

## 安装

```sh
npm install @hanzo/brand
```

也可以使用：`pnpm add @hanzo/brand`、`yarn add @hanzo/brand`、`bun add @hanzo/brand`

## README

![@hanzo/brand](https://npmcn.com/package/%40hanzo/brand/.github/hero.svg)

# @hanzo/品牌

韩佐品牌身份的单一真相来源——设计标志,标志,, 主题、文件主题和 README/og:图像 **英雄生成器** ——共享 每一个汉佐,鲁克思,和动物园都一样 所以他们看起来和感觉都一样.

```bash
npm install @hanzo/brand
```

## 键

```ts
import { colors, typography, brand } from '@hanzo/brand';

brand.name;           // from brand.json — the single source of truth
brand.docsDomain;     // 'docs.hanzo.ai'
```

汉佐调色板是 **纯一色** (黑色+白色,Vercel/Linear风格)- 没有颜色口音. `brand.json` 有名有名 域 社会主题.

**CSS 变量来自 [`@hanzo/tokens`](https://git.hanzo.ai/hanzoai/ui)。 。 。 .** `styles/variables.css` 不是手写的,而是软件包产生的 捆绑,由 `scripts/gen-variables.mjs` (加上薄相容块) go 仪表板仍为参考). 要更改一个值,请编辑 `@hanzo/tokens` `src/theme.ts`运行 `pnpm --filter @hanzo/tokens gen-css`,则 `pnpm gen` 在这里。 跳出表面( O)`ci`编号 :`cd`编号 :`git` 仪表板)卖出这张纸,所以 整个庄园都有一个调色板.

## 社会卡工具包

一个布局引擎, **任何品牌**. 零依赖 SVG——没有浏览器/扫描器. 一样 代码生成一个 repo README 英雄, 一个 og: image, 以及博客/ 公告/ 引用 纸牌。 标记来源于 [`@hanzo/logo`](https://npmcn.com/package/%40hanzo/logo) (单一来源).

| 函数 | 纸牌 |
| --- | --- |
| `renderHero` | 读取英雄/ og 横幅 |
| `renderPost` | 博客文章( 标签、 标题、 作者 ) |
| `renderAnnouncement` | 发射/大声明 |
| `renderQuote` | 拉动引号 |

### 默认单色; 每个品牌多彩

每个函数默认为 **单色** — 白色标记+文本,白色口音 (韩佐与吕克. 一个品牌通过通过自己的,变得色彩鲜艳 `Palette`数字 :

| 品牌 | 调色板 |
| --- | --- |
| **汉三** | 单色- 白色块- H, 白色口音 |
| **吕克思** | 单色- 白色三角形, 白色口音 |
| **动物园** | 有色-棱镜标记+ `accentColors` 棱镜梯度 |

```ts
interface Palette {
  accent?: string          // highlight; default WHITE (monochrome)
  accentColors?: string[]  // multi-color accent → gradient rule (Zoo prism)
  fg?: string; bg?: string // text / canvas (default white / near-black)
  markInner?: string       // a brand's own mark SVG (from @<org>/logo)
  markViewBox?: string
}
```

### 把它拉入读取器( 每回转)

```bash
npx @hanzo/brand hero \
  --title "@hanzo/ai" \
  --tagline "The AI app as one declarative component" \
  --out .github/hero.svg
```

```md
<p align="center"><img src=".github/hero.svg" alt="@hanzo/ai" width="100%" /></p>
```

CLI 从最近处填补默认值 `brand.json`,所以每个repo得到一个独特的, {\\fn黑体\\fs22\\bord1\\shad0\\3ahbe\\4ah00\\fscx67\\fscy66\\2chffffff\\3ch808080}有一个命令的品牌英雄.

### 程序( og: image 路由, 任何品牌)

```ts
import { renderHero, renderPost } from '@hanzo/brand';

// Hanzo / Lux — monochrome (no palette needed):
renderHero({ title: 'Lux Node', tagline: 'GPU-native multichain consensus',
             github: 'github.com/luxfi', docs: 'docs.lux.network' });

// Zoo — colorful: pass the prism mark (from @zooai/logo) + accent colors:
renderPost({ title: 'Proof-of-AI', tag: 'DeSci', author: 'Zoo Labs',
             accent: '#00A652',
             accentColors: ['#ED1C24','#FCF006','#00A652','#01ACF1','#2E3192'],
             markInner: zooPrismSvg, markViewBox: '222 221 580 580' });
// Rasterize to PNG for og:image with resvg-js / satori / sharp / rsvg-convert.
```

## 文档主题

`@hanzo/brand` 与Fumadocs兼容的主题,所以每个产品的docs网站 自动继承品牌 :

```ts
import { docsTheme } from '@hanzo/brand';   // CSS variables for fumadocs
```

## 出口

`.` (电话、主题、, `brand`, (中文(简体) ), `renderHero`, (中文(简体) ), `renderPost`, (中文(简体) ), `renderAnnouncement`, (中文(简体) ), `renderQuote`· `./hero` • 妇女 `./loader` (单位:千美元)`loadBrand`, (中文(简体) ), `getDocsUrl`,(......) `./brand.json` • 妇女 `./assets/*` • 妇女 `./styles/*`。标记几何来自 [`@hanzo/logo`](https://npmcn.com/package/%40hanzo/logo) (单位:千美元)`MARK_PATHS`) (中文(简体) ).

## 许可证

麻省理工学院.

## 常见问题

### @hanzo/brand 是什么？

汉藏AI的官方品牌资产和设计系统

### 如何安装 @hanzo/brand？

在项目目录运行 npm install @hanzo/brand，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 hanzo-brand，可以用 npx hanzo-brand 直接运行。

### @hanzo/brand 支持 TypeScript 吗？

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

### @hanzo/brand 支持 ESM 还是 CommonJS？

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

### @hanzo/brand 可以商用吗？

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

### @hanzo/brand 的下载量有多少？

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

### @hanzo/brand 还在维护吗？

最新版本 1\.5\.0 发布于 2026/10/23（25 天前）；至今共发布 56 个版本，其中过去 12 个月发布了 13 个；首次发布于 2024/06/17。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

