'set color of windows titlebar - electron.js

I would like to change the color of the titlebar for the windows version of my electron app. currently it is white, how do I change it to, for example, blue? enter image description here



Solution 1:[1]

actually now there is a way
take a look here, a lot of electron apps use it so I think is a win win...
just make sure to install this first

npm i custom-electron-titlebar

Solution 2:[2]

You must hide the window-title bar and build a new window title bar in html,css,js..

Solution 3:[3]

Now can hide the title bar and set the color of buttons in Windows with:

//main.js
const { BrowserWindow } = require('electron')
const win = new BrowserWindow({
  titleBarStyle: 'hidden',
  titleBarOverlay: {
    color: '#2f3241',
    symbolColor: '#74b1be'
  }
})

see Docs for more informations.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Egon Stetmann.
Solution 2 Robin Lindner
Solution 3 Yu ZHANG