Edge Detection on a Color Image
Finding edges in a color image can be done by decomposing the image into its channels, finding the gradients separately and fusing them somehow. However, such approach doesn't incorporate the color components in a joint model. Luckily, there is a better way to do this, which is the structure tensor representation. 

The color structure tensor describes the bi-dimensional ﬁrst order differential structure at a certain point in the image. It is specified by:

$
   S=
  \left[ {\begin{array}{cc}
   R_x^2+G_x^2+B_x^2 &amp; R_xR_y+G_xG_y+B_xB_y \\
   R_xR_y+G_xG_y+B_xB_y &amp; R_y^2+G_y^2+B_y^2 \\
  \end{array} } \right]
$

where subscripts denote the partial derivatives. This is a more precise description of the local gradients. Eigen-decomposition is then applied to the structure tensor matrix $S$ to form the eigenvalues and eigenvectors. The larger eigenvalue shows the strength of the local image edges (gradient magnitude) and the corresponding eigenvector points across the edge (in gradient direction). In other words, eigenvalues encode the gradient magnitude while the eigenvectors contain the gradient orientation information. Note that the eigenvectors and eigenvalues can be computed analytically for a structure tensor. 

There are many other usecases of the structure tensor, so it is good to know. Last but not least, here is a MATLAB code, which uses this information to compute the gradients:

http://www.mathworks.com/matlabcentral/fileexchange/28114-fast-edges-of-a-color-image-actual-color-not-converting-to-grayscale/content/coloredges.m

After obtaining the gradients, you could further carry on your edge detection in a standard fashion (canny etc.).