算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
design-tokens【设计与创意】Use when the user asks for design tokens, DTCG tokens, theme systems, color/typography/spacing/radius/elevation/motion tokens, translating tokens, exporting tokens, making a Compose color scheme from a palette, auditing tokens, or sharing a single token source across web and native. Generates, audits, and translates W3C DTCG tokens to Tailwind v4 @th…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Goal: one DTCG-format JSON, four platform outputs. No drift.
../../scripts/token_export.py.Every token bundle this skill produces or consumes is in W3C Design Tokens Community Group format. Keys:
$value — the literal value$type — color | dimension | fontFamily | fontWeight | duration | shadow | typography$description — human-readable rationale (kept in the token; not a comment)Example:
{
"color": {
"brand": {
"primary": { "$value": "#3b1c0f", "$type": "color", "$description": "Hero accent — used like a weapon" },
"primary-hover": { "$value": "{color.brand.primary}", "$type": "color" }
}
},
"spacing": {
"xs": { "$value": "4px", "$type": "dimension" },
"sm": { "$value": "8px", "$type": "dimension" }
},
"type": {
"display": {
"$value": { "fontFamily": "PP Editorial New", "fontSize": "72px", "fontWeight": 400, "lineHeight": 1.05 },
"$type": "typography"
}
}
}
| Platform | Output target |
|---|---|
| Web (Tailwind v4) | @theme { --color-brand-primary: ...; } block |
| Web (CSS) | :root { --color-brand-primary: ...; } |
| Apple (SwiftUI) | extension Color { static let brandPrimary = ... } + Color asset catalog JSON |
| Android (Compose) | ColorScheme(primary = Color(0xFF...), ...) + Typography |
| Windows (WinUI 3) | <ResourceDictionary> with <Color>, <SolidColorBrush>, <x:Double> |
Use ../../scripts/token_export.py for the translation — never hand-translate. Tokens drift fast.
Three cases where token work is wrong:
State this explicitly if the user asks to "tokenize everything." Push back once.
When asked to audit a token set:
box-shadow for native, where elevation is tonal).#3b82f6 exposed as a token name)$type (some tools won't validate without it)Shipped in ../../assets/tokens/:
fluent-2.json — Microsoft Fluent 2 referencematerial3-expressive.json — M3E reference (M3E adds wave/morph tokens vs M3)apple-system.json — iOS/macOS semantic system colorsawwwards-editorial.json — bespoke "editorial Swiss" exampleawwwards-brutalist.json — bespoke "tactile brutalist" example