Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsSet Playwright’s emulated color scheme to light before loading the page, then save the screenshot: await page.emulateMedia({ colorScheme: 'light' }). This makes the page see a light prefers-color-scheme preference; it does not override a website’s own theme switch.
Capture a screenshot in light mode
On a Mac, you can use Playwright’s browser API directly; no special macOS display setting is required. This complete JavaScript example captures the visible viewport of a page:
As an Amazon Associate I earn from qualifying purchases.
import { chromium } from 'playwright';
const browser = await chromium.launch();
try {
const page = await browser.newPage();
await page.emulateMedia({ colorScheme: 'light' });
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
} finally {
await browser.close();
}
The key is colorScheme: 'light'. Playwright emulates the browser’s prefers-color-scheme media feature. Applying it before navigation lets the site evaluate its initial rendering with that preference. The screenshot call then saves the rendered page. See Microsoft Playwright’s emulation guide and Page API.
Recommended Free Tools
Apply light mode to one page or a whole context
Use page-level emulation when you need to change the preference on an existing page or apply it only to a particular page. To set it for pages created in a browser context, configure the context instead:
#1 Best Overall
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
import { chromium } from 'playwright';
const browser = await chromium.launch();
try {
const context = await browser.newContext({ colorScheme: 'light' });
const page = await context.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
} finally {
await browser.close();
}
Context configuration is useful when the same preference should apply across a test run or several pages. For an already-created page, call page.emulateMedia({ colorScheme: 'light' }). Playwright also supports configuring the color scheme in test configuration; see the emulation documentation.
Choose the screenshot extent and image settings
By default, page.screenshot() captures the visible viewport. Use fullPage: true to capture the full scrollable page:
Rank #2
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
await page.screenshot({ path: 'full-page.png', fullPage: true });
Playwright can infer PNG, JPEG or WebP from the output file extension. These options change the output beyond its format:
| Option | Effect | When to use it |
|---|---|---|
fullPage: true |
Captures the full scrollable page rather than only the viewport. | Use when content below the fold must appear in the image. |
scale: 'css' |
Produces one image pixel per CSS pixel. | Use for dimensions tied to the page’s CSS layout. |
scale: 'device' |
Captures device pixels and can produce larger images on high-DPI displays. | Use when you want the device-pixel output. |
omitBackground: true |
Omits the default white background so transparency is possible where supported; it does not apply to JPEG. | Use for a transparent image output where the chosen format supports it. |
For example, combine full-page capture and CSS-pixel scaling with a WebP file:
Rank #3
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
await page.screenshot({
path: 'full-page.webp',
fullPage: true,
scale: 'css'
});
For the complete set of screenshot settings, consult the Page API reference.
Understand what light mode does—and does not—control
Emulating the light color scheme changes the preference exposed to the page. It does not guarantee a white background or force every site into a light theme. A website may ignore prefers-color-scheme, or manage its appearance with a separate theme control. If the site has its own switch, change that site-specific state as well; the emulation setting alone is not a substitute for it.
Rank #4
- AN AMAZING MAC AT A SURPRISING PRICE — With an incredibly portable and durable aluminum design, up to 16 hours of battery life,* and the A18 Pro chip, MacBook Neo is ready to go wherever school takes you.
- FOUR STUNNING COLORS. ONE DURABLE DESIGN — Choose from four beautiful colors — Silver, Blush, Citrus, or Indigo — each with a color-coordinated keyboard. And MacBook Neo is made with a durable recycled aluminum enclosure that helps it reach 60 percent recycled content by weight — the most ever in any Apple product.*
- FLY THROUGH EVERYDAY ASSIGNMENTS — Whether you’re cramming for finals, using Apple Intelligence* to summarize class notes, creating presentations, or even playing the latest Apple Arcade game,* MacBook Neo delivers the performance and AI capabilities you need to get things done.
- UP TO 16 HOURS OF BATTERY LIFE — MacBook Neo delivers all day battery life, so you can power through from early morning classes to late night study sessions without worrying about plugging in.
- A VIBRANT 13-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Neo supports 1 billion colors, so photos and videos pop and text is crisp for easy reading.
Keep Mac screenshots consistent for visual comparisons
Playwright cautions that rendered screenshots may differ with the host operating system, OS version, settings, hardware, power source and headless mode. For visual regression baselines, generate and compare images in a consistent environment, including a consistent browser version and execution setup. Review intentional changes when updating baselines rather than assuming images from different machines will be pixel-identical. See Playwright’s visual comparisons guide.
Troubleshoot common problems
- The page still looks dark. Confirm that
emulateMediais called before navigation, and check whether the website honorsprefers-color-scheme. If it has a separate theme control, set that independently. - The screenshot cuts off content. The default capture is the visible viewport. Add
fullPage: trueto capture the full scrollable page. - The image dimensions differ from what you expected. Choose
scale: 'css'for one pixel per CSS pixel, orscale: 'device'for device-pixel output. - The image is not transparent.
omitBackground: trueomits the default background only where supported, and does not apply to JPEG. Choose a compatible image format. - Visual snapshots differ between runs or machines. Keep the host and browser environment consistent. The OS, settings, hardware, power source and headless mode can affect rendering.
Or skip the browser setup
ScreenshotNeo can return a screenshot with one GET request. This cURL example saves a WebP capture of the target URL:
Quick Recap
Best Value
- FAST RUNS IN THE FAMILY — The 16-inch MacBook Pro with the M5 Pro or M5 Max chip brings next-generation speed and powerful on-device AI to personal, professional, and creative tasks. With all-day battery life, double the starting storage,* and a breathtaking Liquid Retina XDR display, it’s pro in every way.*
- BUCKLE UP — Along with a next-generation CPU, faster unified memory, and up to 2x faster SSD storage,* M5 Pro and M5 Max feature a more powerful GPU with a Neural Accelerator built into each core, delivering faster AI performance and on-device training capabilities. So you can blaze through demanding workloads at mind-bending speeds.
- BUILT FOR AI — Apple silicon, and every major component that powers it, is designed to run demanding on-device AI workloads like LLM inference and training. And Apple Intelligence helps you write, express yourself, and get things done effortlessly with groundbreaking privacy protections at every step.*
- ALL-DAY BATTERY LIFE — MacBook Pro delivers the same exceptional performance whether it’s running on battery or plugged in.*
- MACOS RUNS APPS FAST — All your go-to apps run lightning fast in macOS, including built-in apps like FaceTime and Messages. Plus, built-in virus protection and free software updates help keep your Mac running smoothly and securely.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for the request options. ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up free and get 1,000 screenshots a month with no card.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




