> Continue your Babylon.js learning by adding materials to the objects in your scene.

Source: https://doc.babylonjs.com/features/introductionToFeatures/chap2/material

# Getting Started - Texture

## Add Texture
In order to add color and texture to our meshes, we apply a material to them. The basic material is the standard material, created like this:

```javascript
const material = new BABYLON.StandardMaterial("name", scene);
```
Let's make the ground green to represent grass.

```javascript
const groundMat = new BABYLON.StandardMaterial("groundMat");
groundMat.diffuseColor = new BABYLON.Color3(0, 1, 0);
ground.material = groundMat; //Place the material property of the ground
```
Since there is only one scene we can drop that parameter and let it default to the current scene.

Setting a color requires three parameters: red, green, and blue (r, g, b), each from 0 to 1 inclusive. (0, 0, 0) is black, and (1, 1, 1) is white.  
For these colors you can use
```javascript
BABYLON.Color3.Red();
BABYLON.Color3.Green();
BABYLON.Color3.Blue();
BABYLON.Color3.Black();
BABYLON.Color3.White();
BABYLON.Color3.Purple();
BABYLON.Color3.Magenta();
BABYLON.Color3.Yellow();
BABYLON.Color3.Gray();
BABYLON.Color3.Teal();
```
Now add some texture to the box and roof:
```javascript
const roofMat = new BABYLON.StandardMaterial("roofMat");
roofMat.diffuseTexture = new BABYLON.Texture("https://assets.babylonjs.com/environments/roof.jpg", scene);
const boxMat = new BABYLON.StandardMaterial("boxMat");
boxMat.diffuseTexture = new BABYLON.Texture("https://www.babylonjs-playground.com/textures/floor.png");
```
The first parameter for a texture is a relative or absolute URL for the image to use. As usual, the scene parameter is optional and defaults to the current scene.

Finally, of course, set their material properties:
```
roof.material = roofMat;
box.material = boxMat;
```

- [Playground: Adding Materials To Your Objects'](https://playground.babylonjs.com/#KBS9I5#71) - A playground demonstrating how to add materials to the objects in your scene.

![house 2](https://doc.babylonjs.com/img/getstarted/house2.webp)

Having stone walls with no doors or windows is not a very interesting look for a house. Also, when you look closely, you can see that each side uses the same image, and on some sides it is rotated.

## Further reading

- [More on Materials](https://doc.babylonjs.com/features/featuresDeepDive/materials)
