see this TeX.SE question for details : [How to change text color with typewriter package?](https://tex.stackexchange.com/questions/636231/how-to-change-text-color-with-typewriter-package). It seems that the `xcolor` package doesn't work to get colored text with the typewriter package.