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

If colors overlap incorrectly in an html2canvas capture, the usual cause is that the library reconstructs the page from DOM and computed styles rather than taking a native browser screenshot. CSS blending, transparency, stacking, or unsupported properties can therefore paint differently on the canvas than they appear in the browser. Start by setting an opaque background, then use the onclone hook to disable blend effects only in the capture.

Why colors overlap differently in html2canvas

html2canvas traverses the DOM, reads computed styles, and rebuilds a representation on a canvas. It does not capture the browser’s already-composited pixels. Its documentation explains that it can render correctly only the properties it understands, so a page that looks right in the browser may not look identical in the output. html2canvas documentation

The canvas renderer paints backgrounds, borders, gradients, images, and text. If it does not support a compositing effect or paints elements in a different order, the result can look like colors have bled together. The project has a report specifically describing overlapping images using mix-blend-mode: multiply that do not render as expected. html2canvas issue #2575

This is a rendering limitation, not necessarily a mistake in the page’s CSS. First determine whether you need the visual blend effect in the capture. If not, replace it for the cloned capture; if you do, you may need a different capture method or a simpler visual treatment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#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 the capture background first

Transparency can make otherwise correct colors appear wrong when the canvas is viewed or composited against a different background. Give the page area an explicit opaque background and set backgroundColor in the capture options. This option controls the canvas background when no DOM background is specified. html2canvas configuration

.capture-area {
  background-color: #fff;
}

const canvas = await html2canvas(document.querySelector('.capture-area'), {
  backgroundColor: '#fff'
});

Replace #fff with the actual intended background. Set it on the wrapper as well as in the option: the wrapper gives the DOM an explicit paint color, while the option defines the canvas fallback. If the desired design is intentionally transparent, do not force white; instead, keep transparency intentional and check the background used by the destination that displays the canvas.

Disable blending in the cloned document

Use onclone to adjust styles in html2canvas’s cloned document without changing the live page. The following example neutralizes common blend-related styling on matching elements before the canvas is rendered. html2canvas configuration

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
const target = document.querySelector('.capture-area');

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);

Change .blend to the class used by your blended elements. The inline-style selector catches only elements whose literal style attribute contains mix-blend-mode; it will not necessarily match a blend mode supplied by a stylesheet. For stylesheet-defined effects, add a reliable class to the relevant elements or select them with an appropriate selector in the clone.

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 example also removes filters and makes matched elements fully opaque. Those changes are deliberate diagnostic overrides, not universally safe defaults: they can alter shadows, color effects, and intended translucency. Remove individual assignments that are unrelated to the faulty effect, and narrow the selector so other elements retain their appearance. If you need the blend effect itself, this workaround trades that effect for predictable flat colors in the capture.

Choose a capture-only workaround or a source CSS change

Approach Visual effect Changes the live page? Maintenance Cross-origin images
onclone overrides Can flatten unsupported blending for the capture; the blend appearance is not preserved. No; styles are changed in the cloned document. Selectors and overrides must stay aligned with the page. Does not resolve image-origin restrictions; CORS still applies.
Change the source CSS Can make the design simpler for both browser and capture, but removes or changes the blend effect everywhere it applies. Yes. One permanent design change, but it may affect other page states. Does not resolve image-origin restrictions; CORS still applies.

Use a clone override when the normal browser design should keep its effects but the screenshot needs a simplified rendering. Change source CSS when the effect is unnecessary across the product or when maintaining capture-only rules would be more complicated than simplifying the design.

Isolate transparency and stacking problems

If disabling blending does not fix the colors, reduce the number of interacting layers until the first incorrect paint is clear. These checks help separate a blend-mode limitation from duplicated or translucent content:

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.
  • Temporarily replace semi-transparent overlays with opaque colors. If the output becomes correct, inspect how the overlay is composited.
  • Check for pseudo-elements that paint the same fill as their parent or a neighboring element. Temporarily disable the suspected pseudo-element in the clone.
  • Capture one layer at a time, then add layers back. The first layer that changes the result identifies where to focus.
  • Temporarily remove filters and blend rules separately rather than changing every style at once. This reveals which effect causes the mismatch.

These are diagnostic changes. Once the cause is known, apply the narrowest lasting fix: a targeted clone override, an opaque replacement, or a simplified source style.

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

Check images and cross-origin access

Images loaded from another origin need permission to be read into the canvas. Set useCORS: true only when the image server responds with an appropriate Access-Control-Allow-Origin header. The option cannot grant permission by itself. If the image server does not provide the needed header, serve the image through a same-origin proxy you control. html2canvas configuration

const canvas = await html2canvas(document.querySelector('.capture-area'), {
  backgroundColor: '#fff',
  useCORS: true
});

If the image itself is absent or tainted rather than merely the wrong color, investigate its origin and response headers before changing blend styles. CORS access and CSS compositing are separate issues.

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

Separate color errors from size and position errors

Once the colors are correct, check the capture dimensions if the image is shifted or cut off. Set windowWidth and windowHeight to the element’s scroll dimensions when the capture needs the full scrollable area, and review scale. These options affect geometry and output dimensions; they do not fix unsupported color blending. html2canvas configuration

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

const canvas = await html2canvas(target, {
  backgroundColor: '#fff',
  windowWidth: target.scrollWidth,
  windowHeight: target.scrollHeight,
  scale: window.devicePixelRatio
});

Use a deliberate scale rather than assuming a larger value fixes fidelity. Higher output dimensions can increase the size of the resulting canvas and the work required to render it, but they do not add support for CSS properties the renderer cannot reproduce.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When the CSS effect must remain intact

If the intended result depends on a blend or other CSS property that html2canvas does not reproduce correctly, there may be no style override that both preserves the effect and fixes the output. Build a minimal reproduction containing only the target elements and styles, then check whether the property is supported. The html2canvas FAQ says: “If a property is missing or incomplete, create a test case and open an issue.” html2canvas FAQ

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.

When faithful browser compositing matters more than DOM-based capture, use a screenshot method that captures rendered browser output rather than relying on html2canvas’s CSS reconstruction.

Troubleshooting by symptom

Symptom Likely cause Next action
Two overlapping images have unexpected blended colors. mix-blend-mode or related compositing is not reproduced as expected. Disable blend styles in onclone; if the effect must remain, create a minimal test case.
The background or translucent areas look darker or unexpectedly colored. The canvas or destination background differs from the intended opaque page background. Set an opaque wrapper background and matching backgroundColor, unless transparency is intentional.
Images disappear or fail when drawing to the canvas. Cross-origin image access is not permitted. Use useCORS: true only with suitable response headers, or use a same-origin proxy.
The result is shifted, clipped, or the wrong size. Viewport dimensions or scale do not match the capture area. Review windowWidth, windowHeight, and scale after resolving color issues.
Disabling blend mode helps, but shadows or opacity also look wrong. The override is broader than the problematic effect. Narrow the selector and remove unrelated filter or opacity changes.

Or skip the browser setup

If you need a screenshot of a rendered page rather than a canvas rebuilt from DOM styles, ScreenshotNeo provides a website screenshot API and MCP server. Its API returns PNG, JPEG, WebP, or PDF from a GET request, and the parameter names used by other screenshot APIs also work. See the ScreenshotNeo API documentation.

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 and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo free: 1,000 screenshots a month, no card required.

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

Frequently Asked Questions

Does setting backgroundColor fix mix-blend-mode?

No. It sets the canvas background fallback; blend effects may still be rendered differently from the browser.

Does useCORS: true bypass image-server restrictions?

No. The image server must return an appropriate Access-Control-Allow-Origin header, or you need a same-origin proxy.

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.