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.
Summary
Types
Callbacks
The names it adds to the color table, each with its default value.
@callback name() :: String.t()
The extension's name, for faults.
The palette names it adds, each in a group with its default entry.