make sure rgb values can not be greater than 255