# Add support for specifying both light and dark themes in \`settings.json\` \(\#7404\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/a80a3b8706b83e70476ed4a89252b3324edfb391)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: a80a3b8706b83e70476ed4a89252b3324edfb391

Requested commit: a80a3b8706b83e70476ed4a89252b3324edfb391

Commit: a80a3b8706b83e70476ed4a89252b3324edfb391

Tree: ccba14f987d54361d85a5d9994a29963eeaedf3f

Author: Marshall Bowers

Committer: GitHub

## Message

````
Add support for specifying both light and dark themes in `settings.json` (#7404)

This PR adds support for configuring both a light and dark theme in
`settings.json`.

In addition to accepting just a theme name, the `theme` field now also
accepts an object in the following form:

```jsonc
{
  "theme": {
    "mode": "system",
    "light": "One Light",
    "dark": "One Dark"
  }
}
```

Both `light` and `dark` are required, and indicate which theme should be
used when the system is in light mode and dark mode, respectively.

The `mode` field is optional and indicates which theme should be used:
- `"system"` - Use the theme that corresponds to the system's
appearance.
- `"light"` - Use the theme indicated by the `light` field.
- `"dark"` - Use the theme indicated by the `dark` field.

Thank you to @Yesterday17 for taking a first stab at this in #6881!

Release Notes:

- Added support for configuring both a light and dark theme and
switching between them based on system preference.
````

## Parents

- [b59f92593386ce58ae9df03ad66a089d313d6ecf](https://git.cafe/gitcafe/zed/commit/b59f92593386ce58ae9df03ad66a089d313d6ecf?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/a80a3b8706b83e70476ed4a89252b3324edfb391?format=markdown)
