Skip to main content
webshot screenshots api dark mode product update tuxxin

Capture any site in light or dark theme

By Tuxxin · · 2 min read

Webshot now sets the color scheme the target page renders in. Pick Auto, Light or Dark in the capture form, or send a theme parameter to the API.

Chrome reports prefers-color-scheme: light by default. A site that follows the visitor's system setting could only be captured in its light form, whatever it looks like to the people using it. overwatch.earth, issued.live and whack.sh all work that way.

Using it from the form

A Theme control sits next to Format. Auto is the default and sends no override, so captures you make today match the ones you made last week.

Using it from the API

Add theme to the request body:

curl -X POST https://webshot.site/api/capture \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://overwatch.earth","mode":"desktop_viewport","theme":"dark"}' \
  --output shot.jpg

Accepted values are system, light and dark. Anything else returns HTTP 400 with the accepted list, so a typo fails loudly rather than returning the wrong theme.

When the override is applied

The scheme is set before the page loads. A theme script that reads the preference once during startup, which is how a site avoids a flash of the wrong colors, sees the requested scheme on its first paint.

Credit cost is unchanged.

Written by the Webshot team at Tuxxin

We build and operate the capture engine behind every screenshot on this site.

Try Webshot — it's free

Capture full-page screenshots of any website with no signup, no watermarks, no API key.

Take a Screenshot   View API Docs
Share: 𝕏 Twitter Facebook LinkedIn