PastelVG
PastelVG is a JSON-based representation of SVG graphics designed to be easier to read, edit, and generate programmatically.
Instead of working directly with complex XML, PastelVG expresses the same structure using a clean object model.
The Nice Slice can convert between SVG and PastelVG instantly with no loss of visual fidelity.
Why PastelVG Exists#
SVG is powerful, but the syntax can be difficult to read and manipulate in code.
PastelVG solves this by representing the structure of an SVG as JSON.
Benefits include:
- easier programmatic editing
- cleaner structure
- simpler debugging
- easier integration with modern tools
Example#
An SVG circle:
<circle cx="50" cy="50" r="40" fill="red" />
PastelVG representation:
{
"type": "circle",
"cx": 50,
"cy": 50,
"r": 40,
"fill": "red"
}
Both representations describe the same graphic, but the PastelVG format is easier to manipulate in code.
Working with PastelVG in The Nice Slice#
The Nice Slice allows you to:
- view SVG files as PastelVG
- edit PastelVG directly
- convert between formats instantly
- explore the structure of vector graphics
When you switch between SVG and PastelVG views, the visual canvas stays synchronized with the code.
Converting Between SVG and PastelVG#
Use the conversion tools inside The Nice Slice to switch formats.
SVG → PastelVG
PastelVG → SVG
The conversion engine preserves the visual result exactly, ensuring that your graphics remain pixel-perfect.
When to Use PastelVG#
PastelVG is especially useful when:
- generating graphics programmatically
- debugging complex SVG structures
- building tools that manipulate vector graphics
- learning how SVG graphics are constructed
It provides a clear view of the structure behind the image.