\stopTEXpage
</pre>
== Simple example with MetaFun (2019) ==
from [https://tex.stackexchange.com/questions/472622/cover-page-coloring-in-context tex.stackexchange.com]
<context source=yes>
\setupbodyfont [palatino]
\definecolor [Top] [h=a5b291]
\definecolor [Bottom] [h=b7c1a7]
\definecolor [TitleColor] [h=96433a]
\define[1]\titlefont{%
\setcharacterkerning[extrakerning]%
\cap
\definedfont[#1]%
\ignorespaces
}
\starttext
\startMPpage
StartPage ;
numeric w ; w := bbwidth(Page) ;
numeric h ; h := bbheight(Page) ;
fill (unitsquare xyscaled (w,.8h)) withcolor \MPcolor{Bottom} ;
fill (unitsquare xyscaled (w,.2h) yshifted .8h) withcolor \MPcolor{Top} ;
draw (0,.8h) -- (w,.8h) withpen pensquare scaled 2pt withcolor white ;
draw textext.rt("\definedfont[Serif at 10pt]Author") shifted (.1w,.95h) ;
draw textext.rt("\titlefont{Serif at 24pt} Cover Page Title") shifted (.1w,.85h) withcolor \MPcolor{TitleColor} ;
draw textext.rt("\titlefont{SerifBold at 10pt} Subhead Title") shifted (.1w,.75h) withcolor \MPcolor{TitleColor} ;
draw textext.rt("\titlefont{SerifBold at 10pt} Another subhead") shifted (.1w,.70h) ;
% picture p; p := externalfigure "matterhorn.png" ;
% draw p scaled (w/bbwidth p) ;
StopPage ;
\stopMPpage
\stoptext
</context>
[[Category:Sample documents]]
[[Category:Sample documents]]