--- id: Mathews-Tom/armory/concept-to-image version: "ff7871b1" license: MIT install: manual updated: 2026-07-21 --- # concept-to-image — Concept to Image transforms design ideas into polished visuals by rendering HTML and CSS through an intermediate artifact layer, then exporting to PNG or SVG. Refine colors, layout, and content directly in the HTML before finalizing the image output. Publisher: Mathews-Tom · Stars: 274 · Updated: 2026-07-21 Install (manual): `git clone https://github.com/Mathews-Tom/armory` ## SKILL.md # Concept to Image Creates polished visuals from concepts using HTML/CSS/SVG as a refineable intermediate, then exports to PNG or SVG. ## Reference Files | File | Purpose | | ---------------------------- | ------------------------------------------------------------------------------------ | | `references/design-guide.md` | Design patterns, anti-patterns, color palettes, typography choices, layout examples | | `scripts/render_to_image.py` | Playwright-based export script — takes HTML in, PNG or SVG out | | `assets/template.html` | Base HTML template with `.canvas` container and CSS custom properties pre-configured | ## Why HTML as intermediate HTML is the refineable layer between idea and image. Unlike direct canvas rendering, the user can see the HTML artifact, request changes ("make the title bigger", "swap the colors", "add a third column"), and only export once satisfied. This makes the workflow iterative and controllable. ## Workflow ```text Concept → HTML artifact (view + refine) → PNG or SVG export ``` 1. **Interpret** the user's concept — determine what kind of visual best fits (diagram, infographic, card, chart, etc.) 2. **Design** a self-contained HTML file using inline CSS and inline SVG — zero external dependencies 3. **Present** the HTML as an artifact so the user can preview and request refinements 4. **Iterate** on the HTML based on user feedback (colors, layout, content, sizing) 5. **Export** to PNG and/or SVG when the user is satisfied, using `scripts/render_to_image.py` ## Step 1: Interpret the concept Determine the best visual format: | User intent | Visual format | Approach | | ------------------------ | ----------------------------- | ---------------------------------- | | Explain a process/flow | Flowchart or pipeline diagram | SVG paths + boxes | | Compare items | Side-by-side or matrix | CSS Grid | | Show hierarchy | Tree or layered diagram | Nested containers + SVG connectors | | Present data | Chart or infographic | SVG shapes + data labels | | Social/marketing graphic | Card or poster | Typography-forward HTML/CSS | | Icon, logo, badge | Compact symbol | Pure SVG | | Educational concept | Annotated diagram | SVG + positioned labels | ## Step 2: Design the HTML Read `references/design-guide.md` for detailed design patterns and anti-patterns. Core rules: - **Single file, self-contained**: All CSS inline in `