With preact-material-components you can either choose to use the bundled .css files or the .scss files. Both have their different ways to handle theming.
With the css files you can either override the colors and backgrounds with a more specificity css rule or you can alter the css variables defined on the original documentation page.
Whereas with the scss files you can directly go an while importing the scss of the individual components, you can declare your scss variabled as shown here.