Use Puppeteer’s page.emulateMediaFeatures() to set prefers-color-scheme to dark before navigating, then save the page with page.screenshot(). This asks the website to render in dark mode; it does not force a dark theme on sites that do not support the preference.
Capture a page using dark color-scheme preference
Install Puppeteer in your project if needed, then run this ES module script. It emulates the preference before navigation so a site can use it during its initial render.
As an Amazon Associate I earn from qualifying purchases.
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.emulateMediaFeatures([
{ name: 'prefers-color-scheme', value: 'dark' },
]);
await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'screenshot.png', fullPage: true });
} finally {
await browser.close();
}
The script saves screenshot.png in the current working directory. Puppeteer documents media-feature emulation and page screenshots as the relevant APIs.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Choose viewport or full-page capture
By default, a screenshot captures the visible viewport. Set fullPage: true to request a capture of the full page instead. Full-page captures can be much taller than the viewport, so choose the mode that matches what you need to inspect or share.
#1 Best Overall
- Privacy Protection and Lens Care: Avoid private information from hacking while preventing dust-fall and scratching of the camera lens
- Multiple Compatibility: Suitable for Logitech webcam C920x, C920, C922, C930e, C922x Pro Stream HD Camera
- Artful Design: Modeled and designed exclusively to fit the above devices from Logitech and make it more stylish
- Easy Flip Mechanism: Can be turned 180 angle and easily take the cover off when flipping more than 180
- Simple Installation: Attaches securely to your Logitech webcam without leaving residue, allowing for quick and hassle-free setup
// Visible viewport only
await page.screenshot({ path: 'viewport.png' });
// Full document
await page.screenshot({ path: 'full-page.png', fullPage: true });
The ScreenshotOptions reference documents the available screenshot settings, including full-page capture.
Confirm the dark preference is active
Check the emulated media query from the page context:
Rank #2
- ✅Package included: California JOS (3Large+3Medium+3Small) webcam Privacy cover in Black color, All In One Solution in one Package, Assembly &Packed in USA !
- ✅ Ultra-thin design by California JOS: Super thin design, perfect curve edges, and extra mini size, which means it can be perfectly combine with your devices. Webcam Cover is only 0.03 inches thick and does not feel its existence when the laptop lid is closed.
- ✅ Universal Design by California JOS: Webcam Cover is compatible with most Laptop Computer, Smartphones, iPad,iphone, MacBook, MacBook Pro, Tablets PC, PS4 and all-in-one desktops. Many pieces package, meet your all cameras need.
- ✅ Easy to Install: Use cloth to clean the surface of device's webcam, then remove adhesive tape from the back of the camera cover Slide, align the lens, and firmly press for 15 seconds to achieve a strong, Also, the adhesive can be easily applied and removed from the device without any traces.
- ✅ Variety of sizes/shapes: Includes 9 pieces (3 large ovals, 3 medium rectangles, 3 standard ovals) in black color. A versatile solution for all your devices—laptops, tablets, phones, webcams, and more! With at least 3 options, it suits any situation. The large oval is specifically designed for the Tesla Model 3/Y interior cabin camera.
const isDarkPreference = await page.evaluate(() =>
matchMedia('(prefers-color-scheme: dark)').matches
);
console.log(isDarkPreference); // true when the emulated preference is active
This confirms that the browser reports a dark color-scheme preference to the page. It does not confirm that the site has CSS or application logic that responds to it.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsWait for the content you need
waitUntil: 'networkidle2' is a practical navigation option, not a universal signal that a page is visually complete. A site may keep network connections open, load images or other content lazily, or animate after navigation. If the screenshot misses content, wait for a known selector or a site-specific readiness condition before calling screenshot().
Rank #3
- Protecting Your Digital Life: Covers your webcam when not in use, and prevents web hackers from Spying on you. It is perfect to provide privacy, security and peace of mind to individuals, groups, organizations, companies and governments.
- Fits on Devices: Compatible with Logitech C920, C922, C922x and C930e etc Flat Camera, It does not damage your device in any way.
- You can cover your webcam at any time by effortlessly open and closed it!
- Does not interfere with webcam use or indicator light
- 100% Satisfaction Guaranty: If you aren't completely satisfied with your purchase, just contact us
Troubleshoot a screenshot that still looks light
- The site does not implement dark styling. The emulated preference only affects pages that respond to
prefers-color-scheme; it cannot create a dark theme for them. - The site overrides the system preference. Some applications use an in-page theme setting or saved user choice. Check the site’s own controls and theme behavior.
- The screenshot was taken too early. Wait for the relevant content or theme selector to appear rather than assuming network idle means every visual change is finished.
- The emulation was applied after navigation. Set the media feature before
page.goto()when the site determines its theme during startup.
Or skip the browser setup
ScreenshotNeo can return an image or PDF with one GET request. Its capture flow accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; these steps can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. It also has an MCP server with screenshot and page-information tools for AI agents, and supports dark mode among its capture options.
See the ScreenshotNeo API documentation for parameters. Example cURL request:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Or use Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Or use Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo’s Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for free to try it.
Recommended Free Tools
Rank #4
- 【Premium Webcam Cover】-This webcam privacy cover is an accessory of laptop webcam. No worry about interfering with web camera lens use or indicator light; No damage to your device in any way as well. A helpful privacy protector and dust separator.
- 【Privacy Protector】-Slide the web camera cover over your webcam lens when not in use, and prevents web hackers from Spying on you. It is perfect to provide privacy security and peace of mind to individuals, groups, organizations, companies and governments. It also protects your camera lens from dust,and keeps it in high-definition resolution all the ways.
- 【Durable Material】-The web cam cover is made of high-strength plastic, which ensures that your privacy is protected for a long and lasting period of time. The back of the web camera privacy cover slide also has a strong 3M adhesive layer. It helps the privacy protector stick firmly to your device. The most convenient, super thin design, and extra mini size, make it perfectly combine with your devices.
- 【Wide Compatibility】-This webcam cover is compatible with most popular webcams with flat area surrounding lens or with protruding lens, such as Logitech HD Pro Webcam C920 C930e and C922, Logitech C615 and C270. It can be also used as a cover for the peep hole on door.
- 【2 Pack Webcam Cover】 - The streamcam cover kit comes with 2 pack. Please clean the lens surface before applying. Make sure the mounting surface is cleaned completely so that it sticks properly and firmly. Any problems, please contact us and we will reply in 24 hours.
Frequently Asked Questions
Does Puppeteer dark-mode emulation change the website’s saved settings?
No. It emulates the browser’s media preference for the page; the site may still apply its own theme logic.
What does a true dark-mode media query check mean?
It means the page sees the emulated dark preference, not that its rendered colors are necessarily dark.
Quick Recap
Best Value
- Compatible with Logitech C920x HD Pro Webcam, Full HD 1080p/30fps Video Calling. Compatible with Logitech C920 Hd Pro Webcam. Compatible with Logitech HD Pro Webcam C920 Widescreen Video Calling and Recording Webcam.
- Compatible with Logitech C930e Webcam. Compatible with Logitech C922 Pro Stream Webcam 1080P Camera for HD Video Streaming. Compatible with Logitech Privacy Cover for C920 and C930e.
- This webcam cover conveniently blocks your camera cover to protect your privacy.
- This also compatible with other popular webcams. This is also known as webcam lid, webcam cap, webcam protector, web camera privacy cover.
- ienza is a registered trademark and a registered Amazon brand. Use of the ienza trademark without the prior written consent of ienza, LLC. may constitute trademark infringement and unfair competition in violation of federal and state laws. ienza products are developed as cost-effective alternatives to OEM parts. They are not necessarily endorsed by the OEMs
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.




