# Getpixel on the screen

**URL:** <https://phaser.discourse.group/t/getpixel-on-the-screen/5174>\
**Category:** Phaser 3\
**Created:** [February 14, 2020, 12:01am UTC](https://phaser.discourse.group/t/getpixel-on-the-screen/5174 "2020-02-14T00:01:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![asalinasci](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/asalinasci/32/1879_2.png) [@asalinasci](https://phaser.discourse.group/u/asalinasci)\
**Post date:** [February 14, 2020, 12:01am UTC](https://phaser.discourse.group/t/getpixel-on-the-screen/5174/1 "2020-02-14T00:01:41Z")

</div>

I see it is possible to use getPIxel with a texture key but I cannot find the way to use getPixel “directly” on the screen or on the canvas of the game. Can I do this? Or can I “transfer” the content of the canvas to a texture and then use getPixel?

---

<div class="post-metadata">

**Author:** ![Telinc1](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/telinc1/32/60_2.png) [@Telinc1](https://phaser.discourse.group/u/Telinc1)\
**Post date:** [February 14, 2020, 6:51am UTC](https://phaser.discourse.group/t/getpixel-on-the-screen/5174/2 "2020-02-14T06:51:43Z")

</div>

See the `snapshotPixel` method in the renderer (`this.game.renderer` from a scene). It exists in both [Canvas](https://photonstorm.github.io/phaser3-docs/Phaser.Renderer.Canvas.CanvasRenderer.html) and [WebGL](https://photonstorm.github.io/phaser3-docs/Phaser.Renderer.WebGL.WebGLRenderer.html).

---

<div class="post-metadata">

**Author:** ![asalinasci](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/asalinasci/32/1879_2.png) [@asalinasci](https://phaser.discourse.group/u/asalinasci)\
**Post date:** [February 14, 2020, 7:35am UTC](https://phaser.discourse.group/t/getpixel-on-the-screen/5174/3 "2020-02-14T07:35:41Z")

</div>

Thanks, I’m going to try

---

<div class="post-metadata">

**Author:** ![asalinasci](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/asalinasci/32/1879_2.png) [@asalinasci](https://phaser.discourse.group/u/asalinasci)\
**Post date:** [February 14, 2020, 10:33am UTC](https://phaser.discourse.group/t/getpixel-on-the-screen/5174/4 "2020-02-14T10:33:46Z")

</div>

Yes, thanks to your help I have found this example: [https://phaser.io/examples/v3/view/snapshot/snapshot-pixel](https://phaser.io/examples/v3/view/snapshot/snapshot-pixel)

… and it is working
