---
title: "ColorPalette.FindNearestIndex Method "
canonical: https://www.graphicsmill.com/docs/gm/M_Aurigma_GraphicsMill_ColorPalette_FindNearestIndex_1_99a0633e.htm
product: "Graphics Mill"
---

# ColorPalette.FindNearestIndex Method 
 
Returns an index of the color in this palette closest to a given one.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```csharp
public int FindNearestIndex(RgbColor color
)
```
 
### Parameters
 
 - color
     - Type: [Aurigma.GraphicsMill.RgbColor](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_RgbColor.htm.md)
A [RgbColor](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_RgbColor.htm.md) to find.
 
### Return Value
Th index of the palette entry which is closest to a given color.
   
## See Also

### Reference

- [ColorPalette Class](https://www.graphicsmill.com/docs/gm/T_Aurigma_GraphicsMill_ColorPalette.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm/N_Aurigma_GraphicsMill.htm.md)
