Porous 4H silicon carbide optical rugate mirrors have been fabricated with a combination of metal assisted photochemical etching and photoelectrochemical etching. The degree of porosity was controlled by the applied voltage, while the etching depth was controlled by measuring the transferred charge. The resulting degree of porosity as well as the refractive index profile could be estimated with image processing, thus enabling the prediction of the peak position in the reflection spectrum of the mirrors. Furthermore the presented method allows the re-use of the 4H-SiC bulk sample for subsequent mirror fabrication.