Proximity: The color (the amount of ink) that is needed to alter the pixels under a stroke candidate toward the intended color in T should be approximated optimally by one of the given paint colors. So we compute the average color of those pixels and determine the closest paint color. The comparison is done on the basis of the color hue, the average difference in brightness ci(sc) is an additional factor for the quality of the stroke.