what if I want to create such a background in the scene
Hello and welcome!
The simplest way is to set canvas transparent with
scene.clearColor = new BABYLON.Color4(0,0,0,0);
and use any CSS background behind the canvas.
Example: Mu-so Wood Edition 3D
Please note, that this is just background, it is not a texture.
For textures one may use Color3Gradient | Babylon.js Documentation
Just to add you can also use layers
or create a cube map
You can also set the clearColor to transparent, and do a CSS gradient on the canvas parent node