---
title: "Class ColorUtils | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms/ColorUtils/"
---

# Class ColorUtils

> **Inheritance:** `System.Object` -> ColorUtils

###### **Namespace**: [Aurigma.DesignAtoms](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public static class ColorUtils
```

## Inherited Members

* `System.Object.ToString`
* `System.Object.Equals(System.Object)`
* `System.Object.Equals(System.Object,System.Object)`
* `System.Object.ReferenceEquals(System.Object,System.Object)`
* `System.Object.GetHashCode`
* `System.Object.GetType`
* `System.Object.MemberwiseClone`

## Methods

### ConvertToLabString

```csharp
public static string ConvertToLabString(LabColor color, string rgbPreview = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.LabColor` | *color* |  |
| `System.String` | *rgbPreview* |  |

##### Returns

`System.String`

### ConvertToSpotString

```csharp
public static string ConvertToSpotString(SpotColor color, string rgbPreview)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.SpotColor` | *color* |  |
| `System.String` | *rgbPreview* |  |

##### Returns

`System.String`

### ParseWebRgbColor

```csharp
public static RgbColor ParseWebRgbColor(string rgbColor)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *rgbColor* |  |

##### Returns

[Aurigma.DesignAtoms.Model.Color.RgbColor](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/RgbColor.md)

### ParseHexRgbColor

```csharp
public static RgbColor ParseHexRgbColor(string hexColor)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *hexColor* |  |

##### Returns

[Aurigma.DesignAtoms.Model.Color.RgbColor](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/RgbColor.md)

### ParseToWebColor

```csharp
public static string ParseToWebColor(Color color, CmykColorStringFormat cmykColorStringFormat = CmykColorStringFormat.Percent)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Color.Color](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/Color.md) | *color* |  |
| [Aurigma.DesignAtoms.Model.Color.CmykColorStringFormat](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/CmykColorStringFormat.md) | *cmykColorStringFormat* |  |

##### Returns

`System.String`

### ParseWebColor

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

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *color* |  |

##### Returns

[Aurigma.DesignAtoms.Model.Color.Color](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/Color.md)

### ParseWebColorGm

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

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *color* |  |

##### Returns

`Aurigma.GraphicsMill.Color`

### ConvertToPercentCmykWebColor

```csharp
public static string ConvertToPercentCmykWebColor(CmykColor color, string rgbPreview = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.CmykColor` | *color* |  |
| `System.String` | *rgbPreview* |  |

##### Returns

`System.String`

### ConvertToDeviceCmykWebColor

```csharp
public static string ConvertToDeviceCmykWebColor(CmykColor color, string rgbPreview)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.CmykColor` | *color* |  |
| `System.String` | *rgbPreview* |  |

##### Returns

`System.String`

### ConvertToRelativeCmykWebColor

```csharp
public static string ConvertToRelativeCmykWebColor(CmykColor color, string rgbPreview)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.CmykColor` | *color* |  |
| `System.String` | *rgbPreview* |  |

##### Returns

`System.String`

### ConvertToWebColor

```csharp
public static string ConvertToWebColor(RgbColor color)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Color.RgbColor](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/RgbColor.md) | *color* |  |

##### Returns

`System.String`

### ConvertToWebColor

```csharp
public static string ConvertToWebColor(RgbColor color)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.RgbColor` | *color* |  |

##### Returns

`System.String`

### ConvertToHexColor

```csharp
public static string ConvertToHexColor(RgbColor color)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.RgbColor` | *color* |  |

##### Returns

`System.String`

### ConvertToHexColor

```csharp
public static string ConvertToHexColor(RgbColor color)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Color.RgbColor](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/RgbColor.md) | *color* |  |

##### Returns

`System.String`

### ParseXmlColor

```csharp
public static Color ParseXmlColor(Dictionary<string, string[]> styles, string prefix = "")
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Collections.Generic.Dictionary<System.String,System.String[]>` | *styles* |  |
| `System.String` | *prefix* |  |

##### Returns

[Aurigma.DesignAtoms.Model.Color.Color](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/Color.md)

### ParseXmlColor

```csharp
public static Color ParseXmlColor(string color, string inkName = null, string inkSolidity = null, string inkColor = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *color* |  |
| `System.String` | *inkName* |  |
| `System.String` | *inkSolidity* |  |
| `System.String` | *inkColor* |  |

##### Returns

[Aurigma.DesignAtoms.Model.Color.Color](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/Color.md)

### ParseGmXmlColor

```csharp
public static Color ParseGmXmlColor(string color, string inkName = null, string inkSolidity = null, string inkColor = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *color* |  |
| `System.String` | *inkName* |  |
| `System.String` | *inkSolidity* |  |
| `System.String` | *inkColor* |  |

##### Returns

`Aurigma.GraphicsMill.Color`

### ParseGmXmlColor

```csharp
public static Color ParseGmXmlColor(Dictionary<string, string[]> styles, string prefix = "")
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Collections.Generic.Dictionary<System.String,System.String[]>` | *styles* |  |
| `System.String` | *prefix* |  |

##### Returns

`Aurigma.GraphicsMill.Color`

### IsColorSupported

```csharp
public static bool IsColorSupported(Color color)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.Color` | *color* |  |

##### Returns

`System.Boolean`

### ConvertToGmXmlColor

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

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.Color` | *color* |  |

##### Returns

`System.String`

### GetColorProfileDescription

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

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Model.Color.Color](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Model.Color/Color.md) | *color* |  |

##### Returns

`System.String`

### GetTextAndPalette

```csharp
public static Tuple<string, List<Color>> GetTextAndPalette(string text, List<Color> palette = null)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *text* |  |
| `System.Collections.Generic.List<Aurigma.DesignAtoms.Model.Color.Color>` | *palette* |  |

##### Returns

`System.Tuple<System.String,System.Collections.Generic.List<Aurigma.DesignAtoms.Model.Color.Color>>`

## Fields

### HtmlDeviceCMYK

```csharp
public static Regex HtmlDeviceCMYK
```

### HtmlPercentCMYK

```csharp
public static Regex HtmlPercentCMYK
```

### HtmlRelativeCMYK

```csharp
public static Regex HtmlRelativeCMYK
```

### LabColorRegex

```csharp
public static Regex LabColorRegex
```

### SpotColorRegex

```csharp
public static Regex SpotColorRegex
```
