Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

If colors overlap incorrectly in an html2canvas image, first give the capture an explicit opaque background, then use the onclone hook to neutralize blend modes, filters, transparency, or duplicate overlays in the cloned page. That fixes many cases without changing the live page. If the mismatch remains, isolate the first layer that paints incorrectly and check whether the effect or image is supported; html2canvas reconstructs the page from DOM and styles rather than capturing the browser’s final pixels.

Why colors overlap differently in html2canvas

html2canvas does not capture the browser window as a native screenshot. It reads the DOM and computed styles, then draws its own representation to a canvas. As a result, it can differ from the browser compositor, especially when a page depends on CSS that the library does not support or reproduce in the same way.

The renderer paints elements such as backgrounds, borders, gradients, images, and text onto a 2D canvas. A different paint order or unsupported compositing effect can make two layers appear to blend into the wrong color. One documented project issue concerns overlapping images using mix-blend-mode: multiply: the mode was not rendered as expected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

This distinction matters when diagnosing a bug: the source page may look correct in the browser while the reconstructed canvas is wrong. The problem may be a rendering limitation rather than a mistake in the CSS that users see.

#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • 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

Fix it in order: background, compositing, layers, assets

  1. Set the intended background. Give the element or an opaque wrapper a real background color, and pass the same color as backgroundColor in the capture options. This avoids relying on a transparent canvas or on a background inherited from elsewhere in the page.
  2. Turn off suspect compositing in the clone. Use onclone to change blend modes and related styles only in the document html2canvas creates for rendering. This keeps the original page unchanged.
  3. Simplify overlapping layers. Temporarily make translucent overlays opaque, remove pseudo-elements that repeat a fill, and capture one layer at a time. This helps identify which element first produces the unexpected color.
  4. Check image access. For a cross-origin image, useCORS: true only helps if the image server supplies an appropriate Access-Control-Allow-Origin header. Without the required CORS permission, use an image hosted on the same origin or a same-origin proxy.
  5. Check geometry separately. If the image is also shifted or cropped, review the capture dimensions and scale. Those are geometry problems, not color compositing problems.
  6. Reduce the issue to a test case. If a specific CSS property still renders incorrectly, make a minimal reproduction. The html2canvas FAQ advises creating a test case and opening an issue when a property is missing or incomplete.

A capture-only fix with onclone

Start with this pattern, replacing #capture-target with the selector for the element you want to render. Adapt the selectors to match your page’s blend-mode elements. The example deliberately resets several related properties so that a blend mode is not replaced while an opacity or filter still changes the result.

const target = document.querySelector('#capture-target');

if (!target) {
  throw new Error('Capture target not found');
}

const canvas = await html2canvas(target, {
  backgroundColor: '#fff',
  onclone: (doc) => {
    doc
      .querySelectorAll('.blend, [style*="mix-blend-mode"]')
      .forEach((el) => {
        el.style.mixBlendMode = 'normal';
        el.style.backgroundBlendMode = 'normal';
        el.style.filter = 'none';
        el.style.opacity = '1';
      });
  }
});

document.body.appendChild(canvas);

The onclone callback receives the cloned document used for the capture. The sample targets elements with a .blend class and elements whose inline style contains mix-blend-mode. If your styles come from a stylesheet, target them with a suitable class or selector as well; an inline-style substring selector will not find every possible source of a blend mode.

Resetting opacity to 1 and filter to none is a diagnostic and visual workaround, not a universal correction. It changes the appearance of those elements in the resulting image. Remove individual resets that do not apply, or narrow the selectors to avoid changing unrelated content. The background color should match the intended output; use another opaque CSS color instead of white when appropriate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose between a capture-only override and changing the CSS

Approach Visual result Effect on the live page Blend effects Maintenance Cross-origin images
onclone override Can make the capture predictable, but intentionally removes or changes affected effects. Changes the cloned document only, not the original page. Useful when the effect is not reproduced correctly and a simpler capture is acceptable. Capture-specific selectors and overrides must be maintained as the page changes. Does not grant image access; the server still needs to allow CORS, or the image must be proxied.
Change the source CSS Can simplify or remove the effect in the page itself; the browser display also changes. Changes the actual page, not just the capture. Appropriate when the effect is unnecessary or a simpler design is acceptable everywhere. One source change may be simpler, but it affects all contexts where that CSS is used. Does not grant image access; CORS or a same-origin proxy is still required.

