New Engine Background Color

I just update to 4.2.0 Alpha 20… And there seems to be something new with background color…

Now its shows some brown looking background color when loading the scene… Its even overriding my custom css background color i have for the host page running babylon engine…

it looks like the engine is now setting the html or body css background-color :frowning:

Anybody know whats that about and how i can set that color to match my html css background color when loading a scene ???

Nothing should have change in this regard our default is still a dark blue.

Scene.clearColor can help you chose the color you want.

I was using 4.2.0 Alpha 16…

My index.html sets html and body background-color like this:

        html, body {
            position: absolute;
            min-height: 100%;
            width: 100%;
            height: 100%;
            padding: 0px;
            margin: 0px;
            overflow: hidden;
            touch-action: none;
            font-family: "Segoe UI", "Segoe WP", "Verdana", "Arial";
            background-color: #2A2342;

after updating the babylon.js libs in project to 4.2.0 Alpha 20 (and nothing else)

my html background-color change to some Dark Looking Color cant tell if that blur or not

something is change the body background color to #333


I found it… For some reason the latest babylon.inspector.js is overriding my body.backgroud-color style to #333

Can we please not do that in these newer Alpha builds ???

Interesting, haven’t explored this yet, though as @sebavan mentioned, something like

scene.clearColor = new BABYLON.Color4(0, 0, 0, 0);

will hopefully allow your Babylon scene to take on the same color as your html css background color

The problem is that now the inspector is overriding the background color of the page body with #333

This is a tiny mistake introduced in one of the latest feature. This will be fixed in the next nightly.


Thank you Sebastian :blush:

Yo @sebavan … this issue is back again… the background color is being set to #333 in the Alpha 33 builds

@Evgeni_Popov, could you have a look ? last time the whole html body was applied some css turning the background to 333 it might be the same happening here ?

Having a look asap.

There is this in the curveEditor.scss file:

body {
  background-color: #333;

I assume it is the culprit?

1 Like

Yep…let me tell that to the team

1 Like

Just Checking … @Deltakosh … This is still an issue in the Alpha 35

Yes…We do not have yet merged the update

Yo @Deltakosh … I tried again, a week later but it still seems like that bug is in there that is changing the background color of my page. Can we please remove that css that is changing the body background color ?

There is this in the curveEditor.scss file:

body {
  background-color: #333;

Thanks a bunch :slight_smile:

The team is still working on their final push for this week on the curve editor. I guess it should be in real soon now. If not, please ping us again, and we ll do the change. Thanks a lot @MackeyK24 :slight_smile:

I do not want to make the change right now as I am afraid it might conflict with the team changes depending how they fixed it.

ok thanks… just wanted to make sure it didnt get missed… sorry to nag about it :slight_smile:

No problem please do it again in couple weeks if still not fixed :slight_smile: