Black and White Rainbows Given an image that has only black and white pixels and an (x,y) location that's a white pixel, color the white pixels based on their minimal Manhattan distance from (x,y) in a path that only involves traversing other white pixels.
The hue of the colored pixels must be proportional to their distance from (x,y), so the pixel at (x,y) will have a hue of 0° (pure red) and the pixels farthest away from (x,y) will have a hue of 360° (also red), with the other hues blending seamlessly and linearly in between. The saturation and value must both be 100%.
If a white pixel is not connected to (x,y) through other white pixels then it must remain white.
Details

The input will consist of the file name of the image or the raw image data, plus the x and y integers.
The output image may be saved to a file or piped raw to stdout in any common image file format, or simply displayed.
The x value is 0 on the leftmost pixels, and increases going right. The y value is 0 in the topmost pixels and increases going down. (x,y) will always be in the image bounds.
Both full programs and functions are allowed.

The shortest code in bytes wins.
Examples
All these images have been downsized to save space. Click them to view at full size.
Input image:

(x,y) = (165,155) and (x,y) = (0,0)
 

Input image and output with (x,y) = (0,0):
 

Input image and output with (x,y) = (600,350):
 

Input image and output with (x,y) = (0,0):
 

Input image and output with (x,y) = (0,0):
 

Optional -30% bonus: use Euclidean distance. A suggestion for your algorithm is as follows (general outline):

Have a start pixel.
Flood-fill from that pixel.
For every pixel reached in the flood fill,
Move from the start pixel to that pixel in half-unit steps, in a straight line.
At each step, apply int() to the x and y coordinates. If the pixel at these coordinates is black, stop. Otherwise, continue. (This is a line-of-sight method.)
Any reached pixel that borders a white pixel and/or a pixel that was previously labeled with a significantly higher distance (i.e., +10) becomes a start pixel.

In a more meta sense, this algorithm spreads out to every pixel reachable in a straight line from start/already-colored pixels, then &quot;inches&quot; around edges. The &quot;significantly higher distance&quot; bit is intended to speed up the algorithm. Honestly, it doesn't really matter how you implement Euclidean distance, it just has to look pretty much like this.
This is what the first example looks like with Euclidean distance, using the algorithm above:
Input image and (x,y) = (165,155)
 

Many thanks to Calvin'sHobbies and trichoplax for helping write this challenge! Have fun!
Matlab, 255 245 231 bytes
This expects the image name first, then y and then x.
I=@input;i=imread(I('','s'));[r,c]=size(i);m=zeros(r,c);m(I(''),I(''))=1;M=m;d=m;K=[1,2,1];for k=1:r*c;d(m&amp;~M)=k;M=m;m=~~conv2(m,K'*K&gt;1,'s');m(~i)=0;end;z=max(d(:));v=[1,1,3];imshow(ind2rgb(d,hsv(z)).*repmat(m,v)+repmat(~d&amp;i,v),[])

I implemented the flood filling (or 'dijkstra for 4-neighbourhoods' if you want) roughly by first creating a mask where the seed pixel is set to 1 and with a distance accumulator (both of the size of the image) and then repeating following steps:

convolute the mask with a 4 neighbourhood kernel (this is the very inefficient part)
set all nonzero pixels of the mask to 1
set all the black pixels of the image to zero
set all values in the accumulator where the mask has changed in this step to k
increase k
repeat until there are no more changes in the mask (I actually do not check this condition, but just use the number of pixels in the image as an upper bound, which is usually a very bad upper bound, but this is codegolf=)

This leaves us with the manhattan distances of every pixel to the seed pixel in the distance accumulator. Then we create a new image by going throu the given range of colours and map the &quot;first&quot; hue to the value zero and the &quot;last&quot; hue to the maximal distance.
Examples




As a bonus, here a pretty picture of how the distance gets calculated. brighter = farther away.