# MainColor

> Signifies that value of this property contains the main color of the Material.

## Definition

* **Type:** Field
* **Namespace:** [UnityEngine.Rendering](/engine/6000.0/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
MainColor = 256
```

### Remarks

This flag corresponds to the `[MainColor]` [ShaderLab Properties attribute](/engine/6000.0/manual/materials-and-shaders/shaders/reference/sl-reference/sl-shader-object/sl-properties.md).

By default, Unity considers a color with the property name name `"_Color"` to be the main color. Use the `[MainColor]` ShaderLab Properties attribute to make Unity consider a color with a different property name to be the main color.

Additional Resources: [Material.color](/engine/6000.0/script-reference/unityengine/material/color.md), [ShaderLab: Properties](/engine/6000.0/manual/materials-and-shaders/shaders/reference/sl-reference/sl-shader-object/sl-properties.md), [ShaderPropertyFlags.MainTexture](/engine/6000.0/script-reference/unityengine/rendering/shaderpropertyflags/maintexture.md).
