To diagnose blocky gradients in headless Chromium, first make the viewport and deviceScaleFactor explicit before navigation, then hold screenshot options and the Chromium build constant. Compare the same page in headful mode, check whether GPU and software rasterization differ, and use a simple sRGB gradient as a control before investigating wide-gamut CSS colors. This sequence separates page styling, browser rendering, and screenshot capture instead of changing several variables at once.
Start with a deterministic screenshot
A screenshot is the result of more than the CSS gradient. The viewport determines the layout; deviceScaleFactor determines how CSS pixels map to output pixels; the browser build and rendering path affect what gets drawn; and capture options affect what region and surface are saved. If any of these change between captures, a visual difference does not identify its cause.
Set the viewport before calling goto, and pin the scale factor explicitly. Puppeteer documents the deviceScaleFactor viewport setting and recommends setting the viewport before navigation. Its default scale factor is 1, but an explicit value makes the test easier to reproduce.
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
await page.setViewport({
width: 1280,
height: 720,
deviceScaleFactor: 1
});
await page.goto('https://example.com', { waitUntil: 'networkidle0' });
await page.screenshot({
path: 'baseline.png',
type: 'png',
fullPage: true
});
await browser.close();
})();
Replace the example URL with the page under test. The 1280-by-720 dimensions are an example, not a universal requirement: use the dimensions your application needs and keep them fixed while comparing results. If the page continues loading requests indefinitely, choose a project-appropriate navigation condition and make it identical in each run rather than silently changing the wait condition mid-test.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute#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
Make a minimal gradient control
Before debugging a complex page, reduce the case to one element with a plain linear-gradient() in sRGB. Remove transforms, filters, opacity, masks, and image resampling from the control. Capture the gradient element and the full page using the same viewport and scale factor.
If the control looks smooth but the production page does not, the browser can render a simple gradient under those conditions; focus next on the production page’s CSS and layout. Inspect fractional element dimensions, transforms, compositing layers, and overlays as engineering leads, changing one at a time. If the minimal control is blocky too, keep investigating capture and browser rendering rather than rewriting unrelated page styles.
Keep screenshot capture settings constant
During diagnosis, use the same image type and screenshot options in every run. PNG is a useful baseline because it avoids introducing a different image format into the comparison. Keep fromSurface, fullPage, captureBeyondViewport, and background settings consistent as well. The goal is not to assume one combination is correct for every project; it is to avoid mistaking a capture-option change for a rendering fix.
Compare viewport and full-page captures as separate cases. A full-page screenshot can involve capture beyond the initial viewport, so do not compare it against a viewport-only image and attribute every difference to the gradient renderer. Once a baseline is stable, vary a single option and record the result.
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
| Comparison | Hold constant | What a difference helps isolate |
|---|---|---|
| Headless versus headful | Chromium build, viewport, scale factor, page state, capture settings, and launch arguments | Whether the behavior is specific to the headless run |
| Default versus GPU-rasterization diagnostic | All page and screenshot inputs | Whether the result changes with the rendering path |
| Scale factor 1 versus a pinned higher value | CSS, viewport dimensions, browser, and capture options | Whether CSS-to-device-pixel mapping affects the visible result |
| Viewport versus full-page capture | Browser, page state, format, and scale factor | Whether the difference is associated with capture region or beyond-viewport capture |
| sRGB versus a wide-gamut gradient | Browser build, geometry, and capture settings | Whether color-space interpolation or support is involved |
Compare headless and headful Chromium
Puppeteer’s debugging guide recommends headless: false when you need to see what the browser is displaying. Run the same pinned browser build with headful mode and inspect the gradient. Keep the viewport, scale factor, page state, color profile, screenshot settings, and launch arguments the same wherever possible.
If the visible page is smooth in headful mode but the screenshot from headless mode is blocky, that narrows the investigation to differences in the headless run or its capture path. It does not by itself prove a particular GPU bug. Change one rendering flag at a time and save each output under a distinct filename so the comparison remains attributable.
If both modes show the same artifact, return to the minimal control and CSS conditions. Avoid changing the page, browser version, and rendering flags together: a changed result would not tell you which change mattered.
Check GPU and software rasterization paths
Record the available chrome://gpu information for the Chromium environment where the issue occurs. Chromium’s graphics documentation describes --force-gpu-rasterization as an experimental way to enable hardware rasterization. Use it as a diagnostic comparison, not as a blanket production remedy. A container, virtual machine, or other runtime may not have the same graphics capabilities as a local desktop, so record the environment along with the flag.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
Chromium’s Skia feature configuration explains that GPU support is tied to Blink and that its GL backend is enabled when GPU rasterization is enabled. That makes the GPU path a meaningful variable to test, but not a guarantee that enabling it will make the output smoother. Compare the default run with the diagnostic configuration, then keep whichever supported configuration your deployment actually requires.
Inspect what Skia is drawing
Skia is Chrome’s 2D graphics library, with APIs that work across hardware and software platforms. For a difficult case, a Skia picture can help determine whether the gradient is already blocky before ordinary screenshot encoding. The Chromium debugging route described for this purpose is to launch with GPU benchmarking enabled and ask chrome.gpuBenchmarking to write a picture:
await page.evaluate(() => {
chrome.gpuBenchmarking.printToSkPicture('/tmp');
});
Launch Chromium with --enable-gpu-benchmarking for this diagnostic, and use the resulting .skp with Skia’s dm or viewer tools to rasterize or inspect it. Availability depends on the Chromium build and environment. If the picture is already blocky when independently rasterized, the artifact precedes the final screenshot file; if it is not, focus on later capture or encoding stages. Treat this as an advanced investigation rather than the first troubleshooting step.
Test color spaces and pin the browser version
Use an sRGB gradient as the control. Then test any gradient using color(), display-p3, rec2020, prophoto-rgb, or a98-rgb separately. Do not infer wide-gamut behavior from an sRGB case, or vice versa.
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
Skia issue 391530830 recorded a Chromium limitation for interpolation in four of those color spaces at the time the issue was filed; it described those cases as parsing failures. The issue is marked fixed, so that historical limitation does not establish the behavior of every current Chromium build. Check the exact build used in your automation and reproduce there. Puppeteer documents a Chrome for Testing mapping that can be used to pin the browser version; record the resolved browser version with the screenshot artifacts.
Use pixel comparisons without inventing a success threshold
There is no cited controlled statistic establishing how much any one change improves gradient smoothness. Judge the result using the target pipeline: retain before-and-after images, inspect the gradient at actual output size, and use the pixel-diff or visual-regression method already used by your project. Establish the acceptable difference for your own page and test environment rather than relying on a universal percentage.
For useful comparisons, save the test page or its relevant state, viewport dimensions, scale factor, browser version, launch arguments, screenshot settings, and output file together. This makes a regression reproducible and helps distinguish a true rendering change from a test that captured a different layout or page state.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failure patterns
- The same page produces different results between runs. Check whether viewport setup happens before navigation and whether the device scale factor, browser version, page state, and capture options are pinned. Repeat with those controls fixed.
- The element image looks smooth but the full-page image does not. Confirm that both captures use the same screenshot format and settings, then test viewport and full-page capture as separate cases. Do not treat them as equivalent regions.
- Headful looks smooth but headless does not. First verify that both use the same Chromium build, viewport, scale factor, page state, color profile, and arguments. Then vary one headless or rendering setting at a time.
- Enabling GPU rasterization changes the result. Record the default and diagnostic configurations and inspect the GPU information. Since the flag is experimental, use the result to identify path sensitivity, not as proof that the flag belongs in production.
- Only a wide-gamut gradient is affected. Compare it with a minimal sRGB control and verify the Chromium build. The historical Skia issue was marked fixed, so test the actual version instead of assuming the old limitation still applies.
- The diagnostic picture cannot be captured. Check that Chromium was launched with
--enable-gpu-benchmarkingand that the build exposeschrome.gpuBenchmarking. If this advanced route is unavailable, continue with the controlled screenshot comparisons rather than treating the missing diagnostic as proof about the rendering path.
Or skip the browser setup
If your goal is to obtain a screenshot without managing the browser yourself, ScreenshotNeo is a website screenshot API and MCP server. It does not replace the controlled comparisons above when diagnosing rendering differences; it is an alternative capture workflow. The API accepts one GET request with a URL and can return a PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation.
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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
Cookie and consent banners are accepted before capture, and more than 60 known consent platforms, newsletter popups, and chat widgets are removed; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, 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. The Free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Sources for the browser behavior
The relevant primary documentation and issue records are Puppeteer’s Viewport API, debugging guide, screenshot API, and Chrome for Testing version mapping; Chromium’s graphics and Skia feature documentation; Skia’s documentation and issue 391530830. The issue describes behavior at the time it was filed, so check the browser build being tested rather than extrapolating it to all versions.
Frequently Asked Questions
Can a smooth PNG still look banded in a browser preview?
Yes. Display scaling and the viewer can affect how a gradient appears on screen. Compare the saved file at its native pixel size in the same viewer before attributing the appearance to Chromium.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsShould I always force GPU rasterization for screenshots?
No. The flag is documented as experimental and is useful here as a controlled diagnostic. Use production settings that are appropriate for your deployment, not a diagnostic flag simply because one test image looked better.
Quick Recap
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.




