# `AtomLGFX.Command`
[🔗](https://github.com/mnishiguchi/atomlgfx/blob/v0.1.0/lib/atom_lgfx/command.ex#L5)

`AtomLGFX.render/3` で使用する描画命令一覧を正規化します。

公開命令では、色名、直接指定した RGB 値、文字基準位置名など、読みやすい Elixir の値を受け付けます。このモジュールは、それらを `AtomLGFX.BinaryBatch` が受け取る厳密な通信形式へ変換します。

# `color`

```elixir
@type color() ::
  0..65535
  | atom()
  | {:rgb565, 0..65535}
  | {:rgb565, 0..255, 0..255, 0..255}
  | {:rgb888, 0..16_777_215}
  | {:rgb888, 0..255, 0..255, 0..255}
  | {:rgb, 0..255, 0..255, 0..255}
  | {:index, 0..255}
```

# `command`

```elixir
@type command() :: atom() | tuple()
```

# `normalized_command`

```elixir
@type normalized_command() :: atom() | tuple()
```

# `normalize`

```elixir
@spec normalize(
  [command()],
  keyword()
) :: {:ok, [normalized_command()]} | {:error, term()}
```

描画命令一覧を正規化します。

# `normalize_color`

```elixir
@spec normalize_color(term()) :: {:ok, color()} | {:error, term()}
```

表示色を正規化します。

# `normalize_one`

```elixir
@spec normalize_one(command()) :: {:ok, normalized_command()} | {:error, term()}
```

1つの描画命令を正規化します。

# `normalize_text_datum`

```elixir
@spec normalize_text_datum(term()) :: {:ok, 0..255} | {:error, term()}
```

文字基準位置の名前、または LovyanGFX の数値を正規化します。

---

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