Using transparency in METAPOST within textext()
![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work. \starttext \setupMPpage [background=color, backgroundcolor=gray] \startMPpage draw textext("\definecolor[labelbackground][a=0.2,r=1,g=1,b=1]\framed[height=1.2em,background=color,backgroundcolor=labelbackground,foregroundcolor=black]{Text in Label}"); \stopMPpage \stoptext Thx. G
![](https://secure.gravatar.com/avatar/74d41c3215dcdd377343cdc47311757c.jpg?s=120&d=mm&r=g)
Gerben Wierda schrieb am 14.05.2020 um 11:47:
Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work.
\starttext \setupMPpage [background=color, backgroundcolor=gray] \startMPpage draw textext("\definecolor[labelbackground][a=0.2,r=1,g=1,b=1]
\definecolor[labelbackground][a=1,t=0.2,r=1,g=1,b=1] Wolfgang
![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
Thank you. That works.
On 14 May 2020, at 17:13, Wolfgang Schuster
wrote: Gerben Wierda schrieb am 14.05.2020 um 11:47:
Is it possible to get a transparent background in a textext()? The following minimal example doesn’t work. \starttext \setupMPpage [background=color, backgroundcolor=gray] \startMPpage draw textext("\definecolor[labelbackground][a=0.2,r=1,g=1,b=1]
\definecolor[labelbackground][a=1,t=0.2,r=1,g=1,b=1]
Wolfgang
G
participants (2)
-
Gerben Wierda
-
Wolfgang Schuster