2

Given the following example, how is it possible to change the text color of the word node in the first circle without affecting the color of the remaining text inside, i.e., With?

\documentclass{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
        \node[fill=green, text=red, circle, draw=black] {With node};
        \draw[fill=cyan] (3,0) circle (1cm) node[text=blue] {With draw};
    \end{tikzpicture}
\end{document}

enter image description here

4

You could use \textcolor inside of the node:

\documentclass{article}
\usepackage{tikz}
\begin{document}
    \begin{tikzpicture}
      \node[fill=green, text=red, circle, draw=black] {With
      \textcolor{cyan}{node}};
        \draw[fill=cyan] (3,0) circle (1cm) node[text=blue] {With draw};
    \end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.