On Mon, 11 Apr 2016, Meer, Hans van der wrote:
On 11 Apr 2016, at 16:17, Alan BRASLAU <alan.bras...@cea.fr<mailto:alan.bras...@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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________