# `Macaw.Layers.Theme.Extension`
[🔗](https://github.com/dcoai/macaw_layers/blob/v0.2.2/lib/macaw/layers/theme/extension.ex#L1)

What an adopter registers beyond the library's vocabulary (spec/04 §3.4), so one theme
styles it: palette names in a group of the palette, and names of the color table, each
with its default.

    defmodule MyApp.Marks do
      @behaviour Macaw.Layers.Theme.Extension
      def name, do: "marks"
      def styles, do: %{lane: {:furniture, %{stroke: %{type: :solid, color: {:color, :lane}}}}}
      def colors, do: %{lane: "#8a8f99"}
    end

    Macaw.Layers.Theme.new(extensions: [MyApp.Marks])

A theme carries its extensions in `extensions`, given explicitly and **default closed**:
a palette or color name that neither the library nor an extension has is a fault naming
it. The names an extension adds are held to the contracts of their group, its default
entries included. Two extensions adding one name, or an extension adding a library name,
raise `ArgumentError` naming both.

# `group`

```elixir
@type group() :: :state | :furniture | :modifier
```

A group of the palette an extension's style joins.

# `colors`

```elixir
@callback colors() :: %{required(atom()) =&gt; term()}
```

The names it adds to the color table, each with its default value.

# `name`

```elixir
@callback name() :: String.t()
```

The extension's name, for faults.

# `styles`

```elixir
@callback styles() :: %{required(atom()) =&gt; {group(), map() | list()}}
```

The palette names it adds, each in a group with its default entry.

---

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