# Adding a Gradient to Header Cells

Learn how to add color gradients to header cells and enhance the visual appeal of your spreadsheets with this comprehensive guide.

## Content

You can change the appearance of header cells by adding a color gradient. You can have a gradient from one color to another color.
You can implement a gradient appearance by creating a custom class that inherits existing cell classes (a general cell, in this case) and change the display to a gradient. You can also use the [GradientHeaderRenderer](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.GradientHeaderRenderer.html) class.
![Header cells with color gradient](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/hdr-gradient.png)

## Method to set

Use the [GradientHeaderRenderer](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.CellType.GradientHeaderRenderer.html) class and the [Renderer](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.Column.Renderer.html) property for the column header row and row header column.

## Example

This example sets a gradient for the headers and the sheet corner.

```csharp
FarPoint.Win.Spread.CellType.GradientHeaderRenderer gr = new FarPoint.Win.Spread.CellType.GradientHeaderRenderer(Color.Yellow,Color.Orange, Color.YellowGreen, Color.Bisque,Drawing2D.LinearGradientMode.ForwardDiagonal);
fpSpread1.ActiveSheet.ColumnHeader.Rows[0].Renderer = gr;
fpSpread1.ActiveSheet.RowHeader.Columns[0].Renderer = gr;
fpSpread1.ActiveSheet.SheetCorner.DefaultStyle.Renderer = gr;
```

```vbnet
Dim gr As New FarPoint.Win.Spread.CellType.GradientHeaderRenderer(Color.Yellow, Color.Orange, Color.YellowGreen, Color.Bisque, Drawing2D.LinearGradientMode.ForwardDiagonal)
fpSpread1.ActiveSheet.ColumnHeader.Rows(0).Renderer = gr
fpSpread1.ActiveSheet.RowHeader.Columns(0).Renderer = gr
fpSpread1.ActiveSheet.SheetCorner.DefaultStyle.Renderer = gr
```

## See Also

[Customizing the Style of Header Cells](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-header/spwin-appearheader/spwin-headercustomize)
[Customizing the Header Grid Lines](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-ssobject-header/spwin-appearheader/spwin-headergridlines)