Simply treat each color as if they are additional dimensions in your feature space. So your M x N pixels RGB image is just an M x N x 3 array. Transform the array into a vector (using reshape in MATLAB for example). Then use the transformed vectors to calculate the Euclidean distances.
you want compute the euclidean distance between two RGB images for similarity measure or for change detection
for similarity measuring (matching), you will compute the euclidean distance for the whole two images as given by Gorbachev or Till above
for change detection you have to compute pixel wise euclidean distance (the euclidean distance for each same coordinate pixel in the two images) this is given by:
D(x,y)= sqrt((I1G-I2G)^2+(I1B-I2B)^2+(I1R-I2R)^2)
where I1, I2 are RGB images, I1G is the green plan of the I1 RGB image, I1B is the blue plan and I1R the red plan