Hmm, ho qualche perplessita’ sul tuo codice.
`%%%%%%%%
\setupcolors[state=start]
\definecolor[bho][r=1.0,g=0.0,b=0.0]
\starttext
…blah blah.. \color[bho]{my Red text}…. foo
%% For long text in color bho
\startcolor[bho]%
..foo …
\stopcolor%
\stoptext`
L’ambiente
`\startcolor[MyColor]
:
\stopcolor%`
si puo’ annidare:
`\setupcolors[state=start]
\definecolor[MyColor][r=0.4,g=0.1,b=0.9]
\starttext
\startcolor[MyColor]
\input tufte
\startcolor[red]%% nested red
\par{\sl(\color[green]{ \ldots red color now\ldots})}\par
\input tufte
\stopcolor
\input tufte
\stopcolor
\stoptext`
Quanto ad usare la “macro” \MyColor, compilando
`\setupcolors[state=start]
\definecolor[MyColor][r=0.4,g=0.1,b=0.9]
\starttext
\MyColor Hello
\stoptext`
ho un “warning”
### simple group (level 1) entered at line 4 ({)
### bottom level
quindi non la consiglio.
Nota: e’ legale usare spazi nei nomi come in
`\definecolor[Blue Color][r=0,g=0.1,b=0.9]
:
\color[Blue Color]{my text}
`
In definitiva uso \color per testi brevi, \startcolor[]\stopcolor per testi lunghi.
Per altre info sui colori: msplit.pdf
(e’ attivo anche http://mirror.contxtgarden.net )