Swap a 'max' for a 'min', fixing an out-of-range colour component being passed to the front end. [originally from svn r9451]