If the terminal is too wide, centering is not quite working correctly. An output of "Color 1", having only 7 characters, can and should be perfectly centered in a column 9 characters across. There's an untested possible fix in the comments at the end of the program.