'**SUMMARY**
Returns an image representing the distance of each pixel from a given color
tuple, scaled between 0 (the given color) and 255.  Pixels distant from the
given tuple will appear as brighter and pixels closest to the target color
will be darker.
By default this will give image intensity (distance from pure black)
**PARAMETERS**
* *color*  - Color object or Color Tuple
**RETURNS**
A SimpleCV Image.
**EXAMPLE**
>>> img = Image("logo")
>>> img2 = img.colorDistance(color=Color.BLACK)
>>> img2.show()
**SEE ALSO**
:py:meth:`binarize`
:py:meth:`hueDistance`
:py:meth:`findBlobsFromMask`'

def colorDistance(self, color=Color.BLACK):

    pixels = np.array(self.getNumpy()).reshape((-1), 3)
    distances = spsd.cdist(pixels, [color])
    distances *= (255.0 / distances.max())
    return Image(distances.reshape(self.width, self.height))
