HomePluginsToolsGuidesPortfolioWorkflowAboutWork with usContact
GetSet

We build and fix production web applications, and publish the UI packages and free browser tools on this site.

info@get-set.it

Explore

  • Plugins
  • Tools
  • Guides
  • Portfolio

Company

  • About
  • Workflow
  • Work with us
  • Contact

Legal

  • Terms
  • Privacy
  • Accessibility
  • Cookies

© 2026 GetSet

We're on npm

Your Bundle

Your bundle is empty

Add plugins from the catalog to build one combined CDN link — like picking font families.

Browse plugins
Guides / Developer Content

Code Screenshots People Actually Read: Typography, Contrast and Sharing

How to make code images that stay legible on a phone — line length, font size, theme contrast, export resolution — and when a screenshot is the wrong format entirely.

By the GetSet engineering team · Published 2026-08-22 · 6 min read · Related tool: Code Image

The phone is the real screen

Most code screenshots are viewed on a phone in a social feed at roughly 350 CSS pixels wide. A snippet that looks perfect in your 1440px editor becomes unreadable at that size. The constraint that matters most is line length: keep it under ~60 characters, and if the real code is wider, reformat it for the image — break long chains, shorten variable names, drop unrelated arguments. An image is an illustration, not source control.

  • Font size: 16–20px equivalent in the exported image; nothing below 14.
  • Line count: 10–20 lines is the sweet spot; beyond 30, link to a gist instead.
  • Padding: generous margin around the code frame — it reads as intentional and survives platform cropping.

Contrast beats aesthetics

Pastel-on-dark themes look gorgeous in an editor and turn to mush after JPEG compression on a dim phone screen. Pick a theme whose comment color is still readable (many themes render comments at contrast ratios below 3:1), and test the exported image at 50% scale — if you cannot read it there, nobody will. Syntax highlighting should emphasize structure, not decorate it: keywords, strings and comments in three distinguishable tones is usually enough.

Turn any snippet into a shareable PNG with a window frame, syntax theme, custom background and adjustable padding using Code Image. To check that your chosen theme’s colors actually pass contrast, run them through Color Studio.

Export and accessibility

Export at 2× for crisp text on high-density screens — a 700px-wide frame should export at 1400px. PNG, not JPEG: JPEG artifacts around sharp text edges are the single biggest readability killer. And always pair the image with the code as text — in a gist link, in the post body, or at minimum in the alt text. Screen-reader users cannot read an image, and neither can the developer who wants to copy your snippet. A screenshot that cannot be copied is a small insult to the reader; make it an illustration of text that is available elsewhere.

When a screenshot is the wrong tool

  • Documentation and tutorials: use code blocks — searchable, copyable, version-controllable.
  • Bug reports: paste text; maintainers need to grep it, not squint at it.
  • Anything longer than a screen: link to a repository or gist.
  • Screenshots win for social posts, slides, newsletter headers and anywhere the platform cannot render code blocks.

Keep reading

Images

WebP vs AVIF vs PNG vs JPG: Choosing the Right Image Format in 2026

7 min read
Data

CSV, JSON and XLSX: The Conversion Pitfalls That Corrupt Your Data

8 min read
Code

Minify vs Beautify: What Code Formatting Actually Does to Your Files

6 min read

We write these guides from our client work. If you’d rather have it built than explained, we’re available.

Work with us Contact us