# How should i begin with color detection in my maze game

**URL:** https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713
**Category:** Coding Questions
**Created:** [January 21, 2019, 9:24pm UTC](https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713 "2019-01-21T21:24:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nolan](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nolan](https://discourse.processing.org/u/Nolan)
#### Post date: [January 21, 2019, 9:24pm UTC](https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713/1 "2019-01-21T21:24:06Z")

</div>

PLZ help me i just started with codeing

---

<div class="post-metadata">

### Author: ![Sky](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sky/32/3013_2.png) [@Sky](https://discourse.processing.org/u/Sky)
#### Post date: [January 21, 2019, 10:06pm UTC](https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713/2 "2019-01-21T22:06:42Z")

</div>

Be more explicit, what exactly do you want to do?  
First of all you can create a [color()](https://processing.org/reference/color_.html) variable  
and from here idk what exactly you want to do with the color detection.

```auto
color a = color(0, 234, 43);
color b = color(0,234,46);

void setup() {
  size(500, 500);
}
void draw() {
  if (a == b) {
    fill(a);
    rect(100, 100, 100, 100);
  }
  else{
  fill(b);
  ellipse(100,100,100,100);
  }
}

```

I hope this lil example will help you

---

<div class="post-metadata">

### Author: ![Nolan](https://avatars.discourse-cdn.com/v4/letter/n/aeb1de/32.png) [@Nolan](https://discourse.processing.org/u/Nolan)
#### Post date: [January 21, 2019, 10:52pm UTC](https://discourse.processing.org/t/how-should-i-begin-with-color-detection-in-my-maze-game/7713/3 "2019-01-21T22:52:51Z")

</div>

Thank you so much this helped me with my project 🙂
