# GetGlobalColor

> Gets a global color property for all shaders previously set using Shader.SetGlobalColor.

## Definition

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

## GetGlobalColor(string)

Gets a global color property for all shaders previously set using [Shader.SetGlobalColor](/engine/6000.7/script-reference/unityengine/shader/setglobalcolor.md).

```csharp
public static Color GetGlobalColor(string name)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name of the property.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [Color](/engine/6000.7/script-reference/unityengine/color.md) |             |

### Remarks

It is only an alias to [Shader.GetGlobalVector](/engine/6000.7/script-reference/unityengine/shader/getglobalvector.md) that the vector value is cast to color. No sRGB-linear conversion is done during the function call.

Additional Resources: [Shader.GetGlobalVector](/engine/6000.7/script-reference/unityengine/shader/getglobalvector.md).

## GetGlobalColor(int)

Gets a global color property for all shaders previously set using [Shader.SetGlobalColor](/engine/6000.7/script-reference/unityengine/shader/setglobalcolor.md).

```csharp
public static Color GetGlobalColor(int nameID)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The name ID of the property retrieved by [Shader.PropertyToID](/engine/6000.7/script-reference/unityengine/shader/propertytoid.md).

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [Color](/engine/6000.7/script-reference/unityengine/color.md) |             |

### Remarks

It is only an alias to [Shader.GetGlobalVector](/engine/6000.7/script-reference/unityengine/shader/getglobalvector.md) that the vector value is cast to color. No sRGB-linear conversion is done during the function call.

Additional Resources: [Shader.GetGlobalVector](/engine/6000.7/script-reference/unityengine/shader/getglobalvector.md).
