NativeExcel2 for .Net Developer's Reference

IFont.Color Property

Returns or sets the color of the font. Read/write System.Drawing.Color.

[Visual Basic]
PropertyColorAsColor
[C#]
ColorColor{get;set;}
[C++]
__propertyColorget_Color();
__propertyvoidset_Color(Color);
[JScript]
functiongetColor():Color
functionsetColor(Color);

Example

This example changes the font color in cell A1 on sheet one to red.

[C#]
book.Worksheets[1].Range["A1"].Font.Color = Color.FromArgb(255, 0, 0);
[VisualBasic]
book.Worksheets(1).Range("A1").Font.Color = Color.FromArgb(255, 0, 0)
[C++]
book->Worksheets->Item[1]->Range->Item[S"A1"]->Font->Color = Color::FromArgb(255, 0, 0);

See Also

IFont Interface | NativeExcel Namespace