integer, parameter :: maxcolors = 4