set color of windows titlebar - electron.js

Viewed 30899

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

5 Answers

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

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.

Related