We demonstrate an all-optical thermometer based on an ensemble of silicon-vacancy centers (SiVs) in diamond by utilizing a temperature dependent shift of the SiV optical zero-phonon line transition frequency, Δλ/ΔT=6.8GHz/K. Using SiVs in bulk diamond, we achieve 70mK precision at room temperature with a sensitivity of 360mK/Hz. Finally, we use SiVs in 200nm nanodiamonds as local temperature probes with 521mK/Hz sensitivity. These results open up new possibilities for nanoscale thermometry in biology, chemistry, and physics, paving the way for control of complex nanoscale systems.