-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window: backgroundColor does not match CSS color #9671
Comments
Does showing the window after |
@javan hard to say because when using that event, the timeout is no longer showing the window early before loading the URL. Our interest is to show a window as fast as possible so we would not want to use this event. It seems showing the window early works, except for this color inconsistency. |
This bug has also been affecting me for some time. It's trivial to reproduce by creating a window with a |
One thing I was wondering is if the colors we provide in |
I'm also encountering this issue. The BrowserWindow's After some trial and error, I managed to match the color set in |
I don't use |
Also experiencing this issue with electron v1.4.3. Interestingly, in an attempt to avoid this issue, I made my page background color transparent so that the background color of the window would be used. I tested with So it seems this is entirely an issue with the Also, I noticed that the custom theme for the Mac Terminal app that I made also doesn't display the background shade of grey correctly. Also also, I just did a test on one of the windows, it's not being converted to websafe for anyone who suspected that. My input |
I'm still seeing this with Electron 2.0 |
I've encountered this issue today as well, I thought I was hallucinating for a good amount of time, but it appears it's genuinely different.
|
@gtinkham Weren't you having this issue? |
Perhaps Electron has to use deviceRGB instead of some generic color profile? |
This should be fixed on latest versions of Electron. |
Expected behavior
Setting a window
backgroundColor
should produce the same visual result as setting it via CSS.Actual behavior
There is a slight flicker from where the background color from CSS kicks in.
How to reproduce
new BrowserWindow({ width: 800, height: 600, backgroundColor: '#DDDDDD' })
<body style="background-color: #DDDDDD;">
loadURL
of the window with a slight timeout to see the differenceThe following video shows the difference clearly:
Could it be that the window
backgroundColor
somehow uses a different color space compared to the renderer one via CSS?The text was updated successfully, but these errors were encountered: