if you said it works for one dimension, why not use the same for all 3 dimensions of RGB?
subplot(1,2,1); imshow(A); title('original')
[r c ~]= size(A)
for dim=1:3
for i=1:r
for j=1:c
Aa(i,j,dim)=A(i,c-j+1,dim);
end
end
end
subplot(1,2,2); imshow(Aa); title('flipped across vertical axis')
CLICK HERE to find out more related problems solutions.