如何将 smartdiagram 包中的字体颜色更改为白色?

如何将 smartdiagram 包中的字体颜色更改为白色?

我想将 smartdiagram 包中的字体颜色从灰色更改为白色,以便在打印黑白时更易读。这是我当前的代码

\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}

文本颜色 = 白线应该可以解决这个问题,但实际上却不行。还有其他想法吗?

答案1

似乎没有bubble text密钥。作为一种解决方法,您可以使用\tikzset添加到和的text=white设置:bubble center nodebubble 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}

结果:

在此处输入图片描述

答案2

text color不支持bubble类型图。但是,您可以\color{white}bubble node font和中添加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}

白色文字

相关内容