🖼️ Pixel Art Generator
Draw pixel art on a grid (4–24 cells per side) using one of six fixed colors, then export it as character art or CSS.
📐 计算公式 / 原理
网格尺寸限 4-24,越界报错;8×8 时载入预置笑脸位图(置 1 处填 #92400E),其余尺寸全空;画布单元格 32px、间距 2px、列数 = 网格尺寸;字符画预览:有色的格记 ■、空白记 ·;点击按当前颜色上色,擦除模式恢复 #e2e8f0
Grid size ranges from 4 to 24 and colors come from a fixed set of six. Clicking a cell writes the current color into a 2-D array, which feeds the character-art preview and the CSS box-shadow export. The page does not read images or perform automatic pixelation or color quantization.
📚 深度解析:Pixel Art Generator
💡 常见使用场景
- 网格手绘像素画。
- 头像/图标复古。
- 游戏素材。
❓ 常见问题(FAQ)
- 色越多越真?
- 是,但失像素味;按风格权衡色数。
- 块大小怎么选?
- 块越大越像素化;小图用小块更细腻,大图可用大块出风格。
- 会保存或上传我的内容吗?
- 结果以浏览器实时计算为准,纯前端本地处理、数据不上传;生成的样式与代码仅作快速产出参考,正式项目请以设计系统、规范与浏览器实测为准。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Grid and painting | grid 4–24; a click writes the current color into a 2-D array, erase writes #e2e8f0 | This page |
| Character art / CSS | filled cells become ■ and empty ones ·; CSS reproduces each filled cell as a 16px-step box-shadow | This page's export |
| Preset pattern | only 8×8 loads the 48-cell smiley; other sizes start blank | This page |
⚠️ 使用说明与注意事项
- 点击网格上色,支持绘制/擦除两种模式
- 6 种基础色板,网格 4-24 可调
- 字符画用 ■ / · 表示像素,可复制或导出 .txt
- 支持导出 CSS 像素块(box-shadow 方案)
- 纯本地绘制,图案不保存不上传