Back to Case Studies

ColorBook: an iOS Colouring App with Tap-to-Fill and Zoom

An iOS colouring app for detailed line art: zoom in, tap, and the area fills with colour. Built in Swift around the open-source UIImageScanlineFloodfill library.

iosswiftobjective-c bridgeuikit
ColorBook: an iOS Colouring App with Tap-to-Fill and Zoom
The three phone screens are frames from a real screen recording of the app.

The problem

Mandala and animal line art has thousands of tiny regions. On a phone screen they are too small to hit with a finger, and the colour has to land exactly inside the lines.

What I built

  • Zoomable canvas. The picture sits in a scroll view, so the finest parts can be pinched into.
  • Tap mapping. The tap point is converted from the zoomed view to the bitmap pixel, so the fill lands where the finger is.
  • Flood fill. The fill is the open-source UIImageScanlineFloodfill library (Objective-C, iterative scanline with a linked-list stack), bridged into the Swift app with a tolerance for anti-aliased edges.
  • Palette. Preset colours plus a picker for custom colours, and a set of line-art pictures.

Stack

Swift, UIKit, an Objective-C bridging header, UIImageScanlineFloodfill

Need something like this?

Tell me what is broken or what you want built, and I will tell you what I would do first.