Options
themeMode
The color scheme the page sees, for sites with a dark mode.
- Type
- "auto" | "light" | "dark" | "no-preference"
- Default
- "auto"
- Group
- Viewport and device
On this page
OverviewLink to this section
Sets the prefers-color-scheme preference the page sees, so sites that follow the system theme render in light or dark mode.
Any value outside the list falls back to auto.
ValuesLink to this section
autoDefaultNothing is forced, the page sees the browser default.lightThe page sees a light color scheme preference.darkThe page sees a dark color scheme preference.no-preferenceThe page sees no preference at all.
ExampleLink to this section
The same request with the SDK, with cURL and as the raw JSON body.
screenshot.ts
import { Url2Image } from '@url2image/sdk'
const { success, data, message } = await Url2Image({
url: 'https://example.com',
token: process.env.URL2IMAGE_TOKEN,
options: {
themeMode: 'dark'
}
})Good to knowLink to this section
Related optionsLink to this section
stylesCSS added to the page right before the capture.scriptJavaScript added to the page right before the capture.
Every option, grouped, is in the options overview.
Something unclear or missing on this page?
Tell us