playwright/packages/playwright-core/src/protocol
Jasiel Guillén 700062c836
feat(screenshot): Add customizable color option for masked elements (#23185)
I added a new option to the screenshot method to customize the color of
the box when we want to mask some elements for the screenshot.

The default color is pink `#FF00FF`, but with this new option you can
specify the color you like the most, like a nice green `#00FF00`:

```js
await page.screenshot({
  mask: [page.locator('div').nth(5)],
  maskColor: "#00FF00",
})
```


![ss](https://github.com/microsoft/playwright/assets/23271049/05f754de-0ba6-47a3-ae3e-769720d3da3b)

---------

Signed-off-by: Jasiel Guillén <darkensses@gmail.com>
2023-05-22 18:44:44 -07:00
..
debug.ts chore: explicitly control actions with slow mo (#22445) 2023-04-17 16:19:30 -07:00
DEPS.list chore: use utils via index export (4) (#13404) 2022-04-07 14:36:13 -07:00
serializers.ts chore: replace __proto__ by getPrototypeOf (#17386) 2022-09-20 19:01:12 -07:00
transport.ts chore: ignore SIGINT inside driver process (#23028) 2023-05-17 01:44:17 +02:00
validator.ts feat(screenshot): Add customizable color option for masked elements (#23185) 2023-05-22 18:44:44 -07:00
validatorPrimitives.ts chore: do not serialize buffers into base64 in local mode (#15316) 2022-07-05 08:58:34 -07:00