I tried to look at these previous posts to solve my problem:
It seems that the solutions proposed by these posts reprogram the colour of all the current flow in the figure. What I am trying to do is if SELECTIVELY changing the colour of the current arrows on my diagram. On the following network, I am trying to colour the complete I1(t) arrow in red (not just the tip of the arrow is coloured in my MWE) and leave Ic(t) in black including the tip of the arrow.
\documentclass{standalone}
\usepackage{circuitikz}
\makeatletter
\ctikzset{current arrow color/.initial=black}% create key
\pgfdeclareshape{currarrow}{
\anchor{center}{
\pgfpointorigin
}
\anchor{tip}{
\pgfpointorigin
\pgf@circ@res@step = \pgf@circ@Rlen
\divide \pgf@circ@res@step by 16
\pgf@x =\pgf@circ@res@step
}
\behindforegroundpath{
\pgfscope
\pgf@circ@res@step = \pgf@circ@Rlen
\divide \pgf@circ@res@step by 16
\pgfpathmoveto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
\pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{-.8\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{1\pgf@circ@res@step}{0pt}}
\pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{.8\pgf@circ@res@step}}
\pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@step}{0pt}}
\pgfsetcolor{\pgfkeysvalueof{/tikz/circuitikz/current arrow color}}
\pgfusepath{draw,fill}
\endpgfscope
}
}
\makeatother
\begin{document}
\ctikzset{voltage/distance from node=.8}
\begin{circuitikz}[american]
\draw[circuitikz/current arrow color=red]
% bottom line
(0,0) to [short, o-] (9,0)
% shunt branches
(2,0) to [C, *-*,l={$C/2$},v=$V_C$,f>^=$I_C(t)$] (2,3)
(9,0) to [C, *-*,l=$C/2$,n=C2] (9,3)
% top line
(0,3) to [short,o-] (3,3)
to [R, l_=$R_1$,i={\color{\pgfkeysvalueof{/tikz/circuitikz/current arrow color}}$I_1$},f>^=$\color{red}I_1(t)$] (9,3)
% Input and output labels
(C2.s) node[right] {$V_s$};% anchors rotated
\end{circuitikz}
\end{document}
