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

# Class ColorMatchingService

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

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

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

```csharp title="Syntax"
public class ColorMatchingService : IColorMatchingService
```

## Implements

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

## 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`

## Constructors

### ColorMatchingService

```csharp
public ColorMatchingService()
```

## Methods

### FindNearestColorIndex

```csharp
public int FindNearestColorIndex(ColorPalette gmPalette, RgbColor targetColor)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Aurigma.GraphicsMill.ColorPalette` | *gmPalette* |  |
| `Aurigma.GraphicsMill.RgbColor` | *targetColor* |  |

##### Returns

`System.Int32`
