This paper presents an adaptative algorithm for the segmentation of color images suited for document image analysis. The algorithm is based on a serialization of the k-means algorithm that is applied sequentially by using a sliding window over the image. The algorithm reuses information about the clusters computed by the previous classification and automatically adjusts the clusters during the windows displacement in order to better adapt the classifier to any new local modification of the colors. For digitized documents, we propose to define several different clusters in the color feature space for the same logical class. We also reintroduce the user into the initialization step who must define the different samples of colors for each class and the number of classes. This algorithm has been tested successfully on ancient color manuscripts having heavy defects, showing lighting variation and transparency. Nevertheless, the proposed algorithm is generic enough to be applied on a large ...