1. get colour of pixel in image
2. add to list of colours in image if not already present in list
3. return to step 1 until all pixels examined
4. get pixel
5. is pixel = list[i]?
6. if yes, image[i] pixel = list[i]
if no, image[i] pixel = black
7. return to 5 for all colors in colorlist
8. return to step 4 for all pixels in image