I would suggest the following instead: Convert to LAB Perform transform on lightness channel Convert back to RGB Because, red, green, and blue are not really independent "channels" to the human eye. I used this method on the adapthist pull request when handling RGB images.