The other answers here will not work starting with Angular 19.
Angular Material version 19 and newer uses a new way to override styles.
You need to use the new syntax to set the color of the Angular Material Snackbar.
See details in this article:
How To Change the Color of Angular Material Snackbar
See this GitHub repo for the exact code:
angular-signalstore-example