# How shall I make get(mouseX, mouseY)) return RGB triplets

**URL:** <https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364>\
**Category:** Beginners\
**Created:** [June 28, 2019, 5:53pm UTC](https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364 "2019-06-28T17:53:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@andre](https://discourse.processing.org/u/andre)\
**Post date:** [June 28, 2019, 5:53pm UTC](https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364/1 "2019-06-28T17:53:38Z")

</div>

Tried to see pixels color using  
void mousePressed() { println(get(mouseX, mouseY));}  
It returns -1 for white spots, close to -16581375 on black spots and in between for the rest.  
How shall I get it as RGB triplets?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [June 28, 2019, 5:56pm UTC](https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364/2 "2019-06-28T17:56:42Z")

</div>

[Processing.org/reference/hex\_.html](http://Processing.org/reference/hex_.html)  
[Processing.org/reference/color\_datatype.html](http://Processing.org/reference/color_datatype.html)

---

<div class="post-metadata">

**Author:** ![andre](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@andre](https://discourse.processing.org/u/andre)\
**Post date:** [June 28, 2019, 6:03pm UTC](https://discourse.processing.org/t/how-shall-i-make-get-mousex-mousey-return-rgb-triplets/12364/3 "2019-06-28T18:03:03Z")

</div>

This is great! Thanks a lot for that qwick reply
