Optical coatings, which consist of one or more films of dielectric or metallic materials, are widely used in applications ranging from mirrors to eyeglasses and photography lenses. Many conventional dielectric coatings rely on Fabry-Perot-type interference, involving multiple optical passes through transparent layers with thicknesses of the order of the wavelength to achieve functionalities such as anti-reflection, high-reflection and dichroism. Highly absorbing dielectrics are typically not used because it is generally accepted that light propagation through such media destroys interference effects. We show that under appropriate conditions interference can instead persist in ultrathin, highly absorbing films of a few to tens of nanometres in thickness, and demonstrate a new type of optical coating comprising such a film on a metallic substrate, which selectively absorbs various frequency ranges of the incident light. These coatings have a low sensitivity to the angle of incidence and require minimal amounts of absorbing material that can be as thin as 5-20 nm for visible light. This technology has the potential for a variety of applications from ultrathin photodetectors and solar cells to optical filters, to labelling, and even the visual arts and jewellery.