\startuseMPgraphic{mp:textFrame}
begingroup;
	path p ;
	for i = 1 upto nofmultipars :
		p := (ulcorner multipars[i]) -- (llcorner multipars[i]) -- (llcorner multipars[i] xshifted .25cm) -- (ulcorner multipars[i] xshifted .25cm) -- cycle ;
		fill p withcolor boxfillcolor ;
	endfor;
endgroup;
\stopuseMPgraphic

\definetextbackground
	[textFrameDef]
	[
		mp=mp:textFrame,
		location=paragraph,
		background=color,
		backgroundcolor=darkred,
	]

\defineenumeration
  [defi]
  [
    text=Definition,
    before={%
			\starttextbackground[textFrameDef]
			\setupnarrower
				[left=.75cm]%
			\startnarrower[left]%
		},
		after={%
			\stopnarrower%
			\stoptextbackground%
		},
  ]

\definetextbackground
	[textFrameEx]
	[
		mp=mp:textFrame,
		location=paragraph,
		background=color,
		backgroundcolor=darkgreen,
	]

\defineenumeration
  [exa]
  [
    text=Example,
    before={%
			\starttextbackground[textFrameEx]
			\setupnarrower
				[left=.75cm]%
			\startnarrower[left]%
		},
		after={%
			\stopnarrower%
			\stoptextbackground%
		},
  ]

\starttext

Some text

\blank[big]

\startdefi
Some text
\stopdefi

\blank[big]

\startexa
Some text
\stopexa

\stoptext