[Tex/LaTex] How to get custom section style using titlesec

colorboxminipagepdftexsectioningtitlesec

I am trying to design a custom section. My desire section will be something like this :

enter image description here

But I am unable to get the exact result. This is what I was trying :

enter image description here

Horizontal rule will be joined at the bottom of the section number box. Section number box width will be 60pt and it is fixed. Could you please help to getting my desire result. You can also do it from scratch if you have any easier and standard solution.

My code snippet :

\renewcommand*\thesection{\arabic{section}}
\usepackage[explicit]{titlesec}
\definecolor{myBlue}{HTML}{0088FF}

\titleformat{\section}[block]{\Large\bfseries\sffamily}%
{}%
{0pt}%
{%
\begin{minipage}[c]{60pt}{%
        \colorbox{myBlue}{%
            \parbox[b][15pt][t]{60pt}{% height, width
                \vfill%
                \fontfamily{phv}\selectfont\centering\color{white}{\thesection}
                \vfill%
            }}}%
\end{minipage}%
\hspace{15pt}%
\begin{minipage}[t]{\dimexpr\textwidth-75pt}
    \vspace*{-10pt}%
    \color{myBlue}{\Large #1}
\end{minipage}\\%
\color{myBlue}{\rule{\textwidth}{1.2pt}}
%
}

\titlespacing*{\section}{0pt}{3mm}{-5mm}

Best Answer

I will let you figure out the colour/sizing part of the problem but a simpler solution would be this one :

\usepackage[table]{xcolor}
\usepackage[explicit]{titlesec}
\usepackage{tabularx}
\usepackage{ctable}

\titleformat{\section}[block]{\Large\bfseries\sffamily}%
{}%
{0pt}%
{%
\renewcommand{\arraystretch}{1.5}
\begin{tabularx}{\textwidth}{p{60pt}X}
\centering\cellcolor{blue!25} \thesection & #1\\
\arrayrulecolor{blue!25}\specialrule{.25em}{-0.1em}{0em}
\end{tabularx}
%
}

picture