When a vector beats a picture
A background that is a gradient or a repeating motif is a few numbers, and a vector file keeps it as those numbers: a 1920 × 1080 blueprint grid is a couple of kilobytes of SVG against hundreds as a PNG, and it is sharp on every screen density. Where the background must be a file rather than CSS — a CMS field, an email builder, a slide master — SVG is usually the right one.
Not every layer has an SVG form, and the useful thing a tool can do is say which. This page writes each layer as SVG’s own gradient or pattern where one exists, writes a clearly labelled approximation where it does not, and refuses outright for grain, which no vector can carry.
Limits
- Grain (noise layers) cannot be exported as SVG.
- SVG interpolates in sRGB; OKLCH ramps are sampled every 4%, which is close but not identical.
- Some editors ignore mix-blend-mode; browsers honour it.
Questions people ask
- Which designs come out as an exact SVG?
- Linear and radial gradients in sRGB, flat colours, patterns (dots, grid, stripes, checks, waves) and the vignette are written as the same construction the canvas draws. The panel says 'the same construction as the canvas' when that is true for the whole design.
- What is approximate, and why?
- SVG blends gradient stops in sRGB, so an OKLCH ramp is written with a stop every 4% computed in OKLCH: close, but sampled. SVG has no conic gradient, so a conic layer is written as 180 thin wedges. A true mesh is written as soft spots over its average colour. Each approximation is listed under the button.
- Why is the SVG button switched off for my design?
- Because it has a noise layer, and grain has no vector form. Rather than writing a file that silently drops it, the page asks you to take the grain out or save a PNG.
- Will blend modes work?
- They are written as mix-blend-mode, which browsers draw. Some desktop design programs ignore it when they open an SVG, and the note says so when the design uses one.
Other background jobs
- Background makerA gradient, grain field or flat colour drawn at any pixel size, with its CSS.
- Pattern backgroundDots, grid, stripes, checks or waves, periodic by construction, over any ground.
- GradientStops, an angle, and a choice about the space the ramp runs through.
- Which format for a backgroundWhat each format does to a ramp, with the weights measured rather than asserted.