Colorised LaTEX formula

Unfortunately video on mobile phone does not help, it is too small to see the detail. Please share a reproducible example (FAQ: What's a reproducible example (`reprex`) and how do I create one?) as I did here above: Colorised LaTEX formula - #2 by cderv

Did you run the snippet of code I published above ? What is not working for you in those example ?

Your example in first post with \wildetilde works if you use a newer version of Mathjax as explained

---
title: "test"
output:
  html_document: 
    mathjax: https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
---

$$
\begin{align*}
 Y& = \beta_{0} + \beta_{1}X_{1} + \beta_{2}X_{2} + \beta_{3}X_{1}X_{2}\\ 
 &= \beta_{0} + {\color{Red} \widetilde{\beta_{1}}}X_{1} + \beta_{2}X_{2}; {\color{Red} \widetilde{\beta_{1}}} = \beta_{1} + \beta_{2}X_{2}\\
\end{align*}
$$

It will work with default mathjax, if you change the syntax for color as explained above.

What do you expect differently ?