add: parameter for k and the color channels to analyze.