The K-means algorithm for segmenting colored images has been implemented. It assumes their are n different colored phases in the image, and searches for these color clusters in HLS color space. The number of phases n must be specified by the user.