geometric-elements
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGeometric Elements Generator
几何元素生成器
Create decorative geometric elements with code using Pixie-python.
使用Pixie-python通过代码生成装饰性几何元素。
Quick Start
快速开始
bash
undefinedbash
undefinedInstall dependency (first time only)
安装依赖(仅首次运行)
pip install pixie-python
pip install pixie-python
Generate element (ask user for brand color or check their brand guidelines)
生成元素(请询问用户品牌颜色或查看其品牌规范)
python .claude/skills/geometric-elements/scripts/generate.py corner-accent
--color "#HEX_COLOR"
--size 200
--output media/output/corner.png
--color "#HEX_COLOR"
--size 200
--output media/output/corner.png
**Important:** Always ask user for brand colors or check their brand guidelines skill (e.g., `/thepexcel-brand-guidelines`) before generating.python .claude/skills/geometric-elements/scripts/generate.py corner-accent
--color "#HEX_COLOR"
--size 200
--output media/output/corner.png
--color "#HEX_COLOR"
--size 200
--output media/output/corner.png
**重要提示:** 生成前请务必询问用户品牌颜色,或查看其品牌规范技能(例如`/thepexcel-brand-guidelines`)。Available Elements
可用元素
| Element | Command | Description |
|---|---|---|
| Basic Shapes | | circle, star, heart, hexagon, arrow, etc. |
| Corner Accent | | L-shaped corner decoration |
| Line Divider | | Horizontal divider with gradient |
| Arc Accent | | Curved arc |
| Frame Border | | 4-corner bracket frame |
| Pattern | | Repeating dots/crosses/diamonds |
| Mandala | | Sacred geometry / complex patterns |
| 元素 | 命令 | 描述 |
|---|---|---|
| 基础图形 | | 圆形、星形、心形、六边形、箭头等 |
| 边角装饰 | | L形边角装饰 |
| 线条分隔符 | | 带渐变的水平分隔线 |
| 圆弧装饰 | | 弧形线条 |
| 边框框架 | | 四角支架式边框 |
| 重复图案 | | 重复的圆点/十字/菱形图案 |
| 曼陀罗图案 | | 神圣几何/复杂图案 |
Common Options
通用选项
| Option | Description | Default |
|---|---|---|
| Primary color (hex) | |
| Secondary color for gradient | None |
| Element size in pixels | 200 |
| Canvas width | 400 |
| Canvas height | 400 |
| Stroke width | 4 |
| Output file path | |
| | None |
| 0.0-1.0 | 1.0 |
| Fill shape (vs stroke) | False |
| 选项 | 描述 | 默认值 |
|---|---|---|
| 主色调(十六进制) | |
| 渐变次色调 | 无 |
| 元素尺寸(像素) | 200 |
| 画布宽度 | 400 |
| 画布高度 | 400 |
| 描边宽度 | 4 |
| 输出文件路径 | |
| 渐变类型: | 无 |
| 透明度(0.0-1.0) | 1.0 |
| 填充图形(替代描边) | False |
Examples
示例
Basic Shapes
基础图形
bash
undefinedbash
undefinedCircle (stroke)
圆形(描边)
python scripts/generate.py shape --style circle --color "#HEX" --size 100 --stroke 3
python scripts/generate.py shape --style circle --color "#HEX" --size 100 --stroke 3
Star (filled)
星形(填充)
python scripts/generate.py shape --style star --color "#HEX" --size 100 --sides 5 --fill
python scripts/generate.py shape --style star --color "#HEX" --size 100 --sides 5 --fill
Available: circle, ellipse, rectangle, square, rounded-rect, triangle,
可用图形:circle(圆形)、ellipse(椭圆)、rectangle(矩形)、square(正方形)、rounded-rect(圆角矩形)、triangle(三角形)、
polygon, star, diamond, ring, cross, arrow, heart, hexagon, octagon, crescent
polygon(多边形)、star(星形)、diamond(菱形)、ring(环形)、cross(十字)、arrow(箭头)、heart(心形)、hexagon(六边形)、octagon(八边形)、crescent(新月形)
undefinedundefinedCorner Accent
边角装饰
bash
python scripts/generate.py corner-accent --color "#HEX" --size 150 --stroke 4bash
python scripts/generate.py corner-accent --color "#HEX" --size 150 --stroke 4Gradient Line Divider
渐变线条分隔符
bash
python scripts/generate.py line-divider --color "#HEX" --color2 "#FFFFFF" --gradient linear --width 800bash
python scripts/generate.py line-divider --color "#HEX" --color2 "#FFFFFF" --gradient linear --width 800Mandala (Sacred Geometry)
曼陀罗图案(神圣几何)
bash
python scripts/generate.py mandala --color "#CCC" --bg "#0A0A0A" --size 400 --rings 8 --layers 4 --stroke 1.5→ More examples: references/element-catalog.md
bash
python scripts/generate.py mandala --color "#CCC" --bg "#0A0A0A" --size 400 --rings 8 --layers 4 --stroke 1.5→ 更多示例:references/element-catalog.md
Custom Elements (On-the-fly)
自定义元素(即时创建)
For complex patterns not in predefined commands, write Python directly:
python
import pixie
import math
image = pixie.Image(400, 400)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(0.83, 0.66, 0.29, 1.0) # RGB 0-1 range
ctx = image.new_context()
ctx.stroke_style = paint
ctx.line_width = 2
ctx.stroke_segment(50, 50, 350, 350)
image.write_file("output.png")→ Full API: references/pixie-api.md
对于预定义命令中没有的复杂图案,可直接编写Python代码:
python
import pixie
import math
image = pixie.Image(400, 400)
paint = pixie.Paint(pixie.SOLID_PAINT)
paint.color = pixie.Color(0.83, 0.66, 0.29, 1.0) # RGB 0-1 范围
ctx = image.new_context()
ctx.stroke_style = paint
ctx.line_width = 2
ctx.stroke_segment(50, 50, 350, 350)
image.write_file("output.png")→ 完整API文档:references/pixie-api.md
From Reference Image
基于参考图片生成
User can send reference images for Claude to analyze and recreate:
- User sends image — screenshot, design reference, pattern
- Claude analyzes — identifies shapes, colors, proportions
- Claude writes code — using pixie-python API
- Output — PNG ready to use
Tips for good reference: Clear image, geometric patterns (not photos), specify hex colors if needed.
用户可发送参考图片,由Claude分析并重现:
- 用户发送图片 — 截图、设计参考、图案
- Claude分析 — 识别形状、颜色、比例
- Claude编写代码 — 使用pixie-python API
- 输出结果 — 可直接使用的PNG图片
优质参考图提示: 图片清晰、为几何图案(非照片),如有需要可指定十六进制颜色。
Tips
小贴士
- Transparent bg — All outputs have transparent background by default
- High DPI — Use 2x for retina displays
--size - Gradients — Combine with
--gradient linearand--color--color2 - Brand colors — Always confirm with user or their brand guidelines first
- 透明背景 — 所有输出默认带透明背景
- 高DPI适配 — 针对视网膜显示屏,将设为2倍大小
--size - 渐变效果 — 结合与
--gradient linear、--color参数使用--color2 - 品牌颜色 — 请务必先与用户确认或查看其品牌规范
Related Skills
相关技能
- — Use elements in graphic designs
/graphic-designer - — Brand colors for elements
/thepexcel-brand-guidelines - — Decorative elements for presentations
/pptx
- — 在平面设计中使用这些元素
/graphic-designer - — 获取元素使用的品牌颜色
/thepexcel-brand-guidelines - — 为演示文稿添加装饰元素
/pptx