To capture a Puppeteer screenshot with a solid custom background, apply a CSS background color to the page before calling page.screenshot(). omitBackground: true does something different: it removes the default background so the screenshot can be transparent; it does not set a color. See the Puppeteer screenshot guide and the ScreenshotOptions reference.
Set a solid background color before capture
Use page.addStyleTag() to add CSS to the rendered page, then save the image with page.screenshot(). This minimal example uses a pale blue background:
await page.addStyleTag({
content: `html, body { background-color: #eaf2ff !important; }`,
});
await page.screenshot({ path: 'page.png' });
The path option saves the screenshot to a file. The Puppeteer Page API documents both addStyleTag() and screenshot(); the screenshot guide also demonstrates saving an image with a path. The example illustrates those APIs and CSS behavior; it is not a claim that the code was independently executed.
Apply the rule after navigation and rendering
Call addStyleTag() after the page has navigated to the target and its app has rendered the content whose background you want to change. If the page later replaces its styles or renders a new view, apply the rule after that change and before capture.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Style the element that paints the background
The html, body rule works when those elements determine the visible page background. Many sites instead paint the background on an app shell, main container, or another nested element. Inspect the page’s structure and apply the color to the element that actually covers the visible area. If the site’s CSS wins over the injected declaration, use a more specific selector; !important is included in the example to help override ordinary declarations.
Choose between a solid color and transparency
| Desired result | What to do |
|---|---|
| Solid custom color | Set background-color in the page’s rendered CSS before capture. |
| Transparent background | Use omitBackground: true when calling page.screenshot(). |
In Puppeteer 25.12.0, the ScreenshotOptions reference describes omitBackground as hiding the default white background to allow transparency; its default is false. It is not a color picker. Check the documentation for the version installed in your project if it differs.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
await page.screenshot({ path: 'page.png', omitBackground: true });
Capture just one element
If you need an image of a single element rather than the full page, Puppeteer’s screenshot guide documents ElementHandle.screenshot(). Select the element, style its actual background as needed, then capture it:
const element = await page.$('.card');
if (!element) throw new Error('Could not find .card');
await page.addStyleTag({
content: `.card { background-color: #eaf2ff !important; }`,
});
await element.screenshot({ path: 'card.png' });
Replace .card with a selector present on the page. If a nested child or overlay is what fills the element, style that region as well. The element capture method is documented in the Puppeteer screenshot guide.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Troubleshoot a background that does not change
- The screenshot is still white: The visible background may belong to a nested app container rather than
htmlorbody. Apply the rule to the element that paints the visible area. - The site’s original color remains: The rule may be too general or injected too early. Add a more specific selector, retain
!importantif needed, and inject after navigation and app rendering. - You expected a custom color from
omitBackground: That option enables transparency; set the desired solid color with CSS instead. - A later page update restores the original styling: The app may have replaced the relevant element or styles after injection. Wait for the final view, then add the style immediately before capturing.
- The output file was not saved where expected: Confirm the
pathpassed topage.screenshot()is the intended path. The method also returns image data as a promise, according to the Page.screenshot() API reference.
Or skip the browser setup
ScreenshotNeo offers a screenshot API if you do not want to run Puppeteer for this capture. Its API documentation describes the request options; the one-call example below requests a screenshot of the same sample page:
Quick Recap
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers report the page verdict and billing status. It also has an MCP server with screenshot, page-info, and PDF-capture tools for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
Create a free ScreenshotNeo account.
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.

