Books and magazines often contain pages containing audacious mixtures of color images and text. Our problem consists in coding the background colors of a such documents without wasting bits on background pixels that will be masked by foreground text. This paper presents a numerical methodfor achieving such a result. This wavelet technique described in this paper signi cantly reduces the compressed le sizes. It can handle arbitrarily complex masks with reasonable computational requirements. This direct method does not require the prior computation of a mask-dependent wavelet basis.