Version

GetIndexOfNearestColor Method

Gets the index of the closest color in the color palette, which will be seen when the file is opened in Microsoft Excel 2003 and older versions.
Syntax
public int GetIndexOfNearestColor( 
   Color color
)

Parameters

color
The color to match in the palette.

Return Value

A 0-based index into the collection of the closest color available in the palette.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also