# `Mailglass.Components.Theme`
[🔗](https://github.com/szTheory/mailglass/blob/v0.1.0/lib/mailglass/components/theme.ex#L1)

Theme-token resolver backed by `:persistent_term`.

Reads the brand theme cached by `Mailglass.Config.validate_at_boot!/0`
(D-19). The theme map shape:

    [
      colors: %{ink: "#0D1B2A", glass: "#277B96", ...},
      fonts:  %{body: "...", display: "...", mono: "..."}
    ]

All reads are O(1). Unknown tokens fall back to sensible defaults rather
than raising — components render even if boot-time validation has not yet
populated the cache (e.g. in minimal test setups).

# `color`
*since 0.1.0* 

```elixir
@spec color(atom()) :: String.t()
```

Returns the hex color for a brand token.

Accepts `:ink`, `:glass`, `:ice`, `:mist`, `:paper`, `:slate` by default.
Falls back to `#277B96` (Glass) for unknown tokens.

## Examples

    iex> Mailglass.Components.Theme.color(:unknown_token)
    "#277B96"

# `font`
*since 0.1.0* 

```elixir
@spec font(atom()) :: String.t()
```

Returns the font-stack string for a font role.

Accepts `:body`, `:display`, `:mono` by default. Falls back to
`sans-serif` for unknown roles.

# `get`
*since 0.1.0* 

```elixir
@spec get() :: keyword()
```

Returns the cached theme keyword list. Empty list when uncached.

---

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