Choose onclone when the page should retain its design but the screenshot can use a simplified rendering. Change the source CSS when the effect is not needed in the product at all. Neither approach makes an inaccessible cross-origin image readable.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

Make the layers easy to diagnose

Start with an opaque base

Set a background on the capture target or a wrapper that covers the full area. Pass the same intended color through backgroundColor. This is particularly useful when the target otherwise has no DOM background: a transparent canvas can look different depending on what displays behind it after export or compositing.

Temporarily remove transparency and effects

For diagnosis, give translucent fills an opaque color and disable blend modes and filters. If the colors then match, re-enable styles one at a time. This identifies whether the discrepancy comes from alpha, blending, a filter, or a combination. A simplified capture may be the practical endpoint when exact reproduction of the browser effect is not supported.

Look for duplicated paint

Check whether both an element and a pseudo-element paint the same area, or whether a positioned overlay sits over a background that was expected to show through. Remove one layer temporarily and capture again. If the result changes at that step, inspect the element’s computed styles and stacking relationships rather than changing every color in the component.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.

Use geometry settings only for geometry symptoms

If colors are fixed but the output is cut off or displaced, set windowWidth and windowHeight to the element’s scroll dimensions when appropriate, then review scale. These options address the capture’s viewport and resolution. They do not repair unsupported blending.

Cross-origin images: what useCORS can and cannot do

Try useCORS: true only when the image host is configured to permit the requesting origin through its CORS response headers. The option is not a way to bypass browser security. If the server does not return an appropriate Access-Control-Allow-Origin value, move the asset to the same origin or retrieve it through a same-origin proxy configured to serve it.

When the bad overlap involves images, first test the same layout with a same-origin copy of the image. That separates an asset-access failure from a compositing mismatch. If the image itself loads correctly but the overlap remains wrong, return to the blend-mode and layer checks.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

Troubleshooting common symptoms

Symptom Likely cause What to try
The page is correct, but overlapping images are the wrong color. A blend mode such as mix-blend-mode: multiply is not reproduced as expected. Disable the effect in onclone and compare. If the result is acceptable, keep a capture-only override; otherwise reduce the page to a minimal reproduction.
Transparent areas look white, black, or otherwise unexpected. The capture has no explicit opaque background, or the output is being composited against a different background. Set a background on the wrapper and specify the matching backgroundColor.
The fix changes too many elements. The selector in onclone matches unrelated nodes. Use a specific class or narrower selector for the affected component, then reset only the properties that cause the mismatch.
An image is absent or fails to render from another domain. The remote image server does not permit the request with CORS headers. Use useCORS: true only when the server allows it; otherwise serve the image from the same origin or use a same-origin proxy.
The screenshot is clipped or shifted, but colors are now right. The capture dimensions or scale do not match the content. Review windowWidth, windowHeight, and scale; use the target’s scroll dimensions when the full content should be included.
A CSS effect still differs after simpler styles are tested. The property may not be supported or may be incompletely implemented by the renderer. Create a minimal test case showing the property and expected result, then report the rendering gap to the project.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is a screenshot of a URL rather than a canvas generated inside your own page, ScreenshotNeo takes a different route: it returns a screenshot or PDF from a single API request instead of asking you to render the DOM with html2canvas in the browser. It does not repair an html2canvas canvas you have already built, and it is not a substitute when you specifically need a canvas in your application.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The API accepts a URL and returns PNG, JPEG, WebP, or PDF. For a simple WebP capture:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for setup and request options. ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; these steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. It also provides an MCP server with screenshot tools for AI agents, including Claude, Cursor, and other MCP clients.

The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots. Every listed feature is available on every plan. Create a free ScreenshotNeo account to try it.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.

Frequently Asked Questions

Does changing backgroundColor fix mix-blend-mode?

No. An explicit background handles the canvas background; a blend mode that is not reproduced as expected needs a separate style override or a simpler rendering.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Will onclone change what visitors see on my page?

No. The callback changes the cloned document used by html2canvas, not the original live document.

Can ScreenshotNeo produce a canvas for my web app?

ScreenshotNeo returns an image or PDF from a URL; it does not provide the html2canvas canvas object for use inside your application.

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.