We present an empirical method of assessing the star formation rate (SFR) of star-forming galaxies based on their locations in the rest-frame color-color diagram (NUV − r) vs. (r − K). By using the Spitzer 24 µm sample in the COSMOS field (∼16 400 galaxies with 0.2 ≤ z ≤ 1.3) and a local GALEX-SDSS-SWIRE sample (∼700 galaxies with z ≤ 0.2), we show that the mean infrared excess IRX = L IR /L UV can be described by a single vector, NRK, that combines the two colors. The calibration between IRX and NRK allows us to recover the IR luminosity, L IR , with an accuracy of σ ∼ 0.21 for the COSMOS sample and 0.27 dex for the local one. The SFRs derived with this method agree with the ones based on the observed (UV+IR) luminosities and on the spectral energy distribution (SED) fitting for the vast majority (∼85%) of the star-forming population. Thanks to a library of model galaxy SEDs with realistic prescriptions for the star formation history, we show that we need to include a two-component dust model (i.e., birth clouds and diffuse ISM) and a full distribution of galaxy inclinations in order to reproduce the behavior of the IRX stripes in the NUVrK diagram. In conclusion, the NRK method, based only on the rest-frame UV/optical colors available in most of the extragalactic fields, offers a simple alternative of assessing the SFR of star-forming galaxies in the absence of far-IR or spectral diagnostic observations.