# Set Mito Spreadsheet Theme

## Example

Use the `theme` argument to set the text and background colors used in the spreadsheet.&#x20;

```python
from mitosheet.mito_dash.v1 import Spreadsheet, activate_mito
from dash import Dash, html
import pandas as pd

app = Dash(__name__)
activate_mito(app)

df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv')

app.layout = html.Div([
    html.H1('Simple Theme Example'),
    Spreadsheet(
        df, 
        id={'type': 'spreadsheet', 'id': 'sheet'}, 
        theme={
            'primaryColor': '#f5c107', 
            'backgroundColor': '#0f0f0f', 
            'secondaryBackgroundColor': '#515251', 
            'textColor': '#ffffff'
        }
    ),
])

if __name__ == '__main__':
    app.run_server(debug=True)
```

<figure><img src="/files/KSTCjXAY6ZB3C4jW4Q3I" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trymito.io/mito-for-dash/common-design-patterns/set-mito-spreadsheet-theme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
