Setting background color to every form thats on same url


Hello there,
Im trying to set background render background color to url on localhost and it works, however whenever i go to other url on localhost like localhost/test there is a white flickering page before loading, that page is a render process. Can I somehow set renderprocess background color for every page on localhost url?

const electron = require('electron')
// Module to control application life.
const app =
// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow

const path = require('path')
const url = require('url')

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow

function createWindow () {
  // Create the browser window.
  mainWindow = new BrowserWindow({width: 800, height: 600,show:false, backgroundColor: '#1cb4f7'})
  mainWindow.once('ready-to-show', () => {
  // and load the index.html of the app.

  // Open the DevTools.
  // mainWindow.webContents.openDevTools()

  mainWindow.on('closed', function () {

    mainWindow = null

app.on('ready', createWindow)

app.on('window-all-closed', function () {

  if (process.platform !== 'darwin') {

app.on('activate', function () {

  if (mainWindow === null) {