# Flacards package - renewcommand with variables

I have a problem with the flacards package. I'm trying to make playing cards, where the frame of different cards are colored differently. Here is a working example:

\documentclass[a4paper,frontgrid]{flacards}
\usepackage{aurical}
\usepackage[T1]{fontenc}
\usepackage{ngerman}
\usepackage{tikz}
\usepackage{graphicx}

\usepackage{color}
\usepackage{transparent}
\fboxsep=0mm

\renewcommand{\frfoot}{\footnotesize\thecardno\hskip3pt\smallskip} % change layout for left foot on front
\renewcommand{\brfoot}{}

%Group Colors

\definecolor{griff}{RGB}{224, 57, 35}
\definecolor{slyth}{RGB}{45, 205, 109}

%Command for Card Title:

%BACKGROUND

{\begin{tikzpicture}[remember picture, overlay]
\node  at (3.18,-4.64) {
\includegraphics[width=63.47mm, height=92.477mm]{pics/parch4.jpg}
};%
\end{tikzpicture}}
{\begin{tikzpicture}[remember picture, overlay]
\fill[{black}, even odd rule]

(-0.138,-9.24) rectangle ++(63.47mm,92.477mm)
(-0.138 + 0.175,-9.24+0.175) rectangle ++(60mm,89mm);
\end{tikzpicture}}
}

\begin{document}

\Fontskrivan
\pagesetup{3}{3} % 3x3 cards

\card{
Test}{Empty}

\end{document}


Now, If I renew the command \flhead to make it dependent to a variable #1, it seems not to work, since the predefined macro \card prints the \flhead command anyway.

   \renewcommand{\flhead}[1]{\texttransparent{0.4} %Background Transparency
{\begin{tikzpicture}[remember picture, overlay]
\node  at (3.18,-4.64) {
\includegraphics[width=63.47mm, height=92.477mm]{pics/parch4.jpg}
};%
\end{tikzpicture}}
{\begin{tikzpicture}[remember picture, overlay]
\fill[{#1}, even odd rule]

(-0.138,-9.24) rectangle ++(63.47mm,92.477mm)
(-0.138 + 0.175,-9.24+0.175) rectangle ++(60mm,89mm);
\end{tikzpicture}}


The command \flhead works, but only alone. Within the \card macro it does not work.

\card{
Test}{test}


Why this doesn't work? Any idea how it could work? This is for a present for my little brother and I want to finish this in the next 10 days.

P.S.: If you wonder why I made the frame in such a complicated way, I later want to apply some structure to the inner rectangle. (But this would be a new question)

Here I set up a macro \myflhead, that redefines \flhead with the given color argument. I think the issue is that, perhaps, \flhead is not intended, itself, to take arguments.

Still, \myflhead needs to be invoked prior to the invocation of \card, but can be used to change the border color.

\documentclass[a4paper,frontgrid]{flacards}
\usepackage{aurical}
\usepackage[T1]{fontenc}
\usepackage{ngerman}
\usepackage{tikz}
\usepackage{graphicx}

\usepackage{color}
\usepackage{transparent}
\fboxsep=0mm

\renewcommand{\frfoot}{\footnotesize\thecardno\hskip3pt\smallskip} % change layout for left foot on front
\renewcommand{\brfoot}{}

%Group Colors

\definecolor{griff}{RGB}{224, 57, 35}
\definecolor{slyth}{RGB}{45, 205, 109}

%Command for Card Title:

%BACKGROUND

{\begin{tikzpicture}[remember picture, overlay]
\node  at (3.18,-4.64) {
\includegraphics[width=63.47mm, height=92.477mm]{example-image}
};%
\end{tikzpicture}}
{\begin{tikzpicture}[remember picture, overlay]
\fill[{#1}, even odd rule]

(-0.138,-9.24) rectangle ++(63.47mm,92.477mm)
(-0.138 + 0.175,-9.24+0.175) rectangle ++(60mm,89mm);
\end{tikzpicture}}
}
}
\begin{document}

\Fontskrivan
\pagesetup{3}{3} % 3x3 cards

\card{
Test}{Empty}

\card{
Test}{Empty}

\end{document}


Alternately, to achieve the same result, \card could be redefined to take the border color as an optional argument, as in

\card[red]{
Test}{Empty}


Here is the MWE.

\documentclass[a4paper,frontgrid]{flacards}
\usepackage{aurical}
\usepackage[T1]{fontenc}
\usepackage{ngerman}
\usepackage{tikz}
\usepackage{graphicx}

\usepackage{color}
\usepackage{transparent}
\fboxsep=0mm

\renewcommand{\frfoot}{\footnotesize\thecardno\hskip3pt\smallskip} % change layout for left foot on front
\renewcommand{\brfoot}{}

%Group Colors

\definecolor{griff}{RGB}{224, 57, 35}
\definecolor{slyth}{RGB}{45, 205, 109}

%Command for Card Title:

%BACKGROUND

{\begin{tikzpicture}[remember picture, overlay]
\node  at (3.18,-4.64) {
\includegraphics[width=63.47mm, height=92.477mm]{example-image}
};%
\end{tikzpicture}}
{\begin{tikzpicture}[remember picture, overlay]
\fill[{#1}, even odd rule]

(-0.138,-9.24) rectangle ++(63.47mm,92.477mm)
(-0.138 + 0.175,-9.24+0.175) rectangle ++(60mm,89mm);
\end{tikzpicture}}
}
}

\let\svcard\card
\begin{document}

\Fontskrivan
\pagesetup{3}{3} % 3x3 cards

\card[red]{