The TeX file
\documentclass[12pt]{article}
\begin{document}
ffi
\end{document}
produces the following ligature when compiled to PDF:
Note that ffi is represented by a single special character.
However, when I try to color each character in a different color, the characters won't translated to a ligature anymore. For example, when I type
\documentclass[12pt]{article}
\usepackage{color}
\begin{document}
\textcolor{red}{f}\textcolor{blue}{f}\textcolor{green}{i}
\end{document}
the produced PDF looks as follows:
Note that ffi is now represented by three individual characters.
Is there any possibility to color the characters without breaking ligatures apart, i.e.: to produce a ligature like in the first example but with colored characters?
![[image]](../../images/ddbb9555a23ab95745003fe2c937fa2c.webp)

