Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{description}
{excerpt}Returns a [Color] representing the specified color, and throws an exception if the file does not support the specified color.{excerpt}
{signature:C#}
 public Color GetColor(System.Drawing.Color color)
{signature}{signature:vb.net}
Public Function GetColor(ByVal color As System.Drawing.Color) As Color
{signature}
{parameters}
{param:color}The desired color.{param}
{returns}A {msdn:System.Drawing.Color|Color} object in the palette that matches the specified color.{returns}
{remarks}
For .xls files, an exception will be thrown if the color is not in the palette. For .xlsx files, a [Color] will always be returned.
{remarks}
{example}{code:csharp|title=C#}
Color clr = pal.GetColor(System.Drawing.Color.Red);{code}
{code:vb.net|title=vb.net}
Dim clr As Color = pal.GetColor(System.Drawing.Color.Red){code}

{example}