You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
take_screenshot captures white background instead of CSS background for transparent canvas elements #806
When using take_screenshot on pages with transparent <canvas> elements (e.g., Cytoscape.js, Chart.js, Three.js), the screenshot shows a white background instead of the actual CSS background color set on the container element.
Root Cause
The Chrome DevTools Protocol Page.captureScreenshot composites transparent layers against a white base layer by default, ignoring CSS backgrounds behind transparent elements.
Evidence
// DOM inspection shows correct setup:
containerBgColor: "rgb(15, 23, 42)"// Dark slate - correct
canvasPixels: {r: 0,g: 0,b: 0,a: 0}// Transparent - expected// But screenshot shows WHITE where it should be dark
This is rather a feature. We currently do not attempt to determine actual background colors for web content and it is not always clear how it should work. Probably we should start by extending emulate command with background color.
Activity
OrKoN commentedon Oct 21, 2026
This is rather a feature. We currently do not attempt to determine actual background colors for web content and it is not always clear how it should work. Probably we should start by extending emulate command with background color.
feat: support transparent screenshots (ChromeDevTools#3457)
OrKoN commentedon Nov 26, 2026
I believe this is solved by #3457