Matlab - https://www.mathworks.com/help/images/enhance-color-separati...
This paper might also be of interest - https://www.mdpi.com/2227-7390/13/20/3297
"In this paper, we review the theory behind decorrelation stretch and propose some alternative algorithms that resolve the issues of the standard approach."