ExpertXls Excel Library for .NET
GetColorIndex Method (color)
Namespaces ► ExpertXls.ExcelLib ► ExcelColorsPalette ► GetColorIndex(Color)
ExpertXls Excel Library for .NET
Gets the index in palette of the specified color. If the exact color is not found in the palette the method will return the index of the color in palette which is the closest to the specified color.
Declaration Syntax

C# | Visual Basic | Visual C++

    public int GetColorIndex(
    	Color color
    )

    Public Function GetColorIndex ( _
    	color As Color _
    ) As Integer

    public:
    int GetColorIndex(
    	Color color
    )

Parameters

color (Color)
  The color to search in palette

Return Value
The index of the specified color in palette

Assembly: ExpertXls.ExcelLib (Module: ExpertXls.ExcelLib) Version: 2.1.0.0 (2.1.0.0)