On Mon, 11 Apr 2016, Meer, Hans van der wrote:
On 11 Apr 2016, at 16:17, Alan BRASLAU
mailto:alan.braslau@cea.fr> wrote: Remember that ConTeXt colors can be accessed in MP as \MPcolor{orange}
Alan
However with the snippet below I see the default black with MPcolor and the wanted red with \MPvar. Thus?
Hans van der Meer
\starttext \startuseMPgraphic{example1}{color} pickup pencircle scaled 1mm; draw unitsquare scaled 1cm withcolor \MPcolor{color};
This is looking for a color named 'color'. You need \MPcolor{\MPvar{color}}.
\stopuseMPgraphic \startuseMPgraphic{example2}{color} pickup pencircle scaled 1mm; draw unitsquare scaled 1cm withcolor \MPvar{color}; \stopuseMPgraphic \useMPgraphic{example1}{color=red} \useMPgraphic{example2}{color=red} \stoptext
Aditya