# How to distinguish different continuous color blocks in an image

**URL:** <https://discourse.processing.org/t/how-to-distinguish-different-continuous-color-blocks-in-an-image/29315>\
**Category:** Beginners\
**Created:** [April 13, 2021, 6:20am UTC](https://discourse.processing.org/t/how-to-distinguish-different-continuous-color-blocks-in-an-image/29315 "2021-04-13T06:20:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![elonw](https://avatars.discourse-cdn.com/v4/letter/e/e9c0ed/32.png) [@elonw](https://discourse.processing.org/u/elonw)\
**Post date:** [April 13, 2021, 6:20am UTC](https://discourse.processing.org/t/how-to-distinguish-different-continuous-color-blocks-in-an-image/29315/1 "2021-04-13T06:20:56Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0ee933e687cb7cb839b9d5c974b2e43d5e67bc9b.jpeg)

I want to divide a figure into different continuous color blocks (containing repeated color areas), and calculate their average colors of these blocks in another corresponding rendering (real) image. And consequently to convert a rendering image into an illustration.  
Can anyone give me some hints? 🤠 Thanks.

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [April 13, 2021, 7:05am UTC](https://discourse.processing.org/t/how-to-distinguish-different-continuous-color-blocks-in-an-image/29315/2 "2021-04-13T07:05:10Z")

</div>

Hi,

Welcome to the forum! 😉

If you are new to Processing and pixel manipulation in general, I strongly encourage you to follow this tutorial on the Processing website :

[https://processing.org/tutorials/pixels](https://processing.org/tutorials/pixels)

You’ll find answers on how to access pixels, loop through them, create images and more! 😋
