The standard visibility model in light-pollution studies is the formula of Hecht, as used e.g. by Schaefer. However, it is applicable only to point sources and is shown to be of limited accuracy. A new visibility model is presented for uniform achromatic targets of any size against background luminances ranging from zero to full daylight, produced by a systematic procedure applicable to any appropriate data set (e.g. Blackwell's), and based on a simple but previously unrecognized empirical relation between contrast threshold and adaptation luminance. The scotopic luminance correction for variable spectral radiance (colour index) is calculated. For point sources, the model is more accurate than Hecht's formula and is verified using telescopic data collected at Mount Wilson in 1947, enabling the sky brightness at that time to be determined. The result is darker than the calculation by Garstang, implying that light pollution grew more rapidly in subsequent decades than has been supposed. The model is applied to the nebular observations of William Herschel, enabling his visual performance to be quantified. Proposals are made regarding sky quality indicators for public use.