On 11 Apr 2016, at 16:17, Alan BRASLAU <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};
  \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