# How to animate a few words with many color in \documentclass{article}

\documentclass[12pt]{report}
\usepackage[margin=0cm,paper height=14.3cm,paper width=16.4cm]{geometry}
\usepackage{tikz,animate}
\pagestyle{empty}
\parindent=0mm
\def\shape#1{
\begin{tikzpicture}[scale=0.25]
\draw[inner color=yellow!50!white,outer color=#1,rounded corners=.5mm] (0,0)--(1,.5)--(3,.5)--(4,0)--(3,-.5)--(1,-.5)--cycle;
\end{tikzpicture}
}
\usetikzlibrary{arrows,shapes,calc}
\begin{document}
\begin{animateinline}[loop,autoplay]{8}
\multiframe{2}{rim=2+30}{
\begin{tikzpicture}
\coordinate(2) at ([shift={(225:1)}]current page.north east);
\coordinate(1) at ([shift={(-45:1)}]current page.north west);
\coordinate(3) at ([shift={(135:1)}]current page.south east);
\coordinate(4) at ([shift={(45:1)}]current page.south west);
\node at ([xshift=2cm]current page.center){};
\foreach \i in {0,4,8,12}{\foreach \n/\m in {1/2,4/3}{
\node at ($(\n)!2cm+\i cm!(\m)$) {\shape{black!60!gray!\rim!white}};
\node at ($(\n)!3cm+\i cm!(\m)$) {\shape{white!\rim!blue}};
\node at ($(\n)!4cm+\i cm!(\m)$) {\shape{black!10!green!\rim!white}};
\node at ($(\n)!5cm+\i cm!(\m)$) {\shape{white!\rim!red}};}}
\end{tikzpicture}}
\end{animateinline}
\end{document}

• Can you add a bit extra information what you mean by "animate" and "many colour"? – user36296 Oct 3 '18 at 20:26
• You are nesting tikzpictures, i.e. put some tikzpictures into nodes of another tikzpicture. This should be avoided. Your \shape can be easily done by a pic. – user121799 Oct 3 '18 at 21:23
• Use \tikzset{pics/.cd, shape/.style={code={ \draw[inner color=yellow!50!white,outer color=#1,rounded corners=.5mm] (0,0)--(1,.5)--(3,.5)--(4,0)--(3,-.5)--(1,-.5)--cycle; }}} and then \pic[scale=0.25] at ($(\n)!2cm+\i cm!(\m)$) {shape=black!60!gray!\rim!white}; and so on in the tikzpicture to avoid nesting. – user121799 Oct 3 '18 at 21:32
• I mean by animate that I want to write a few words that radiate different colors such as red, blue, and green (Such as ambulance light) – Walid Tex Oct 4 '18 at 16:58
• Thus, the decorations on top and bottom page edges are unrelated to your request? Instead, it is about filling the white space in between? No idea what you are after. – AlexG Oct 5 '18 at 8:29

\documentclass[12pt]{article}
\usepackage[top=1cm,bottom=1cm,right=1cm,left=1cm]{geometry}
\usepackage{tikz,animate}

\begin{document}

\begin{animateinline}[loop,autoplay]{5}
\multiframe{3}{rim=30+30}{
\begin{tikzpicture}
\coordinate(2) at ([shift={(225:1)}]current page.north east);
\coordinate(1) at ([shift={(-45:1)}]current page.north west);
\coordinate(3) at ([shift={(135:1)}]current page.south east);
\coordinate(4) at ([shift={(45:1)}]current page.south west);
%\node at ([xshift=2cm]current page.center)
%{\includegraphics[width=16cm,height=14cm]{eid}};
\node[scale=3] at (current page)