f(x,y) = -(~((y % x) % (-x)))

Extent: 256x256 (scaled x2)

"Gradient" colouring scheme.