# `Owl.Palette`
[🔗](https://github.com/fuelen/owl/blob/v0.13.1/lib/owl/palette.ex#L1)

A simple color picker.

# `codes`

```elixir
@spec codes() :: Owl.Data.t()
```

Returns a palette with codes from 0 to 255.

    Owl.Palette.codes() |> Owl.IO.puts()

You can use a selected color as follows:

    # print "test" using foreground color with code 161
    "test" |> Owl.Data.tag(IO.ANSI.color(161)) |> Owl.IO.puts

    # print "test" using background color with code 161
    "test" |> Owl.Data.tag(IO.ANSI.color_background(161)) |> Owl.IO.puts

# `named`

```elixir
@spec named() :: Owl.Data.t()
```

Returns a palette with named codes.

    Owl.Palette.named() |> Owl.IO.puts()

You can use a selected color as follows:

    # print "test" using cyan foreground color
    "test" |> Owl.Data.tag(:cyan) |> Owl.IO.puts

    # print "test" using light_green foreground color
    "test" |> Owl.Data.tag(:light_green) |> Owl.IO.puts

    # print "test" using light_green background color
    "test" |> Owl.Data.tag(:light_green_background) |> Owl.IO.puts

    # print "test" using a faint cyan foreground color
    "test" |> Owl.Data.tag([:faint, :cyan]) |> Owl.IO.puts

Note that `:faint` is not supported in all terminals.

# `rgb`

```elixir
@spec rgb() :: Owl.Data.t()
```

Returns a palette with individual RGB values.

    Owl.Palette.rgb() |> Owl.IO.puts()

You can use a selected color as follows:

    # print "test" using foreground color RGB(4, 3, 2)
    "test" |> Owl.Data.tag(IO.ANSI.color(4, 3, 2)) |> Owl.IO.puts

    # print "test" using background color RGB(4, 3, 2)
    "test" |> Owl.Data.tag(IO.ANSI.color_background(4, 3, 2)) |> Owl.IO.puts

---

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