The strong enhancement of the ultraviolet emission during solar flares is usually taken as an indication of plasma heating in the low solar atmosphere caused by the deposition of the energy released during these events. Images taken with broadband ultraviolet filters by the Transition Region and Coronal Explorer (TRACE) and Atmospheric Imaging Assembly (AIA 1600 and 1700 Å) have revealed the morphology and evolution of flare ribbons in great detail. However, the spectral content of these images is still largely unknown. Without the knowledge of the spectral contribution to these UV filters, the use of these rich imaging datasets is severely limited. Aiming to solve this issue, we estimate the spectral contributions of the AIA UV flare and plage images using high-resolution spectra in the range 1300 to 1900 Å from the Skylab NRL SO82B spectrograph. We find that the flare excess emission in AIA 1600 Å is composed of the C IV 1550 Å doublet (26%), Si I continua (20%), with smaller contributions from many other chromospheric lines such as C I 1561 and 1656 Å multiplets, He II 1640 Å, Si II 1526 and 1533 Å. For the AIA 1700 Å band, C I 1656 Å multiplet is the main contributor (38%), followed by He II 1640 (17%), and accompanied by a multitude of other chromospheric lines, with minimal contribution from the continuum. Our results can be generalised to state that the AIA UV flare excess emission is of chromospheric origin, while plage emission is dominated by photospheric continuum emission in both channels.