By alloying multiple compounds, some semiconductor materials are tunable, e.g., in band gap or lattice constant. The result is ternary, quaternary, or even quinary compositions. Ternary compositions allow adjusting the band gap within the range of the involved binary compounds; however, in case of combination of direct and indirect band gap materials there is a ratio where indirect band gap prevails, limiting the range usable for optoelectronics; e.g. AlGaAs LEDs are limited to 660 nm by this. Lattice constants of the compounds also tend to be different, and the lattice mismatch against the substrate, dependent on the mixing ratio, causes defects in amounts dependent on the mismatch magnitude; this influences the ratio of achievable radiative/nonradiative recombinations and determines the luminous efficiency of the device. Quaternary and higher compositions allow adjusting simultaneously the band gap and the lattice constant, allowing increasing radiant efficiency at wider range of wavelengths; for example AlGaInP is used for LEDs. Materials transparent to the generated wavelength of light are advantageous, as this allows more efficient extraction of photons from the bulk of the material. That is, in such transparent materials, light production is not limited to just the surface. Index of refraction is also composition-dependent and influences the extraction efficiency of photons from the material.