Description |
---|
Excerpt |
---|
Returns the closest color in the palette closest to the specified RGB value . The closest match is defined as the color in the palette that has the minimum difference between the specified RGB value and its RGB valuethe file can support. |
Signature | ||||
---|---|---|---|---|
| ||||
public Color GetClosestColor(int red, int green, int blue) |
...
Returns |
---|
The closest color in the palette to the specified RGB value |
Exceptions |
---|
Exception | ||||
---|---|---|---|---|
| ||||
If the given red, green, or blue value is not between 0 and 255. |
Remarks |
---|
For .xls files, this will be the color in the palette that has the minimum difference between the specified RGB value and its RGB value. .xlsx files are not limited to colors in the palette, and will return a Color representing the specified RGB values exactly. |
Example | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|