# [NTG-context] Semi-transparent banners for a cover.

Sun Oct 28 14:02:00 CET 2007

On Sat, 27 Oct 2007 17:51:14 -0400
John Culleton <john at wexfordpress.com> wrote:

> A project specifies that for the cover of a brochure there be a photograph as
> the background (doable in Context), and semi-transparent rectangles across
> the page highlighting the various strings of text. The rectangles darken but
> do not completely block out the underlying illustration.   It is a layer
> cake, a photo, with semi-transparent rectangles laid across it, and type
> within the rectangles.
>
> This is a job more easily done in Gimp etc. but my question is, can it be done
> in Context at all?  How do I create the semi-transparent elements?

Hi John,

you can define a color for the transparent background of the text and
place it with the cover text at the background.

\setupcolors[state=start]
\setupexternalfigures[location=global]

\definecolor[coverred][r=1,a=1,t=.5]

\defineoverlay[coverimage][\overlayfigure{mill}]

\definelayer
[covertitle]
[width=\paperwidth,
height=\paperheight]

\setlayerframed
[covertitle]
[hoffset=0cm,
voffset=8cm]
[frame=off,
width=\paperwidth,
height=6cm,
background=color,
backgroundcolor=coverred,
align={middle,lohi}]
{\tfd Cover Text}

\starttext

\setupbackgrounds[page][background={coverimage,covertitle}]

\startstandardmakeup
\stopstandardmakeup

\stoptext

Wolfgang