Add builder hat to other people with tikzpeople

You could misuse one of the (unused) accessories:

\documentclass{article}
\usepackage{tikzpeople}
\begin{document}
\begin{tikzpicture}
\makeatletter 
\tikzpeople@builder@definecolors
\let\tikzpeople@person@paintshield\tikzpeople@builder@painthat
\node[alice,shield,minimum size=1.5cm] at (0,0) {};
\end{tikzpicture}
\end{document}

enter image description here


Ok, I managed it by taking a closer look into the files of the tikzpeople package.

To define a new combination (builderalice in my case) you need to define a new file tikzpeople.shape.builderalice.sty where you combine the parts and the according colors. Then you need to call \tikzpeople@declareshape{builderalice} (as it is intended to not be called from outside and contains an @ you need to wrap it in \makeatletter and \makeatother).

\documentclass[tikz]{standalone}
\usepackage{tikz}
\usepackage{tikzpeople}
\usepackage{filecontents}

\begin{filecontents}{tikzpeople.shape.builderalice.sty}
\newcommand{\tikzpeople@builderalice@paint}{
    \tikzpeople@person@paintshirt
    \tikzpeople@alice@paintshirtdetails
    \tikzpeople@person@paintrighthorn
    \tikzpeople@person@painthead
    \tikzpeople@alice@painthair
    \tikzpeople@person@paintgoatee
    \tikzpeople@person@paintlefthorn
    \tikzpeople@person@painthalo
    \tikzpeople@builder@painthat
}
\newcommand{\tikzpeople@builderalice@definecolors}{
    \definecolor{shirt}{RGB}{253,156,40}
    \definecolor{undershirt}{RGB}{232,232,232}
    \definecolor{skin}{RGB}{148,60,19}
    \definecolor{hair}{rgb}{0,0,0}
    \definecolor{hat}{RGB}{238,175,0}
}
\end{filecontents}

\makeatletter
\tikzpeople@declareshape{builderalice}
\makeatother

\begin{document}
\begin{tikzpicture}[]
  \node[builder,minimum size=1.5cm] (T) at (-1,0) {};
  \node[alice,minimum size=1.5cm] (N) at (1,0) {};
  \node[builderalice,minimum size=1.5cm] (A) at (3,0) {};
\end{tikzpicture}
\end{document}

enter image description here


This seems to be an XY question. What you might be really looking for is the TikZlings package in which you can add the accessories at will.

\documentclass[tikz,border=1mm]{standalone}
\usepackage{tikzlings}
\begin{document}
\begin{tikzpicture}
 \owl
 \thing[tophat,scale=1.5,yshift=-0.6cm,xshift=-0.05cm]
 \begin{scope}[xshift=2cm]
  \bear[magichat=violet,
   magicstars=yellow!80!brown]
 \end{scope}  
\end{tikzpicture}
\end{document}

enter image description here