# magenta

> Magenta. RGBA is (1, 0, 1, 1).

## Definition

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

```csharp
public static Color magenta { get; }
```

### Examples

```csharp
//Attach this script to a GameObject with a Renderer (go to <b>Create</b>><b>3D Object</b> and select one of the first 6 options to create a GameObject with a Renderer automatically attached).
//This script changes the Color of your GameObject’s Material when your mouse hovers over it in Play Mode.

using UnityEngine;

public class Example : MonoBehaviour
{
    Renderer m_Renderer;

    void Start()
    {
        //Fetch the Renderer component of the GameObject
        m_Renderer = GetComponent<Renderer>();
    }

    //Run your mouse over the GameObject to change the Renderer's material color to magenta
    void OnMouseOver()
    {
        m_Renderer.material.color = Color.magenta;
    }

    //Change the Material's Color back to white when the mouse exits the GameObject
    void OnMouseExit()
    {
        m_Renderer.material.color = Color.white;
    }
}
```
