Code → SVG screenshot generator
Turn code or terminal output into an SVG screenshot. No ext-gd / Imagick — output is plain text suitable for git diffs and CI artifacts. ANSI SGR (16 / 256 / 24-bit truecolor + bold / italic / underline) becomes <tspan> in the SVG.
composer require candycore/candy-freeze
use CandyCore\Freeze\SvgRenderer;
$svg = SvgRenderer::dracula()
->withLineNumbers(true)
->withWindow(true)
->withPadding(24)
->render($code);
file_put_contents('out.svg', $svg);
// ANSI input is honoured — SGR colours become <tspan> segments.
$svg = SvgRenderer::dark()
->render("\x1b[31merror:\x1b[0m something broke");
candyfreeze input.php -o out.svg, or SvgRenderer::dracula()->render($code).VHS-recorded GIFs of every example shipped with the library. Regenerated automatically on every push that touches the source.