Hello,
If I put any image, there is no problem : the title of the section is in
color and the text in black.
With a graphic made with TikZ, the title and the text are in color.
Thank you for your help.
Fabrice
\usemodule[tikz]
\usemodule [graph]
\usemodule[pgfplots]
\pgfplotsset{compat=newest}
\definecolor[Mycolor][c=.6,m=0.8,y=0,k=0]
\unexpanded\def\interff#1#2{\math{\left[#1\,;#2\right]}}
\setuphead
[section]
[textcommand=,
color=magenta,
style=]
\starttext
\startsection[title={Résoudre graphiquement une équation
\math{f(x)=g(x)}},sectionsegments=section,color=magenta]
\placefigure[none,right]{}{
\hbox{\switchtobodyfont[8pt]
\starttikzpicture[/pgf/declare function={f(\x)=\x^2-3;},/pgf/declare
function={g(\x)=-\x^2+2*\x+1;}]
\startaxis[
restrict x to domain=-3:3, xmax=3, xmin=-3,
restrict y to domain=-5:4, ymax=4, ymin=-5,
x=1cm,
y=0.5cm,
axis x line = middle,
axis y line = middle,
axis line style = thick,
major grid style=Mycolor,
minor grid style=Mycolor,
grid=both,
xtick={-2,...,2},
ytick={-4,...,3},
extra x ticks={-3,3},
extra x tick label={\null},
extra y ticks={-5,4},
extra y tick label={\null},
extra tick style={tick style={draw=none}},
every tick/.style={
black,
thick,
},
y tick label style={
/pgf/number format/1000 sep={}
},
xlabel=$x$,ylabel=$y$,
every axis x label/.style={
at={(ticklabel* cs:1.01)},
anchor=west,
},
every axis y label/.style={
at={(ticklabel* cs:1.01)},
anchor=south,
},
samples=2000,
>=stealth,
]
\addplot[only marks,mark=x,color=black,mark options={scale=1.5},
thick] table[x=Nombre,y=Valeur]{
Nombre Valeur
-1 -2
2 1
} ;
\addplot [smooth,domain=-1.5:2.5, thick,magenta] {f(x)} ;
\addplot [smooth,domain=-1.5:2.5, thick,green] {g(x)} ;
\node[above left,green] at (2,2) {\math{{\cal C}_g}} ;
\node[below right,magenta] at (1.5,-1) {\math{{\cal C}_f}} ;
\node[below left ] at (-0.1,-0.1) {\math{0}} ;
\node[fill=black,circle,scale=0.4,magenta] at (-1.5,{f(-1.5)}){} ;
\node[fill=black,circle,scale=0.4,magenta] at (2.5,{f(2.5)}){} ;
\node[fill=black,circle,scale=0.4,green] at (-1.5,{g(-1.5)}){} ;
\node[fill=black,circle,scale=0.4,green] at (2.5,{g(2.5)}){} ;
\stopaxis
\stoptikzpicture}}
\input knuth
\stopsection
\stoptext