Question: Good afternoon,

I would like to know how to colour the nodes A and Y in another colour (grey for example) without changing the colour of the other two nodes.

Best regards.

```
\begin{figure}[h]
\centering
\begin{tikzpicture}[
  node distance=1cm and 1cm,
  mynode/.style={draw,circle,text width=0.5cm,align=center}
]

\node[mynode] (z) {A};
\node[mynode,right=of z] (x) {Y};
\node[mynode,left=of z] (y) {$U_A$};
\node[mynode,right=of x] (w) {$U_Y$};

\path (x) edge[latex-] (z);
\path (y) edge[latex-] (z);
\path (x) edge[latex-] (w);

\end{tikzpicture}
\caption{Graph.}
\end{figure}

```

Answer: 
Replace `\pgfcalendarweekdayshortname` by `\myweekday` and define the latter in the preamble as

```
\newcommand\myweekday[1]{\ifcase#1M\or T\or W\or T\or F\or S\or S\fi}

```

[![enter image description here](https://i.stack.imgur.com/Uh52X.png)](https://i.stack.imgur.com/Uh52X.png)

```
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calendar}
\newcommand\myweekday[1]{\ifcase#1M\or T\or W\or T\or F\or S\or S\fi}
\begin{document}

\begin{tikzpicture}
    \calendar[dates=2021-01-01 to 2021-01-last,
        day list downward, 
        day code={
            \node[anchor = east]{\tikzdaytext};
            \draw node[anchor = west, gray]{\myweekday{\pgfcalendarcurrentweekday}};
            },
        execute after day scope={
            \ifdate{Sunday}{\pgftransformyshift{1em}}{}},
        ]
        if(weekend) [shape=coordinate]; %  (1)
\end{tikzpicture}

\end{document}

```
Using `\StrLeft` from the `xstring` package:

```
\documentclass[12pt]{article}
\usepackage{tikz}
\usetikzlibrary{calendar}
\usepackage{xstring}

\begin{document}

\begin{tikzpicture}
    \calendar[dates=2021-01-01 to 2021-01-last,
        day list downward, 
        day code={
            \node[anchor = east]{\tikzdaytext};
            \draw node[anchor = west, gray]{\StrLeft{\pgfcalendarweekdayshortname{\pgfcalendarcurrentweekday}}{1}};
            },
        execute after day scope={
            \ifdate{Sunday}{\pgftransformyshift{1em}}{}},
        ]
        if(weekend) [shape=coordinate]; %  (1)
\end{tikzpicture}

\end{document}

```

[![enter image description here](https://i.stack.imgur.com/v1aNP.png)](https://i.stack.imgur.com/v1aNP.png)