@hanzo/brand

中文文档
1.5.0发布于 2026/10/23MITTypeScriptESM + CJS近 30 天下载 1.3万

Official brand assets and design system for Hanzo AI

原始使用文档
文档目录8 节
  1. Tokens
  2. Social-card toolkit
  3. Monochrome by default; colorful per brand
  4. Rip it into a README (per repo)
  5. Programmatic (og:image route, any brand)
  6. Docs theming
  7. Exports
  8. License

@hanzo/brand

@hanzo/brand

The single source of truth for Hanzo brand identity — design tokens, logos, themes, docs theming, and a README/og:image hero generator — shared across every Hanzo, Lux, and Zoo repo so they all look and feel the same.

npm install @hanzo/brand

Tokens

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

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

The Hanzo palette is pure monochrome (black + white, Vercel/Linear style) — no color accent. brand.json is canonical: names, domains, socials, theme.

CSS variables come from @hanzo/tokens. styles/variables.css is NOT hand-authored — it is that package's generated bundle, re-emitted by scripts/gen-variables.mjs (plus a thin compatibility block for legacy names the Go dashboards still reference). To change a value, edit @hanzo/tokens src/theme.ts, run pnpm --filter @hanzo/tokens gen-css, then pnpm gen here. Go surfaces (ci/cd/git dashboards) vendor this sheet, so the whole estate shares one palette.

Social-card toolkit

One layout engine, any brand. Zero-dependency SVG — no browser/canvas. Same code generates a repo README hero, an og:image, and blog/announcement/quote cards. The mark is sourced from @hanzo/logo (single source).

FunctionCard
renderHeroREADME hero / og banner
renderPostblog post (tag, title, author · date)
renderAnnouncementlaunch / big statement
renderQuotepull-quote

Monochrome by default; colorful per brand

Every function defaults to monochrome — white mark + text, white accent (Hanzo and Lux). A brand goes colorful by passing its own Palette:

BrandPalette
Hanzomonochrome — white block-H, white accent
Luxmonochrome — white triangle, white accent
Zoocolorful — prism mark + accentColors prism gradient
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
}

Rip it into a README (per repo)

npx @hanzo/brand hero \
  --title "@hanzo/ai" \
  --tagline "The AI app as one declarative component" \
  --out .github/hero.svg
<p align="center"><img src=".github/hero.svg" alt="@hanzo/ai" width="100%" /></p>

The CLI fills defaults from the nearest brand.json, so each repo gets a unique, on-brand hero with one command.

Programmatic (og:image route, any brand)

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.

Docs theming

@hanzo/brand ships a Fumadocs-compatible theme so every product's docs site inherits the brand automatically:

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

Exports

. (tokens, themes, brand, renderHero, renderPost, renderAnnouncement, renderQuote) · ./hero · ./loader (loadBrand, getDocsUrl, …) · ./brand.json · ./assets/* · ./styles/*. Mark geometry comes from @hanzo/logo (MARK_PATHS).

License

MIT © Hanzo AI Inc.

版本与发布记录

@hanzo/brand 共发布 56 个版本,首次发布于 2024/06/17;过去 12 个月发布了 13 个版本。

版本发布日期距今
1.5.0latest2026/10/2325 天前
1.4.82026/08/272 个月前
1.4.72026/08/252 个月前
1.4.62026/08/103 个月前
1.4.52026/07/283 个月前
1.4.42026/07/253 个月前

关于 @hanzo/brand 的常见问题

@hanzo/brand 是什么?

Official brand assets and design system for Hanzo 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 和提交记录判断。