Skip to content
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

Background turns black when zooming out #468

Open
nene opened this issue Apr 11, 2024 · 2 comments
Open

Background turns black when zooming out #468

nene opened this issue Apr 11, 2024 · 2 comments

Comments

@nene
Copy link

nene commented Apr 11, 2024

I would like to keep the background a constant color when zooming in/out.

I discovered various issues about the background color. These suggested setting background_image property. This works, but the image still becomes lighter/darker when zoomed.

Another issue suggested setting the background color of the surrounding div. This only seemed to have a mild effect when zooming in. But not at all when zooming out. Here's an example with the surrounding div background set to red:

red-bg.mov

I personally also discovered zoom_modify_alpha property. Setting this to false disables the gradual darkening/lightening. But at one point the background simply flips to black. Here's a demonstration of the following settings:

canvas.background_image = "/grid.png"; // non-transparent image
canvas.zoom_modify_alpha = false;
Screen.Recording.2024-04-11.at.13.56.09.mov

More likely though there's something messed up in the surrounding environment where I'm using litegraph... this project I'm working with is such a mess :(

@suhli
Copy link

suhli commented May 21, 2024

same here

@atlasan
Copy link
Contributor

atlasan commented May 28, 2024

could try canvas.clear_background_color = "#FFF";
(haven't tried myself)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants