Skip to content

Commit 5b34bc6

Browse files
committed
electron: Fix app not rendering colors properly.
There is a bug in v2 of electron which causes pale colors. Resetting the color profile to srgb fixes this problem. This is a temporary solution until electron officially fixes this. Fixes: #497.
1 parent 0e3c6bc commit 5b34bc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/main/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ function createMainWindow() {
131131
// Decrease load on GPU (experimental)
132132
app.disableHardwareAcceleration();
133133

134+
// Temporary fix for Electron render colors differently
135+
app.commandLine.appendSwitch('force-color-profile', 'srgb');
136+
134137
// eslint-disable-next-line max-params
135138
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
136139
event.preventDefault();

0 commit comments

Comments
 (0)