# Setting the Background Colors for a Sheet

Learn how to set background colors for a sheet in Spread.NET with step-by-step instructions. Optimize the appearance of your spreadsheet for better user experience.

## Content

There are two different background colors for a sheet. The first is the background of all the cells in the data area, which can be set at the sheet level. The second is the area beyond the cells but also set at the sheet level, which is called the gray area background color.
The background color for all the cells in the sheet, as well as other properties, can be set using the default style of the sheet. In this example, the background color of the default style for all of the cells is green. You can also set the background color for individual cells.
The gray area background color for the sheet is displayed in the area where cells are not displayed, as shown in the following figure. By default, the area is the system's Control color. This example sets the background color beyond the cells to be pink.
![Sheet Background Colors Example](https://cdn.mescius.io/document-site-files/images/2238e618-a1fb-45a6-9ce5-9a4157bd2931/images/sheet-back-colors.png)

## Using the Properties Window

1. At design time, in the **Properties** window, select the Spread component.
2. Select the **Sheets** property.
3. Click the button to display the **SheetView Collection Editor**.
4. In the **Members** list, select the sheet for which to set the gray area background color.
5. Select the **GrayAreaBackColor** property in the property list, and then click the drop-down button to display the color picker.
6. Select a color in the color picker.
7. Click **OK** to close the editor.

## Using a Shortcut

Set the Sheets shortcut object [GrayAreaBackColor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.GrayAreaBackColor.html) property for the sheet.
**Example**
This example code sets the first sheet’s gray area background color to light yellow.

```csharp
// Set the first sheet's background color to light yellow.
fpSpread1.InterfaceRenderer = null;
fpSpread1.Sheets[0].GrayAreaBackColor = Color.LightYellow;
```

```vbnet
' Set the first sheet's background color to light yellow.
fpSpread1.InterfaceRenderer = Nothing
fpSpread1.Sheets(0).GrayAreaBackColor = Color.LightYellow
```

## Using Code

1. Create a new SheetView object.
2. Set the [GrayAreaBackColor](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.SheetView.GrayAreaBackColor.html) property for the SheetView object.
3. Assign the SheetView object to a sheet in the Spread component.

**Example**
This example code sets the first sheet’s background color to light yellow.

```csharp
// Create a new SheetView object.
FarPoint.Win.Spread.SheetView newsheet = new FarPoint.Win.Spread.SheetView();
fpSpread1.InterfaceRenderer = null
// Set the SheetView object's background color to light yellow.
newsheet.GrayAreaBackColor = Color.LightYellow;
// Assign the SheetView object to the first sheet in the component.
fpSpread1.Sheets[0] = newsheet;
```

```vbnet
' Create a new SheetView object.
Dim newsheet As New FarPoint.Win.Spread.SheetView()
fpSpread1.InterfaceRenderer = Nothing
' Set the SheetView object's background color to light yellow.
newsheet.GrayAreaBackColor = Color.LightYellow
' Assign the SheetView object to the first sheet in the component.
fpSpread1.Sheets(0) = newsheet
```

## Using the Spread Designer

1. Select the sheet tab for the sheet for which you want to set the gray area background color.
2. In the property list, select the **GrayAreaBackColor** property.
3. Click the drop-down arrow to display the color picker.
4. Select a color from the color picker.
5. From the **File** menu choose **Apply and Exit** to apply your changes to the component and exit Spread Designer.

## See Also

[Coloring a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet/spwin-cellcolor)
[Setting a Background Image for a Sheet](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet/spwin-sheetbackimage)
[Setting a Background Image to a Cell](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-setappearance/spwin-appearsheet/spwin-cell-backimage)