# `Autumn.Theme`
[🔗](https://github.com/leandrocp/autumn/blob/v0.7.0/lib/autumn/theme.ex#L1)

A Neovim theme.

Contains the name, appearance, and a map of highlight `Autumn.Theme.Style`'s.

Autumn bundles the most popular themes from the Neovim community,
you can see the full list with `Autumn.available_themes/0` and
then fetch one of the bundled themes with `Autumn.Theme.get/1`.

Or check out all the [available themes](https://docs.rs/autumnus/latest/autumnus/#themes-available).

## Example

    %Autumn.Theme{
       name: "github_light",
       appearance: :light,
       revision: "fe70a27afefa6e10db4a59262d31f259f702fd6a",
       highlights: %{
         "function.macro" => %Autumn.Theme.Style{
           fg: "#6639ba",
           bg: nil,
           bold: false,
           italic: false,
           text_decoration: %Autumn.Theme.TextDecoration{
             underline: :solid,
             strikethrough: false
           }
         },
         ...
       }
    }

# `appearance`
[🔗](https://github.com/leandrocp/autumn/blob/v0.7.0/lib/autumn/theme.ex#L36)

```elixir
@type appearance() :: :light | :dark
```

# `t`
[🔗](https://github.com/leandrocp/autumn/blob/v0.7.0/lib/autumn/theme.ex#L39)

```elixir
@type t() :: %Autumn.Theme{
  appearance: appearance(),
  highlights: %{required(String.t()) =&gt; Autumn.Theme.Style.t()},
  name: String.t(),
  revision: String.t()
}
```

A Neovim theme with name, appearance (:light or :dark), revision, and highlight styles.

# `from_file`
[🔗](https://github.com/leandrocp/autumn/blob/v0.7.0/lib/autumn/theme.ex#L63)

```elixir
@spec from_file(String.t()) :: {:ok, t()} | {:error, term()}
```

Load a theme from a JSON file.

# `from_json`
[🔗](https://github.com/leandrocp/autumn/blob/v0.7.0/lib/autumn/theme.ex#L74)

```elixir
@spec from_json(String.t()) :: {:ok, t()} | {:error, term()}
```

Load a theme from a JSON string.

# `get`
[🔗](https://github.com/leandrocp/autumn/blob/v0.7.0/lib/autumn/theme.ex#L52)

```elixir
@spec get(String.t(), any()) :: t() | nil
```

Get a theme by name.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
