# How to find a colour on the screen?

**URL:** <https://discourse.processing.org/t/how-to-find-a-colour-on-the-screen/30405>\
**Category:** Coding Questions\
**Created:** [June 1, 2021, 5:31am UTC](https://discourse.processing.org/t/how-to-find-a-colour-on-the-screen/30405 "2021-06-01T05:31:31Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 1, 2021, 4:25pm UTC](https://discourse.processing.org/t/how-to-find-a-colour-on-the-screen/30405/6 "2021-06-01T16:25:06Z")

</div>

This post is continued here by @MoonAlien822 :

> [@How to check if the response from get is the same as color?](https://discourse.processing.org/t/how-to-check-if-the-response-from-get-is-the-same-as-color/30417):
>
> int x=1; int y=1; import java.awt.Robot; import java.awt.image.BufferedImage; import java.awt.Rectangle; color pas = color(11, 96, 133); //this is the color Robot robot; void setup() { size(1500, 3000); try { robot = new Robot(); } catch (Exception e) { println(e.getMessage()); } } void draw() { background(0); Rectangle r = new Rectangle(mouseX, mouseY, width, height); BufferedImage img1 = robot.createScreenCapture(r); PImage img2 = new PImage(img1); image(img2, 0, …

---

_[View the full topic](https://discourse.processing.org/t/how-to-find-a-colour-on-the-screen/30405)._
