\starttext

\definecolor [red-t]  [r=1,t=.6,a=1]
\definecolor [blue-t] [b=1,t=.4,a=1]

\startMPpage
path p ; p := fullsquare scaled 6cm ;

fill p ;

path p ; p := fullsquare scaled 6cm shifted (-4cm,-4cm);

fill p
    withshademethod "linear"
    withcolor \MPcolor{red} shadedinto \MPcolor{blue} ;

path p ; p := fullsquare scaled 6cm shifted (4cm,4cm) ;

fill p
    withshademethod "linear"
    withcolor \MPcolor{red} shadedinto \MPcolor{blue}
    withtransparency(1,.5) ;

path p ; p := fullsquare scaled 6cm shifted (-4cm,4cm) ;

fill p
    withshademethod "linear"
    withcolor \MPcolor{red} shadedinto \MPcolor{blue-t};

path p ; p := fullsquare scaled 6cm shifted (4cm,-4cm) ;

fill p
    withshademethod "linear"
    withcolor \MPcolor{blue-t} shadedinto \MPcolor{red};
  % withfromshadecolor \MPcolor{blue-t} withtoshadecolor \MPcolor{red};
\stopMPpage

\stoptext
