fix colorization when output has foo[bar] in it

fixes #669