Updated arguments of colorBlock. Added generatePattern function. colorBlock is now a helper function for generatePattern.