Description |
---|
Excerpt |
---|
Returns a color representing the specified RGB value, and throws an exception if the file does not support the specified color. |
Signature | C# | C# |
---|---|---|
Wiki Markup | ||
{description}
{excerpt}Returns a color representing the specified RGB value, and throws an exception if the file does not support the specified color.{excerpt}
{signature:C#}
public Color GetColor(int red, int green, int blue)
| ||
Signature | ||
{signature}{signature:vb.net | vb.net | }
Public Function GetColor(ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer) As Color
|
Parameters |
---|
...
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.
...
Exceptions |
---|
...
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. |
Example | |||
---|---|---|---|
Code Block | | csharp | csharp |
title | C# | ||
Code Block | vb.net | title |