\setupcolors[state=start]


\starttext

\unprotect

\ifnum\contextmarkmode=4
\def\@@currentcolorname{undefined}
\fi

\starttextcolor[blue]
Blue text.\par
\stoptextcolor

\starttextcolor[black]
Black text.\par
\stoptextcolor


\starttextcolor[blue]
Blue text.\par
\type{\currentcolorname: }\currentcolorname\par
\type{\@@currentcolorname: }\@@currentcolorname\par
\type{\@@themaintextcolor: }\@@themaintextcolor\par
\stoptextcolor

\starttextcolor[black]
Black text.\par
\type{\currentcolorname: }\currentcolorname\par
\type{\@@currentcolorname: }\@@currentcolorname\par
\type{\@@themaintextcolor: }\@@themaintextcolor\par
\stoptextcolor


\protect

\stoptext
