Hi, In addition to Mikael's solution, defining the color using the ConTeXt function \definecolor seems to work:
\starttext \definecolor[rose_color_ctx][r=.99609375,g=.796875,b=.99609375] \startMPcode color rose_color; rose_color = 1/256(255,204,255); %now working draw lmt_text [text ="\framed[background=color,backgroundcolor=rose_color_ctx,frame=on, location=low]{a rose box}",]; %working draw lmt_text [text ="\framed[background=color,backgroundcolor=green,frame=on, location=low]{a green box}",] shifted (1cm,1cm); %working fill fullcircle scaled 2cm shifted (0,3cm) withcolor rose_color; \stopMPcode \stoptext Cheers, Florent Le mer. 2 juil. 2025 à 13:25, Emanuel Han via ntg-context < ntg-context@ntg.nl> a écrit : > Does somebody has a solution for this? > Thank you! > > 2025/06/30 12:39、Emanuel Han via ntg-context <ntg-context@ntg.nl>のメール: > > > > I want my custom color rose_color to be applied for background color for > \framed inside lmt_text. For fill fullcircle, it works. With predefined > colors as green, it works. > > \starttext > > \startMPcode > > color rose_color; rose_color = 1/256(255,204,255); > > %not working > draw lmt_text [text > ="\framed[background=color,backgroundcolor=rose_color,frame=on, > location=low]{a rose box}",]; > > %working > draw lmt_text [text > ="\framed[background=color,backgroundcolor=green,frame=on, location=low]{a > green box}",] shifted (1cm,1cm); > > %working > fill fullcircle scaled 2cm shifted (0,3cm) withcolor rose_color; > > \stopMPcode > > \stoptext > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___________________________________________________________________________________ > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___________________________________________________________________________________ >
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________