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

# Class ColorPreviewCache

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

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

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

```csharp title="Syntax"
public class ColorPreviewCache : IColorPreviewCache
```

## Implements

* [Aurigma.DesignAtoms.ColorManagement.IColorPreviewCache](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.ColorManagement/IColorPreviewCache.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

### ColorPreviewCache

```csharp
public ColorPreviewCache(IMemoryCachingService memoryCachingService)
```

## Methods

### GetColorPreview

```csharp
public RgbColor GetColorPreview(string profileId, Color color, ColorProfile targetDevice)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *profileId* |  |
| `Aurigma.GraphicsMill.Color` | *color* |  |
| `Aurigma.GraphicsMill.ColorProfile` | *targetDevice* |  |

##### Returns

`Aurigma.GraphicsMill.RgbColor`

### AddColorPreview

```csharp
public void AddColorPreview(string profileId, Color color, ColorProfile targetDevice, RgbColor colorPreview)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.String` | *profileId* |  |
| `Aurigma.GraphicsMill.Color` | *color* |  |
| `Aurigma.GraphicsMill.ColorProfile` | *targetDevice* |  |
| `Aurigma.GraphicsMill.RgbColor` | *colorPreview* |  |
