改变颜色边框

改变颜色边框

给出答案这里,我做了如下修改:

\documentclass[10pt]{article}

\usepackage{graphicx}
\usepackage[x11names,svgnames,dvipsnames]{xcolor}
\usepackage[most]{tcolorbox}

\usepackage[tikz]{bclogo}
\usetikzlibrary{calc}
\usetikzlibrary{shapes}
\usetikzlibrary{fadings}

\usepackage{blindtext}
\usepackage{XCharter}
\usepackage[T1]{fontenc}

    \newtcolorbox{recyclebox}[2][]{%
      breakable,
      enhanced jigsaw,
      coltitle={recyclecolor!300},
      fonttitle={\bfseries\large},
      title={\MakeUppercase{Recycle!}},
      attach title to upper={{~\itshape\bfseries\large #2}\par},
      colframe=recyclecolor!300,
      colback=recyclecolor!03,
      interior style={left color=recyclecolor!30, right color=recyclecolor!30,middle color=recyclecolor!10},
      overlay={%
        \draw[recyclecolor,line width=1.5pt,fill=recyclecolor!30,] ($(interior.north west) + (-0.02pt,-1cm)$) arc [start angle=90,end angle=270,radius=0.5cm] node[midway] (dottedcircle) {};
        \foreach \x in {1,...,12} {%
          \draw[fill,opacity=1.0*(\x/12),recyclecolor] ($(dottedcircle)+ (0.5cm-0.02pt,0)+(120+\x*30:0.3cm)$) circle (0.04cm);
        };
      },
      #1%
    }

\begin{document}


\begin{recyclebox}{There is and There are}
\blindtext
\end{recyclebox}


\end{document}

我正在尝试使圆点和边缘部分变暗,但仍然没有变暗。我该如何修复?

答案1

这是我对另一个问题的回答的一些改进,我在这里应用了径向阴影。

\documentclass[10pt]{article}

\usepackage{blindtext}
\usepackage{XCharter}
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\usepackage[x11names,svgnames,dvipsnames]{xcolor}
\usepackage[tikz]{bclogo}
\usetikzlibrary{calc}
\usetikzlibrary{shapes}

\usepackage[most]{tcolorbox}

\definecolor{recyclecolor}{RGB}{255,128,50}

\makeatletter

\tcbset{%
  decoration downshift/.store in={\decoration@downshift},
  decoration radius/.store in={\decoration@radius},
  decoration recycle radius/.store in={\decoration@recyclecircleradius},
  decoration dot radius/.store in={\decoration@dotradius},
  decoration content/.store in={\decoration@content},
  decoration colour/.store in={\decoration@colour},
}

\tcbset{recyclebox/.style={decoration radius=0.5cm,decoration downshift=-0.5cm}}

\tcbset{learnthisbox/.style={%
    decoration radius=0.5cm,
    decoration downshift=-0.5cm,
    decoration content={\bclampe},
    decoration colour=blue}
}


\newtcolorbox{recyclebox}[2][]{%
  recyclebox,
  decoration recycle radius={0.6*\decoration@radius},
  decoration dot radius={0.04*\decoration@radius},
  decoration colour=recyclecolor,
  breakable,
  enhanced jigsaw,
  leftrule=1.5pt,
  fonttitle={\bfseries\large},
  title={\MakeUppercase{Recycle!}},
  #1,
  attach title to upper={{~\itshape\bfseries\large #2}\par},
  interior style={shading=radial,inner color=tcbcol@back!0,outer color=tcbcol@back},
  underlay unbroken and first={%
    \draw[tcbcol@frame,line width=\kvtcb@left@rule,fill=tcbcol@back] ($(frame.north west) + (\kvtcb@[email protected],\decoration@downshift)$) arc [start angle=90.0,end angle=270.0,radius=\decoration@radius] node[midway,inner sep=0pt] (dottedcircle) {};
    \foreach \x in {1,...,12} {%
      \draw[fill=tcbcol@back,opacity=4*(\x/12),tcbcol@frame] ($(dottedcircle) + (\decoration@radius,0cm)+(120+\x*30:\decoration@recyclecircleradius)$) circle (\decoration@dotradius);
    };
  },
  colframe={\decoration@colour},
  colback={tcbcol@frame!60},
  coltitle={tcbcol@frame!100},
}


\newtcolorbox{learnthis}[2][]{%
  learnthisbox,
  breakable,
  enhanced jigsaw,
  leftrule=1.5pt,
  fonttitle={\bfseries\large},
  title={\MakeUppercase{Learn This!}},
  attach title to upper={{~\bfseries\large #2} \par},
  #1,
  interior style={inner color=tcbcol@back!0!white,outer color=tcbcol@back!100},
  underlay unbroken and first={%
    \draw[tcbcol@frame,line width=\kvtcb@left@rule,fill=tcbcol@back] ($(frame.north west) + (\kvtcb@[email protected],\decoration@downshift)$) arc [start angle=90.0,end angle=270.0,radius=\decoration@radius] node[midway,right] (dottedcircle) {\decoration@content};
  },
  % Something to be set after #1 has been read!
  colframe=\decoration@colour,
  colback=\decoration@colour!30,
  coltitle={tcbcol@frame},
}

\makeatother




\begin{document}

\begin{learnthis}[decoration content={\bccrayon}]{Past Tense}
\blindtext
\end{learnthis}


\begin{learnthis}[decoration colour=green]{Past Tense}
\blindtext
\end{learnthis}


\begin{recyclebox}[decoration radius={0.4cm},decoration dot radius=0.03cm]{There is and There are}
\blindtext[1]
\end{recyclebox}


\end{document}

在此处输入图片描述

相关内容