4

I want to change the font color from gray to white in the smartdiagram package so that in case it is printed b&w it is more readable. This is my current code

\documentclass[11pt,a4paper]{article}
\usepackage{color}
\usepackage{xcolor}
\usepackage{smartdiagram}

\smartdiagramset{
bubble center node font = \footnotesize,
bubble node font = \footnotesize,
bubble center node size = 0.6cm,
bubble node size = 0.3cm,
distance center/other bubbles = 0.6cm,
distance text center bubble = 0.5cm,
bubble center node color = blue,
set color list = {red, orange, green},
bubble fill opacity = 1,
bubble text opacity = 1,
text color = white
}

\begin{document}

\smartdiagram[bubble diagram]{
    \textbf{AAA}\\\textbf{BBB},
    \textbf{CCC}
}

\end{document}

The text color = white line should take care of it, but it doesn't. Any other ideas?

2
  • 2
    Please make your example compilable (full MWE).
    – TeXnician
    Sep 20, 2017 at 11:48
  • text color isn't supported for this type of diagram, according to the documentation.
    – cfr
    Sep 20, 2017 at 12:44

2 Answers 2

5

There seems to be no bubble text key. As a workaround you can use \tikzset to add text=white to the settings for bubble center node and bubble node:

\documentclass[11pt,a4paper]{article}

\usepackage{smartdiagram}

\smartdiagramset{
bubble center node font = \footnotesize,
bubble node font = \footnotesize,
bubble center node size = 0.6cm,
bubble node size = 0.3cm,
distance center/other bubbles = 0.6cm,
distance text center bubble = 0.5cm,
bubble center node color = blue,
set color list = {red, orange, green},
bubble fill opacity = 1,
bubble text opacity = 1
}
\tikzset{
bubble center node/.append style={text=white},
bubble node/.append style={text=white}
}

\begin{document}

\smartdiagram[bubble diagram]{
    \textbf{AAA}\\\textbf{BBB},
    \textbf{CCC}
}

\end{document}

Result:

enter image description here

3

text color is not supported for bubble type diagrams. However, you can add \color{white} to bubble node font and bubble center node font.

\documentclass[11pt,a4paper]{article}
\usepackage{smartdiagram}

\smartdiagramset{
  bubble center node font = \footnotesize\color{white}\bfseries,
  bubble node font = \footnotesize\color{white}\bfseries,
  bubble center node size = 0.6cm,
  bubble node size = 0.3cm,
  distance center/other bubbles = 0.6cm,
  distance text center bubble = 0.5cm,
  bubble center node color = blue,
  set color list = {red, orange, green},
  bubble fill opacity = 1,
  bubble text opacity = 1,
}

\begin{document}

\smartdiagram[bubble diagram]{
    AAA\\BBB,
    CCC
}

\end{document}

white text

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .