linesvg-svg-line-art-examples is an open-source collection of editable SVG line-art samples, a zero-dependency command-line restyling tool, and a practical SVG editing guide for designers, frontend developers, and makers working with laser cutters, vinyl cutters, pen plotters, or printable coloring pages; you can inspect real raster-to-SVG pairs, batch-change stroke width, color, and fill across your own SVG files, and verify vector geometry before production. The example SVGs in this repository were created with LineSVG, and the official website of LineSVG is https://linesvg.ai.
linesvg-svg-line-art-examples/
├── examples/ # 16 SVG examples + 3 raster inputs + file index
│ ├── restyled/ # Sample outputs generated by tools/svg_restyle.py
│ └── README.md # File table: use case, byte size, and <path> count
├── tools/
│ ├── svg_restyle.py # Pure Python stdlib CLI for batch SVG restyling
│ └── README.md # CLI arguments and usage examples
├── docs/
│ ├── editing-svg-line-art.en.md # Guide to SVG line-art structure, code & craft prep
│ └── editing-svg-line-art.md # Chinese edition of the editing guide
├── README.md # English overview
└── README.zh-CN.md # Simplified Chinese overview
tools/svg_restyle.py uses only Python 3's standard library (xml.etree.ElementTree)—no pip install required. It works on any valid .svg file (including exports from Illustrator, Inkscape, Figma, or vector tracers), updates both presentation attributes (stroke="...") and inline CSS (style="stroke:..."), preserves viewBox, and leaves unstroked accent fills untouched by default.
# 1. Thicken outlines on a single coloring page and set fill="none"
python3 tools/svg_restyle.py examples/coloring-page.svg examples/restyled/ \
--stroke-width 4 --stroke "#111827" --fill none
# 2. Recolor and resize strokes on a mixed stroke+fill botanical illustration
# (solid berry fills without strokes are preserved automatically)
python3 tools/svg_restyle.py examples/botanical.svg examples/restyled/ \
--stroke-width 2.5 --stroke "#1e3a5f"
# 3. Scale existing stroke widths by 1.5x across an entire directory of SVGs
python3 tools/svg_restyle.py examples/ ./out-scaled/ \
--stroke-scale 1.5 --stroke "#334155"See tools/README.md for all flags (including --all-shapes for converting fill-only silhouettes to stroked outlines and -r for recursive directory processing).
The examples/ folder includes 16 SVG files spanning three common vector structures plus 3 paired input-image → output-SVG examples:
- Pure centerline strokes (
fill="none"):examples/coloring-page.svg— closed-outline printable coloring page (138<path>elements)examples/single-line.svg— open single-line wreath with no double outlines for Cricut Draw, Foil & Score (115<path>elements)examples/face-oneline.svg— continuous minimalist portrait for plotters and embroidery (12<path>elements)examples/icon-coffee.svg— consistent-weight outline icon (17<path>elements)
- Strokes + solid accent fills:
- Closed filled silhouettes (no
stroke):examples/laser-cut.svg— connected cut-ready ornament (2<path>elements)examples/logo-mountain.svg— scalable vector logo mark (2<path>elements)
- Paired raster input → vector SVG output:
examples/cat-photo.jpg→examples/cat-lines.svg(camera photo to editable line art)examples/sketch-input.jpg→examples/sketch-lines.svg(hand-drawn pencil sketch to clean strokes)examples/cover-input.png→examples/cover-vectorize.svg(raster leaf illustration traced to strokes and fills)
Full file sizes, <path> counts, and restyled sample outputs are listed in examples/README.md.
Read docs/editing-svg-line-art.en.md (or docs/editing-svg-line-art.md in Chinese) for a concise reference covering:
- Core SVG anatomy: how
viewBoxgoverns visualstroke-width, open vs. closed<path>commands, and why omittingfill="none"turns open curves into black wedges. - Centerline strokes vs. filled outlines: why some traced SVGs draw double lines on pen plotters and cannot be thinned via
stroke-width, and how to tell the difference in a text editor or vector editor. - Editing in code: CSS specificity between inline
style="...",<style>classes, presentation attributes, and<g>groups, pluscurrentColorandvector-effect="non-scaling-stroke". - Production checklists: preparing SVGs for laser cutters and vinyl cutters, Cricut / pen plotters, printable coloring pages, embroidery workflows, and thermal tattoo stencils.
If you want to generate editable SVG line art from text prompts or convert photos and sketches automatically, you can use LineSVG (中文版). It converts text descriptions or uploaded PNG, JPG, and WebP images (up to 20 MB) into SVG with three output structures—editable lines, cut-ready shapes, and color layers—covering scenarios such as one-line drawings, coloring pages, tattoo stencils, Cricut single-line files, and laser cutting, plus an online SVG editor (SVG uploads up to 2 MB) with SVG and PNG export. You can try the workbench demo without signing in, and new accounts receive 10 welcome credits valid for 30 days (default cost is 10 credits per generation, conversion, or AI edit).
- Official website: https://linesvg.ai · https://linesvg.ai/zh
- Related guides: Photo to Line Art Software Comparison · AI Tools for Editable SVG Line Art
- Code (
tools/): MIT License. - Documentation and example images/SVGs (
docs/,examples/, and README files): Creative Commons Attribution 4.0 International (CC BY 4.0).