I'm using the MWE that Jesper Ipsen provided in the following question.
I intend to use colored boxes instead of section numbers. My idea was to implement it as shown in the following question.
Now the only thing that's left to do is to have an easy way of adding those boxes whenever I create a new section, as shown below:
\section*{Time Machines}
The idea is to have it appear like this:
titlesec
package. – skpblack Jul 8 '17 at 9:17\newcommand\mybox[1][blue]{\textcolor{#1}{\rule{2ex}{2ex}}\hspace{0.5em}}
with\usepackage{xcolor}
package. In text:\section*{\mybox ABC} \section*{\mybox[red]Animals}
– Bobyandbob Jul 8 '17 at 10:11