Photo by Joshua Reddekopp on Unsplash

We all have used Microsoft paint or similar software in our childhood. There we used to have a tool named fill colour in the shape of a bucket. Whenever we take that too to a bounded region and click it with the desired colour, the area would get coloured with the requires colour. This sparked the curiosity in me that what makes this feature possible and how does it recognise the area to be coloured.


Let's have a look at the following scenario.

Raghav gupta

I am second year Student at Bennett University , pursuing bachelors in Computer Science Engineering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store