We present optical and near-infrared (NIR) photometry of 28 gamma-ray bursts (GRBs) detected by the Swift satellite and rapidly observed by the Reionization and Transients Infrared/Optical (RATIR) camera. We compare the optical flux at fiducial times of 5.5 and 11 h after the high-energy trigger to that in the X-ray regime to quantify optical darkness. 46 ± 9 per cent (13/28) of all bursts in our sample and 55 ± 10 per cent (13/26) of long GRBs are optically dark, which is statistically consistently with previous studies. Fitting RATIR optical and NIR spectral energy distributions of 19 GRBs, most (6/7) optically dark GRBs either occur at high redshift (z > 4.5) or have a high dust content in their host galaxies (A$_V$ > 0.3). Performing Kolmogorov-Smirnov tests, we compare the RATIR sample to those previously presented in the literature, finding our distributions of redshift, optical darkness, host dust extinction and X-ray-derived column density to be consistent. The one reported discrepancy is with host galaxy dust content in the BAT6 sample, which appears inconsistent with our sample and other previous literature. Comparing X-ray-derived host galaxy hydrogen column densities to host galaxy dust extinction, we find that GRBs tend to occur in host galaxies with a higher metal-to-dust ratio than our own Galaxy, more akin to the Large and Small Magellanic Clouds. Finally, to mitigate time evolution of optical darkness, we measure β$_OX, rest$ at a fixed rest-frame time, t$_rest$ = 1.5 h and fixed rest-frame energies in the X-ray and optical regimes. Choosing to evaluate optical flux at łambda$_rest$ = 0.25 μm, we remove high redshift as a source of optical darkness, demonstrating that optical darkness must result from either high redshift, dust content in the host galaxy along the GRB sight line, or a combination of the two.