0

How can I change the color of an adforn ornament ?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{adforn}
\begin{document}
    \adforn{21}
\end{document}

2 Answers 2

5

adforn provides its ornaments as a font, so you can change the colors like with any other font. See the xcolor documentation for the various ways of using and defining colors.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{adforn}
\usepackage{xcolor}
\begin{document}
\textcolor{blue}{\adforn{21}}
\end{document}
1
  • Many thanks @Doncherry, a very compact solution, I am very thankful ! I would accept both answers (yours and the Bernard's one) if possible !
    – Ommo
    May 5, 2022 at 9:03
5

Here are two ways.

Unrelated : unless your distribution is quite old, loading inputenc is not necessary any more: utf8 is what latex expects by default.

        \documentclass{article}
        \usepackage[utf8]{inputenc}
        \usepackage{adforn}
        \usepackage[svgnames]{xcolor}

        \begin{document}

         \centering {\color{VioletRed}\adforn{21}}\qquad \textcolor{DarkSeaGreen}{\adforn{21}}

        \end{document} 

enter image description here

2
  • Thanks a lot @Bernard !!! A very nice solution!! I would accept both answers!!!!
    – Ommo
    May 5, 2022 at 9:02
  • 2
    You're welcome. Always glad when I can help.
    – Bernard
    May 5, 2022 at 9:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .