项目的 README,来自 github.com/zwhy149/bead-grid-studio。合并为一个 markdown 文件:README.md。
Turn images into editable, printable fuse-bead patterns.
Color matching, per-cell color codes, board guides, and material counts run locally in your browser.
English · 日本語 · 한국어 · Français · 简体中文
🚀 Live Demo · ⬇ Offline / Release · 30s Quick Start · 💻 Core API (@bead-grid/core) · 📐 Schemas · ⚡ Benchmarks · 📊 Project Health · ⭐ Star on GitHub
Bead Grid Studio is a local-first fuse-bead pattern generator. It has no account, image-upload API, analytics SDK, or cloud conversion service.
Both sides use the repository's original rocket fixture. The right side is a screenshot of the real running app, not an AI-generated product mockup.
| Original image | Generated pattern, ready to edit |
|---|---|
![]() |
![]() |
Run
npm run capture:docsto regenerate the screenshot from the same fixture. See Screenshots for complete desktop and mobile views.
1-1, 1-2, ...), and material counts.<=2-bead rare accents in one click.anna-app/): optional native schema: 4 app package (bead-studio stdio Executa, bead-craft-coach Skill, APS state sync) with zero overhead standalone.You can instead select Choose Image and use PNG, JPEG, WebP, or GIF. The image is decoded and converted only in the current browser.
| Goal | Fastest route | Installation |
|---|---|---|
| Convert an image now | Open the live demo | None |
| Work offline or carry the app on a USB drive | Download the portable HTML | None |
| Batch conversion / Headless script automation | CLI Tool (bead-grid) |
Node.js |
| Embed conversion engine in Node.js or web app | @bead-grid/core package | Node.js |
| Run inside Anna AI OS (AI Coach + Executa) | Anna AI OS Edition | Anna OS / npm run build:anna |
| Publish your own copy | Fork and deployment guide | GitHub account; Cloudflare optional |
| Modify or contribute code | Developer Guide | Node.js |
Regular users do not need the source code or Node.js. The offline app is one self-contained HTML file for modern browsers on Windows, macOS, and Linux:
bead-grid-studio-vX.Y.Z.html, where X.Y.Z is the version.Source code ZIP as the offline app.The portable HTML embeds the application, styles, Apache-2.0 license, and third-party notices with no CDN dependency. The Release also includes a ZIP and SHA256SUMS.txt; compare files only with checksums from the same Release:
# Windows PowerShell: run from the download directory
Get-FileHash .\bead-grid-studio-vX.Y.Z.html -Algorithm SHA256
Get-Content .\SHA256SUMS.txt
# Linux
sha256sum --check SHA256SUMS.txt
# macOS
shasum -a 256 bead-grid-studio-vX.Y.Z.html
On phones, prefer the hosted PWA and use the browser's “Add to Home Screen” action. The PWA must load once from HTTPS before its cached pages can open offline. Drafts live in the current browser's site data; export a JSON project before switching browsers or clearing that data.
A Fork gives a developer a practical starting point to:
The shortest route is:
Fork → Enable GitHub Actions → Settings → Pages → Deploy
The repository already includes its build, complete QA, and Pages workflow; do not commit dist manually. Follow the Fork and deployment guide to obtain a GitHub Pages URL in a few minutes. The same guide covers Cloudflare Pages when you need a custom domain and security response headers.
| English desktop workbench | English mobile workbench |
|---|---|
![]() |
![]() |
The rocket in these screenshots is an original fixture under tests/fixtures/ and may be reused under this repository's license.
The project does not promise lossless reproduction at 16 or 24 cells. It protects outlines, openings, and disconnected features when the target grid can represent them, then reports details that are physically smaller than one bead.
You can generate pattern specifications directly from your terminal or automated scripts:
# Generate 29x29 standard bead pattern with truecolor ANSI terminal preview
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 -h 29 --format ascii
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 --despeckle --format svg > rocket.svg
# Quantize using a custom 12-color starter palette and output JSON pattern
node bin/bead-grid.mjs image.png -w 29 -p examples/palettes/mini-starter-12.json -o pattern.json
See CLI Documentation and Node.js Integration Example.
Bead Grid Studio is not only an end-user Web/PWA application. The repository also provides a complete, reusable open-source stack:
packages/core/, @bead-grid/core): Runtime-agnostic, zero-dependency ES module executing OKLab and CIEDE2000 color matching identically across Node.js, Web Workers, and Deno. See Core Documentation.bin/bead-grid.mjs): Single-command terminal execution for batch conversion with 24-bit ANSI color terminal previews or JSON exports. See CLI Examples.schemas/): JSON Schema 2020-12 specifications liberating craft patterns from proprietary file formats. See Pattern Format Guide and Palette Format Guide.benchmarks/): Measures quantization latency, memory overhead, and 100% bitwise determinism across 16, 24, 32, 48, and 60 grid dimensions. See Benchmark Guide.examples/): Standalone examples for Browser, Node.js backend pipelines, and custom brand palettes.Web / PWA (Browser UI) ──────> Browser Adapter ──┐
Headless CLI (Node.js) ──────────────────────────┼──> @bead-grid/core
Node.js Pipeline / Script ───────────────────────┤ ├── Pattern Model & BOM
Automated Tests / Benchmarks ────────────────────┘ ├── OKLab / CIEDE2000 Matching
└── Open Schemas (2020-12)
For full system architecture diagrams and ASCII data flows, see ARCHITECTURE.md.
Call the core engine directly in Node.js with zero browser dependencies:
import { generateBeadPattern } from './packages/core/src/index.js';
// Pass raw pixel data (data: Uint8ClampedArray/Uint8Array, width, height)
const pattern = await generateBeadPattern(imagePixelData, {
cols: 29,
rows: 29,
palette: 'mard-compatible-base-221',
processMode: 'cartoon',
maxColors: 32,
});
console.log(`Total beads: ${pattern.statistics.totalBeads}`);
console.log(`Unique colors: ${pattern.statistics.usedColors}`);
console.log(`Top color code: ${pattern.materials[0].code} (${pattern.materials[0].count} beads)`);
Run executable integration examples:
node examples/node/index.mjs
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 -h 29 --format ascii
node bin/bead-grid.mjs tests/fixtures/rocket-badge.png -w 29 --despeckle --format svg > rocket.svg
npm run build:anna
npm run schema:validate
Node.js 22.12 or newer is required:
git clone https://github.com/zwhy149/bead-grid-studio.git
cd bead-grid-studio
npm ci
npm run dev
Run test and benchmark suites:
npm run setup
npm run qa # Runs source integrity, unit tests, and Playwright E2E
npm run benchmark # Runs quantization performance benchmarks
npm run health # Verifies local code health and public metrics
See the complete Developer Guide.
@bead-grid/core standalone package and headless Node.js CLI.See ROADMAP.md for the full evidence-driven roadmap.
Verifiable project health data and adoption indicators are documented in docs/project-health.md and docs/USAGE_METRICS.md.
Maintainers can run npm run metrics to read Stars, Forks, Open Issues, and real Release asset download counts from GitHub's public API. The script is not included in the web app and never tracks app visitors.
For reproducible project-activity signals, community review records, release safeguards, and explicit evidence boundaries, see Project health and public impact evidence.
H1 for manual editing.A grid is an information budget: 16×16 provides only 256 physical positions. A mark, thin letter, or highlight smaller than one cell cannot always remain an independent bead. The converter preserves representable structure and reports missing detail. See Algorithm and Known limitations.
The default palette is the base 221-code subset (A/B/C/D/E/F/G/H/M) from a pinned MIT-licensed source. Screen HEX values are approximations: displays, room light, printers, manufacturers, and production batches introduce differences. Verify expensive builds against the physical color card for the exact bead brand and batch. See Palette provenance.
MARD, Artkal, Hama, and Perler are third-party marks. This independent project is not affiliated with or endorsed by those brands. See TRADEMARKS.md.
Report security issues privately through SECURITY.md. Do not attach private, customer, or unlicensed images to a public Issue. GitHub Pages does not apply the optional _headers file; see Deployment for the exact hosting boundary.
For full system architecture diagrams and ASCII data flows, see ARCHITECTURE.md.
anna-app/ Anna AI OS schema-4 app package (manifest, bead-studio Executa, Craft Coach skill)
packages/core/ Decoupled DOM-free core quantization engine & TypeScript definitions
schemas/ Open data specifications (Pattern & Palette JSON Schema 2020-12)
bin/ Headless Node.js CLI tool (bead-grid)
examples/ Browser, Node.js, and CLI integration examples
src/ Browser app, core modules, i18n, and palette data
public/ PWA, offline cache, SEO, privacy, and legal pages
tests/unit/ Pure invariant tests & deterministic golden tests
tests/e2e/ Desktop, mobile, and browser tests
tests/fixtures/ Original or explicitly licensed fixtures
scripts/ Source checks, metrics, and portable build
docs/ Architecture, algorithm, deployment, provenance, and ADRs
Code is licensed under Apache-2.0. Third-party data and build-tool notices are in NOTICE. The license permits commercial reuse; it does not grant rights to the Bead Grid Studio name, logo, or third-party marks.
If the project genuinely saves you a manual redraw, consider starring it, sharing it with another maker, or filing a reproducible improvement. Stars never unlock features.
If this local-first open-source tool helped your fuse-bead projects, saved you time with color matching, or made your crafting workflow more delightful:
Buying the author a coffee ☕ is warmly appreciated! Your kindness and encouragement keep this project actively maintained and continuously evolving.
WeChat Pay · Feel free to include your GitHub handle in the note so we can acknowledge you!