Porous silicon (PS) has a great potential in optical applications due to the tunability of its refractive index. However, the electrochemical formation parameters of porous silicon have a great influence both on porosity and pore morphology and, hence, on the optical properties of the PS layers. In the present work, the optical constants of PS layers are determined in the visible-wavelength range for different electrolyte compositions and for a wide range of formation-current densities. Thus, the interval of refractive indices that can be achieved for each electrolyte composition is studied, for the further development of interference filters. In particular, it is demonstrated that a higher ethanol concentration in the electrolyte leads to a considerably higher tunability of the refractive index of PS while reducing absorption losses. In addition, the performance of PS-based multilayer interference filters is shown to improve when formed with an electrolyte of higher ethanol concentration, especially in the blue region of the visible spectrum.