[#166] Replace default colour

* Use black instead of white
[#166] Avoid IndexOutOfBounds exceptions

* Use modulo operator
Merge pull request #168 from akvo/issue/166-colors

Code checked and correct. Comment in resource is not quite grammatical...