Page tree
Skip to end of metadata
Go to start of metadata

Description

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

C#
vb.net

Parameters

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

Returns

A Color object representing the color with the specified RGB value.

Exceptions

System.ArgumentOutOfRangeException
If the given red, green, or blue value is not between 0 and 255.

Remarks

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.

Examples

C#
vb.net
  • No labels