Returns a color representing the specified RGB value, and throws an exception if the file does not support the specified color.

 public Color GetColor(int red, int green, int blue)
Public Function GetColor(ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer) As Color

For .xls files, an exception will be thrown if no color in the palette has the specified RGB value. For .xlsx files, a color will be returned for any RGB values.

The red component of the desired color. Must be between 0 and 255.

the green component of the desired color. Must be between 0 and 255.

the blue component of the desired color. Must be between 0 and 255.

A object representing the color with the specified RGB value.

Color blue = pal.GetColor(0, 0, 255);
Dim blue As Color = pal.GetColor(0, 0, 255)