\newcommand - Used to create your own commands (control sequences, macros, definitions).
{ \newcommand\myCommandName [ <optional # of arguments, from 1 to 9> ] { <replacement text> } }
\newcommand command is used for defining your own commands (control sequences, macros, definitions); \newcommand must appear (within math delimiters) before it is used; if desired, you can use the TeX.Macros property of the configuration to define macros in the head. The bracketed # of arguments is omitted when there are no arguments.
\newcommand\myHearts {\color{purple}{\heartsuit}\kern-2.5pt\color{green}{\heartsuit}} \myHearts\myHearts
\newcommand\myHearts[2] {\color{#1}{\heartsuit}\kern-2.5pt\color{#2}{\heartsuit}} \myHearts{red}{blue}