The intensity peak will be at shorter (bluer) wavelengths for hotter objects, and at longer (redder) wavelengths for cooler objects. Therefore, you can tell the temperature of a star or galaxy by its color because color is closely related to the wavelength at which its light intensity peaks.