# ToHtmlStringRGB

> Returns the color as a hexadecimal string in the format "RRGGBB".

## Definition

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

## ToHtmlStringRGB(Color)

Returns the color as a hexadecimal string in the format "RRGGBB".

```csharp
public static string ToHtmlStringRGB(Color color)
```

### Parameters

**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to be converted.

### Returns

| Type                                                           | Description                                |
| -------------------------------------------------------------- | ------------------------------------------ |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | Hexadecimal string representing the color. |

### Remarks

Additional Resources: [ColorUtility.ToHtmlStringRGBA](/engine/6000.5/script-reference/unityengine/colorutility/tohtmlstringrgba.md).

## ToHtmlStringRGB(Color)

Returns the color as a hexadecimal string in the format "RRGGBB".

```csharp
public static string ToHtmlStringRGB(in Color color)
```

### Parameters

**** (\[Color]\(/engine/6000.5/script-reference/unityengine/color)): The color to be converted.

### Returns

| Type                                                           | Description                                |
| -------------------------------------------------------------- | ------------------------------------------ |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | Hexadecimal string representing the color. |

### Remarks

Additional Resources: [ColorUtility.ToHtmlStringRGBA](/engine/6000.5/script-reference/unityengine/colorutility/tohtmlstringrgba.md).
