A method for processing a current block of pixels (CU3) of an image using a palette coding mode, the palette coding mode using a current palette that comprises a set of entries associating respective entry indexes with corresponding pixel values, the method comprising a step of predicting the current palette using a palette predictor built from entries of two or more palettes , wherein: a first palette of the two or more palettes is used in processing a block of pixels immediately preceding the current block of the image, and the building of the palette predictor comprises: taking all of the entries from the first palette as entries of the palette predictor ; determining if the size of the palette predictor is smaller than the maximum predictor size limit; determining if one or more entries of a second palette are used in predicting the first palette using corresponding one or more flags, wherein each flag is represented by a bit and indicates whether or not a corresponding entry of the second palette of the two or more palettes is to be used in predicting the first palette ; while the size of the palette predictor is smaller than the maximum predictor size limit: for each of said one or more entries of the second palette , if the corresponding flag indicates the entry from said second palette is not used in predicting the first palette , taking said entry as an entry of the palette predictor ; the entry from the second palette coming after the entries from the first palette in the built palette. a first palette of the two or more palettes is used in processing a block of pixels immediately preceding the current block of the image, and the building of the palette predictor comprises: taking all of the entries from the first palette as entries of the palette predictor ; determining if the size of the palette predictor is smaller than the maximum predictor size limit; determining if one or more entries of a second palette are used in predicting the first palette using corresponding one or more flags, wherein each flag is represented by a bit and indicates whether or not a corresponding entry of the second palette of the two or more palettes is to be used in predicting the first palette ; while the size of the palette predictor is smaller than the maximum predictor size limit: for each of said one or more entries of the second palette , if the corresponding flag indicates the entry from said second palette is not used in predicting the first palette , taking said entry as an entry of the palette predictor ; the entry from the second palette coming after the entries from the first palette in the built palette. taking all of the entries from the first palette as entries of the palette predictor ; determining if the size of the palette predictor is smaller than the maximum predictor size limit; determining if one or more entries of a second palette are used in predicting the first palette using corresponding one or more flags, wherein each flag is represented by a bit and indicates whether or not a corresponding entry of the second palette of the two or more palettes is to be used in predicting the first palette ; while the size of the palette predictor is smaller than the maximum predictor size limit: for each of said one or more entries of the second palette , if the corresponding flag indicates the entry from said second palette is not used in predicting the first palette , taking said entry as an entry of the palette predictor ; the entry from the second palette coming after the entries from the first palette in the built palette. <EOS>