[Tex/LaTex] Adjust frame title rule with tcolorbox

mdframedtcolorbox

I have been unable to locate an example using tcolorbox which sets the color and width of the line below the frame title independent of the background color of the frame title. With mdframed one can control these via frametitlerulecolor=red and frametitlerulewidth=4pt:

enter image description here

What are the equivalent options when using tcolorbox?

Code:

\documentclass{article}
\usepackage{xcolor}
\usepackage[tikz]{mdframed}
\usepackage{tcolorbox}

\mdfsetup{
    roundcorner=4pt,
    linewidth=1.5pt,
    frametitlerule=true, 
    frametitlebackgroundcolor=olive!15,
    % ----------------------------------
    frametitlerulecolor=red,%    How do I get the equivalent of two 
    frametitlerulewidth=4pt,%    options when using {tcolorbox}?
}

\tcbset{
    fonttitle=\bfseries,
    coltitle=black,
    colbacktitle=olive!15,
}

\begin{document}
\begin{mdframed}[backgroundcolor=green!25, frametitle={Mdframed}]
    Content
\end{mdframed}

\begin{tcolorbox}[colback=green!25, title={Tcolorbox}]
    Content
\end{tcolorbox}
\end{document}

Best Answer

To control the line thickness for the title rule, you can use the titlerule=<length> option; unfortunately, in the current version (3.36 when this answers was written) there's no key to individually control the color of the title rule and this line will inherit the frame color; I'm sure Thomas will add this option in a new update :) In the meantime, you can use enhanced and an overlay to control the attributes individually; something along these lines:

\documentclass{article}
\usepackage{xcolor}
\usepackage[tikz]{mdframed}
\usepackage[many]{tcolorbox}

\mdfsetup{
    roundcorner=4pt,
    linewidth=1.5pt,
    frametitlerule=true, 
    frametitlebackgroundcolor=olive!15,
    % ----------------------------------
    frametitlerulecolor=red,%    How do I get the equivalent of two 
    frametitlerulewidth=4pt,%    options when using {tcolorbox}?
}

\tcbset{
    enhanced,
    fonttitle=\bfseries,
    coltitle=black,
    colbacktitle=olive!15,
    titlerule=0mm,
    overlay={
      \path[draw,red,line width=4pt] ([yshift=-2pt]title.south west) -- ([yshift=-2pt]title.south east);
    } 
}

\begin{document}
\begin{mdframed}[backgroundcolor=green!25, frametitle={Mdframed}]
    Content
\end{mdframed}

\begin{tcolorbox}[colback=green!25, title={Tcolorbox}]
    Content
\end{tcolorbox}
\end{document}

The output:

enter image description here