Description |
---|
Excerpt |
---|
Returns a color representing the specified RGB value, and throws an exception if the file does not support the specified color. |
Signature | ||||
---|---|---|---|---|
| ||||
public Color GetColor(int red, int green, int blue) |
Signature | ||||
---|---|---|---|---|
| ||||
Public Function GetColor(ByVal red As Integer, ByVal green As Integer, ByVal blue As Integer) As Color |
Parameters |
---|
Param | ||||
---|---|---|---|---|
| ||||
The red component of the desired color. Must be between 0 and 255. |
Param | ||||
---|---|---|---|---|
| ||||
the green component of the desired color. Must be between 0 and 255. |
Param | ||||
---|---|---|---|---|
| ||||
the blue component of the desired color. Must be between 0 and 255. |
Returns | ||||||||
---|---|---|---|---|---|---|---|---|
A
|
Exceptions |
---|
Exception | ||||
---|---|---|---|---|
| ||||
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 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|