\documentclass{memoir}
\usepackage{xcolor}
\usepackage{arrayjob}
\newarray\PagetabColors
\readarray{PagetabColors}{red&orange&yellow&green&cyan&blue&violet&lightgray&darkgray&black}
\begin{document}
\PagetabColors(1)
\textcolor{blue}{blue}
\textcolor{red}{blue}
\textcolor{\PagetabColors(1)}{blue}
\end{document}
마지막 줄이 원하는 대로 작동하지 않습니다. \expandafter 같은 걸 이용하면 될 듯한데 이리저리 돌려 붙여 봤지만 계속해서 걸립니다.
이왕이면 (1)에 카운터를 넣었으면 좋겠습니다.