Scala

Scala Code Screenshot Generator

Turn Scala snippets into images worth sharing, without leaving your Mac.

Scala packs a lot of meaning into few characters, which makes it rewarding to screenshot and unforgiving of a low-contrast theme.

Codeshot detects Scala from the code you paste, so there is no language picker to get wrong. Here is the same snippet in three of the 30 themes it ships with, rendered with the app's own stylesheets.

final case class Snapshot(code: String, theme: String = "xcode"):
  def export(path: String, scale: Int = 2): Either[Throwable, String] =
    Either.catchNonFatal:
      Renderer.render(code, theme).save(path, scale)
Atom One · dark
final case class Snapshot(code: String, theme: String = "xcode"):
  def export(path: String, scale: Int = 2): Either[Throwable, String] =
    Either.catchNonFatal:
      Renderer.render(code, theme).save(path, scale)
Solarized · dark
final case class Snapshot(code: String, theme: String = "xcode"):
  def export(path: String, scale: Int = 2): Either[Throwable, String] =
    Either.catchNonFatal:
      Renderer.render(code, theme).save(path, scale)
Tokyo Night · dark

Choosing a theme for Scala

Symbolic operators need a theme that separates punctuation from identifiers, or the snippet turns into a grey smear at small sizes.

Getting the size right

Let the image follow your content, or lock it to a ratio — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, or 3:4 — then export at 1×, 2×, or 3× so it stays sharp on a retina display. Copy it straight to the clipboard with C, or save with S.

See all 30 themes side by side, or read the full workflow.

Built for Scala, and 59 other languages

Everything runs on your Mac. Your code never leaves it.

Download for macOS