Message-ID: <422561754.7629.1711615878820.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_7628_1890045854.1711615878820" ------=_Part_7628_1890045854.1711615878820 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Palette.GetClosestColor(System.Drawing.Color)

Palette.GetClosestColor(System.Drawing.Color)

Description

=20

Returns the closest color to the specified color that the file can suppo= rt.

=20
C#
=20
 public Color GetClosestColor(System.Drawing.Color color)
=20
=20
vb.net
=20
Public Function GetClosestColor(ByVal color As System.Drawing.Color) As Col=
or
=20
=20

Paramet= ers

=20
color
T= he desired color.=20

Returns The closest color in the palette to the specified RGB value=20

Remarks For .xls files, this will be the color in the palette that has the minim= um difference between the specified RGB value and its RGB value. .xlsx file= s are not limited to colors in the palette, and will return a=20 Color representing the= specified color exactly.=20

Examples<= /h2>=20
C#
=20
Color clr =3D pal.GetClosestColor(System.Drawing.Color.Red);
=20
=20
vb.net
=20
Dim clr As Color =3D pal.GetClosestColor(System.Drawing.Color.Red)
=20

------=_Part_7628_1890045854.1711615878820--