---
title: "Color.FromRgb"
url: "https://reference.aspose.com/html/net/aspose.html.drawing/color/fromrgb/"
product: "Aspose.HTML for .NET API Reference"
description: "Color FromRgb method. Returns a new Color with the requested ged green blue values. All color components must be in the range 0-255"
---

## FromRgb(*byte, byte, byte*) {#fromrgb}

Returns a new Color with the requested ged, green, blue values. All color components must be in the range 0-255.

```csharp
public static Color FromRgb(byte red, byte green, byte blue)
```

| Parameter | Type | Description |
| --- | --- | --- |
| red | Byte | A byte that represents the red component of the color. |
| green | Byte | A byte that represents the green component of the color. |
| blue | Byte | A byte that represents the blue component of the color. |

### Return Value

A new instance of the [`Color`](../) class

### See Also

* class [Color](../)
* namespace [Aspose.Html.Drawing](../../../aspose.html.drawing/)
* assembly [Aspose.HTML](../../../)

---

## FromRgb(*int, int, int*) {#fromrgb_1}

Returns a new Color with the requested ged, green, blue values. All color components must be in the range 0-255.

```csharp
public static Color FromRgb(int red, int green, int blue)
```

| Parameter | Type | Description |
| --- | --- | --- |
| red | Int32 | A int that represents the red component of the color. |
| green | Int32 | A int that represents the green component of the color. |
| blue | Int32 | A int that represents the blue component of the color. |

### Return Value

A new instance of the [`Color`](../) class

### See Also

* class [Color](../)
* namespace [Aspose.Html.Drawing](../../../aspose.html.drawing/)
* assembly [Aspose.HTML](../../../)

---

## FromRgb(*float, float, float*) {#fromrgb_2}

Returns a new Color with the requested ged, green, blue values. All color components must be in the range 0-1.

```csharp
public static Color FromRgb(float red, float green, float blue)
```

| Parameter | Type | Description |
| --- | --- | --- |
| red | Single | A float that represents the red component of the color. |
| green | Single | A float that represents the green component of the color. |
| blue | Single | A float that represents the blue component of the color. |

### Return Value

A new instance of the [`Color`](../) class

### See Also

* class [Color](../)
* namespace [Aspose.Html.Drawing](../../../aspose.html.drawing/)
* assembly [Aspose.HTML](../../../)
