Fix off-by-one in the color validation checks