Semiconducting GaN and GaxIn1-xN nanoparticles (4-10 nm in diameter, depending on the metal ratio) with tunable indium content are prepared through a chemical synthesis (the urea-glass route). The bandgap of the ternary system depends on its composition, and therefore, the color of the final material can be turned from bright yellow (the color of pure GaN) to blue (the color of pure InN). Transmission electron microscopy (TEM and HRTEM) and scanning electron microscopy (SEM) images confirm the nanoparticle character and homogeneity of the as-prepared samples. X-ray diffraction (XRD), electron diffraction (EDX), elemental mapping, and UV/Vis, IR, and Raman spectroscopy investigations are used to confirm the incorporation of indium into the crystal structure of GaN. These nanoparticles, possessing adjusted optical properties, are expected to have potential applications in the fabrication of novel optoelectronic devices.