Create Application Customizer so you could override default CSS.
Similar thread about checking page library.
https://social.msdn.microsoft.com/Forums/office/en-US/d6d56c87-5110-41d0-bcf4-760955f70a7b/i-want-to-apply-application-customiser-to-all-the-modern-pages-under-site-pages-library-in?forum=sharepointdevelopment
The CSS to override default CSS.
const css: string = 'div[data-automation-id="titleRegionBackgroundImage"]{background-image:none !important;background-color: coral!important;}'; if (css) { // inject the style sheet const head: any = document.getElementsByTagName("head")[0] || document.documentElement; let customStyle: HTMLStyleElement = document.createElement("style"); head.appendChild(customStyle); customStyle.title = "MSCustom"; customStyle.type = "text/css"; customStyle.appendChild(document.createTextNode(css)) }
Sample result.
