Added support for tolerance

Added support to set a tolerance value ti the start color to be
colored. With can be useful to solve the problem of not coloring the
border of the shape due to minor color/alpha changes of the initial
color.