Code Screenshots With silicon
Turn a source file into a syntax-highlighted PNG for docs or slides.
Run silicon main.rs -o out.png to write a rendered code image.
01Command
Command
$ silicon main.rs -o out.png02What it does
silicon uses syntect to highlight a file and renders it with optional window decorations, shadows, line numbers and themes, producing images suitable for blog posts and presentations. It can also read from standard input and output to the clipboard.
03Risk
!Warning: Rendering needs a font that contains the glyphs you use; missing fonts can distort the output.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Homebrew formula: siliconEvidence: Create beautiful image of your source code. Packages silicon, a tool that renders source code into syntax-highlighted images.
- Official project documentationEvidence: Packages silicon, a tool that renders source code into syntax-highlighted images.
Last verified: 2026-09-22 · Category: Media